]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/nouveau/secboot: fix WPR address to be 64-bit
authorAlexandre Courbot <acourbot@nvidia.com>
Tue, 31 Jan 2017 09:16:08 +0000 (18:16 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 7 Mar 2017 07:05:11 +0000 (17:05 +1000)
The WPR address parameter of the ls_write_wpr hook was defined as a u32,
which will very likely overflow on boards with more than 4GB VRAM.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h

index 372d29521fd871cc4f9618bf4c80d4423d1306df..32de99196ec0ab5b8dcc0229d2945a52c6ac14e4 100644 (file)
@@ -341,7 +341,7 @@ acr_r352_ls_fill_headers(struct acr_r352 *acr, struct list_head *imgs)
  */
 int
 acr_r352_ls_write_wpr(struct acr_r352 *acr, struct list_head *imgs,
-                     struct nvkm_gpuobj *wpr_blob, u32 wpr_addr)
+                     struct nvkm_gpuobj *wpr_blob, u64 wpr_addr)
 {
        struct ls_ucode_img *_img;
        u32 pos = 0;
index ad5923b0fd3ced6500b2a4a81c323192df5492a9..a5ec71aecaa23b4eff7972a129c22db4bfcf8ad7 100644 (file)
@@ -185,7 +185,7 @@ struct acr_r352_func {
                                                  enum nvkm_secboot_falcon);
        int (*ls_fill_headers)(struct acr_r352 *, struct list_head *);
        int (*ls_write_wpr)(struct acr_r352 *, struct list_head *,
-                           struct nvkm_gpuobj *, u32);
+                           struct nvkm_gpuobj *, u64);
 
        const struct acr_r352_ls_func *ls_func[NVKM_SECBOOT_FALCON_END];
 };
@@ -245,6 +245,6 @@ struct ls_ucode_img *acr_r352_ls_ucode_img_load(const struct acr_r352 *,
                                                enum nvkm_secboot_falcon);
 int acr_r352_ls_fill_headers(struct acr_r352 *, struct list_head *);
 int acr_r352_ls_write_wpr(struct acr_r352 *, struct list_head *,
-                         struct nvkm_gpuobj *, u32);
+                         struct nvkm_gpuobj *, u64);
 
 #endif