Use unsigned intptr_t type for framebuffer addresses
Summary: Some architectures (powerpc Book-E) have a vm_paddr_t larger than intptr_t. Casting from the intptr_t to vm_paddr_t causes sign extension, leading to a potentially invalid address. This was seen when running X on a PowerPC P1022 machine, which mapped the backing framebuffer at 0xc1800000. When mmap()d by X, this yielded an invalid address of 0xffffffffc1800000, or, as the hardware would see it, 0xfc1800000. Reviewed By: ray Differential Revision: https://reviews.freebsd.org/D13332
This commit is contained in:
parent
e294a1269f
commit
97d24081da
@ -136,8 +136,8 @@ struct fb_info {
|
||||
fb_leave_t *leave;
|
||||
fb_setblankmode_t *setblankmode;
|
||||
|
||||
intptr_t fb_pbase; /* For FB mmap. */
|
||||
intptr_t fb_vbase; /* if NULL, use fb_write/fb_read. */
|
||||
uintptr_t fb_pbase; /* For FB mmap. */
|
||||
uintptr_t fb_vbase; /* if NULL, use fb_write/fb_read. */
|
||||
void *fb_priv; /* First argument for read/write. */
|
||||
const char *fb_name;
|
||||
uint32_t fb_flags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user