From 4c1fca768d6d3d32eb4d4c0108e062e041682583 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 30 Dec 2005 22:10:54 +0000 Subject: [PATCH] Maybe I miss something, but I don't see the reason for the PPC arch_mmu_allocate() to set the "cache inhibited" flag. One negative effect was that for such memory the lwarx instruction (used by the atomic_*() functions) does "... cause the system data storage error handle to be invoked...", as the architecture specification puts it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15759 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp index 974ae1af5a..da8f1aae57 100644 --- a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp +++ b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp @@ -480,16 +480,16 @@ arch_mmu_allocate(void *_virtualAddress, size_t size, uint8 _protection, // we only know page sizes size = ROUNDUP(size, B_PAGE_SIZE); - // set protection to WIMGNPP: -I---PP + // set protection to WIMGNPP: -----PP // PP: 00 - no access // 01 - read only // 10 - read/write // 11 - read only uint8 protection = 0; if (_protection & B_WRITE_AREA) - protection = 0x22; + protection = 0x02; else - protection = 0x21; + protection = 0x01; // find free address large enough to hold "size" void *virtualAddress = find_free_virtual_range(_virtualAddress, size);