drm/nouveau/secboot: prevent address trimming
authorAlexandre Courbot <acourbot@nvidia.com>
Tue, 24 Jan 2017 10:29:39 +0000 (19:29 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 7 Mar 2017 07:05:11 +0000 (17:05 +1000)
Using 32-bit integers would trim the WPR address if it is allocated above 4GB.

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

index 205bf453ad477057b039a3b05f2552304c09ab6f..424179589bc47f5937ee86641eb3c4c54af2c714 100644 (file)
@@ -502,8 +502,8 @@ acr_r352_fixup_hs_desc(struct acr_r352 *acr, struct nvkm_secboot *sb,
 
        /* WPR region information if WPR is not fixed */
        if (sb->wpr_size == 0) {
-               u32 wpr_start = ls_blob->addr;
-               u32 wpr_end = wpr_start + ls_blob->size;
+               u64 wpr_start = ls_blob->addr;
+               u64 wpr_end = wpr_start + ls_blob->size;
 
                desc->wpr_region_id = 1;
                desc->regions.no_regions = 2;