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
This commit is contained in:
Ingo Weinhold 2005-12-30 22:10:54 +00:00
parent 2de437fa29
commit 4c1fca768d

View File

@ -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);