From 22bc93e31c05ea3cc91ae03606ec7a673b805a1d Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 28 Dec 2005 19:47:50 +0000 Subject: [PATCH] arch_mmu_allocate() translated the protection flags incorrectly (B_WRITE_AREA to read-only). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15697 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp index 2979da7a96..da6e8790ab 100644 --- a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp +++ b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp @@ -443,10 +443,14 @@ arch_mmu_allocate(void *virtualAddress, size_t size, uint8 protection) size = ROUNDUP(size, B_PAGE_SIZE); // set protection to WIMGxPP: -I--xPP + // PP: 00 - no access + // 01 - read only + // 10 - read/write + // 11 - read only if (protection & B_WRITE_AREA) - protection = 0x23; - else protection = 0x22; + else + protection = 0x21; if (virtualAddress == NULL) { // find free address large enough to hold "size" @@ -633,6 +637,7 @@ static int callback(struct of_arguments *args) { const char *name = args->name; +printf("CALLBACK: %s\n", name); if (!strcmp(name, "map")) return map_callback(args);