Use 64 bit addressing for ACPI on 32 bit builds.
32 bit builds with PAE are so much fun. It's like 64 bit without all the extra registers...
This commit is contained in:
@@ -15,8 +15,8 @@ typedef union acpi_object_type acpi_object_type;
|
|||||||
|
|
||||||
#define B_ACPI_MODULE_NAME "bus_managers/acpi/v1"
|
#define B_ACPI_MODULE_NAME "bus_managers/acpi/v1"
|
||||||
|
|
||||||
typedef addr_t acpi_physical_address;
|
typedef phys_addr_t acpi_physical_address;
|
||||||
typedef addr_t acpi_io_address;
|
typedef phys_addr_t acpi_io_address;
|
||||||
typedef size_t acpi_size;
|
typedef size_t acpi_size;
|
||||||
|
|
||||||
/* Actually a ptr to a NS Node */
|
/* Actually a ptr to a NS Node */
|
||||||
|
|||||||
@@ -469,8 +469,9 @@ AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS where, ACPI_SIZE length)
|
|||||||
{
|
{
|
||||||
#ifdef _KERNEL_MODE
|
#ifdef _KERNEL_MODE
|
||||||
void *there;
|
void *there;
|
||||||
area_id area = map_physical_memory("acpi_physical_mem_area", where, length,
|
area_id area = map_physical_memory("acpi_physical_mem_area",
|
||||||
B_ANY_KERNEL_ADDRESS, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, &there);
|
(phys_addr_t)where, length, B_ANY_KERNEL_ADDRESS,
|
||||||
|
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, &there);
|
||||||
|
|
||||||
DEBUG_FUNCTION_F("addr: 0x%08lx; length: %lu; mapped: %p; area: %ld",
|
DEBUG_FUNCTION_F("addr: 0x%08lx; length: %lu; mapped: %p; area: %ld",
|
||||||
(addr_t)where, (size_t)length, there, area);
|
(addr_t)where, (size_t)length, there, area);
|
||||||
@@ -1050,7 +1051,7 @@ ACPI_STATUS
|
|||||||
AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS address, UINT64 *value, UINT32 width)
|
AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS address, UINT64 *value, UINT32 width)
|
||||||
{
|
{
|
||||||
#ifdef _KERNEL_MODE
|
#ifdef _KERNEL_MODE
|
||||||
if (vm_memcpy_from_physical(value, (addr_t)address, width / 8, false)
|
if (vm_memcpy_from_physical(value, (phys_addr_t)address, width / 8, false)
|
||||||
!= B_OK) {
|
!= B_OK) {
|
||||||
return AE_ERROR;
|
return AE_ERROR;
|
||||||
}
|
}
|
||||||
@@ -1078,7 +1079,7 @@ ACPI_STATUS
|
|||||||
AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS address, UINT64 value, UINT32 width)
|
AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS address, UINT64 value, UINT32 width)
|
||||||
{
|
{
|
||||||
#ifdef _KERNEL_MODE
|
#ifdef _KERNEL_MODE
|
||||||
if (vm_memcpy_to_physical((addr_t)address, &value, width / 8, false)
|
if (vm_memcpy_to_physical((phys_addr_t)address, &value, width / 8, false)
|
||||||
!= B_OK) {
|
!= B_OK) {
|
||||||
return AE_ERROR;
|
return AE_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,11 +181,6 @@ struct mutex;
|
|||||||
#define ACPI_MACHINE_WIDTH 64
|
#define ACPI_MACHINE_WIDTH 64
|
||||||
#else
|
#else
|
||||||
#define ACPI_MACHINE_WIDTH 32
|
#define ACPI_MACHINE_WIDTH 32
|
||||||
/* TODO: Temporary fix for #12377
|
|
||||||
Use 32 bit addresses to match addr_t for now.
|
|
||||||
*/
|
|
||||||
#define ACPI_32BIT_PHYSICAL_ADDRESS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user