From cae70a5244ef44a8bd5f300dc89c313c3c0f4890 Mon Sep 17 00:00:00 2001
From: Andreas Faerber <andreas.faerber@web.de>
Date: Sun, 6 Jun 2010 05:08:24 +0200
Subject: [PATCH 1/5] Revert r36886
Fix compilation of insert_virtual_range_to_keep.
---
.../boot/platform/openfirmware/arch/ppc/mmu.cpp | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp
index a5429ef..259d75c 100644
a
|
b
|
extern "C" uint8 __text_begin;
|
40 | 40 | extern "C" uint8 _end; |
41 | 41 | |
42 | 42 | |
43 | | #if 0 |
44 | 43 | static status_t |
45 | 44 | insert_virtual_range_to_keep(void *start, uint32 size) |
46 | 45 | { |
47 | | return insert_memory_range(gKernelArgs.arch_args.virtual_ranges_to_keep, |
48 | | gKernelArgs.arch_args.num_virtual_ranges_to_keep, |
49 | | MAX_VIRTUAL_RANGES_TO_KEEP, start, size); |
| 46 | return insert_address_range(gKernelArgs.arch_args.virtual_ranges_to_keep, |
| 47 | &gKernelArgs.arch_args.num_virtual_ranges_to_keep, |
| 48 | MAX_VIRTUAL_RANGES_TO_KEEP, (addr_t)start, size); |
50 | 49 | } |
51 | | #endif |
52 | 50 | |
53 | 51 | |
54 | 52 | static status_t |
… |
… |
find_allocated_ranges(void *oldPageTable, void *pageTable,
|
297 | 295 | |
298 | 296 | // insert range in virtual ranges to keep |
299 | 297 | |
300 | | // TODO: ATM keeping the ranges doesn't make much sense. The OF usually identity |
301 | | // maps stuff, which means that RAM will most likely be mapped < 2 GB, which we |
302 | | // cannot preserve, since that doesn't lie in the kernel address space. Mappings |
303 | | // >= 2 GB are probably memory mapped hardware registers or the frame buffer |
304 | | // (i.e. non-RAM), which we don't handle correctly ATM. |
305 | | #if 0 |
306 | 298 | if (keepRange) { |
307 | 299 | if (insert_virtual_range_to_keep(map->virtual_address, |
308 | 300 | map->length) != B_OK) { |
… |
… |
find_allocated_ranges(void *oldPageTable, void *pageTable,
|
310 | 302 | gKernelArgs.num_virtual_allocated_ranges); |
311 | 303 | } |
312 | 304 | } |
313 | | #endif |
314 | 305 | |
315 | 306 | total += map->length; |
316 | 307 | } |