From e282383b4eb2cdea2252077901d4eb7b8db4c636 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 9 Jun 2011 14:52:56 +0000 Subject: [PATCH] Map B_PAGE_SIZE, and not just acpi_description_header (was actually a regression), since the tables are bigger than that. Accessing unmapped memory was doing bad things on XenServer. Fixes ticket #7497. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42068 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/acpi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/boot/platform/bios_ia32/acpi.cpp b/src/system/boot/platform/bios_ia32/acpi.cpp index b7444097ff..7022be73dd 100644 --- a/src/system/boot/platform/bios_ia32/acpi.cpp +++ b/src/system/boot/platform/bios_ia32/acpi.cpp @@ -85,7 +85,7 @@ acpi_find_table(const char* signature) for (int32 j = 0; j < sNumEntries; j++, pointer++) { acpi_descriptor_header* header = (acpi_descriptor_header*) mmu_map_physical_memory(*pointer, - sizeof(acpi_descriptor_header), kDefaultPageFlags); + B_PAGE_SIZE, kDefaultPageFlags); if (header == NULL || strncmp(header->signature, signature, 4) != 0) { // not interesting for us @@ -93,7 +93,7 @@ acpi_find_table(const char* signature) signature, header != NULL ? header->signature : "null")); if (header != NULL) - mmu_free(header, sizeof(acpi_descriptor_header)); + mmu_free(header, B_PAGE_SIZE); continue; }