poke: use phys_addr_t for mem_map_args's physical_address field
This is needed to fix usage of POKE_GET_PHYSICAL_ADDRESS on x86 32 bits (with PAE). Change-Id: Ic00185ec7fcf9b6666ad6169a752d8b8edd2b61b Reviewed-on: https://review.haiku-os.org/c/haiku/+/5975 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
42aa87de9e
commit
59b54f3810
@@ -60,7 +60,7 @@ typedef struct {
|
|||||||
uint32 signature;
|
uint32 signature;
|
||||||
area_id area;
|
area_id area;
|
||||||
const char* name;
|
const char* name;
|
||||||
void* physical_address;
|
phys_addr_t physical_address;
|
||||||
size_t size;
|
size_t size;
|
||||||
uint32 flags;
|
uint32 flags;
|
||||||
uint32 protection;
|
uint32 protection;
|
||||||
|
|||||||
@@ -285,8 +285,7 @@ poke_control(void* cookie, uint32 op, void* arg, size_t length)
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
result = get_memory_map(ioctl.address, ioctl.size, &table, 1);
|
result = get_memory_map(ioctl.address, ioctl.size, &table, 1);
|
||||||
ioctl.physical_address = (void*)(addr_t)table.address;
|
ioctl.physical_address = table.address;
|
||||||
// TODO: mem_map_args::physical_address should be phys_addr_t!
|
|
||||||
ioctl.size = table.size;
|
ioctl.size = table.size;
|
||||||
if (user_memcpy(arg, &ioctl, sizeof(mem_map_args)) != B_OK)
|
if (user_memcpy(arg, &ioctl, sizeof(mem_map_args)) != B_OK)
|
||||||
return B_BAD_ADDRESS;
|
return B_BAD_ADDRESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user