* Clean up translation debug output
* Few small style cleanups * No functional change git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42458 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5571551261
commit
a1a978ff21
@ -115,8 +115,7 @@ is_virtual_allocated(void *address, size_t size)
|
||||
addr_t foundBase;
|
||||
return !get_free_address_range(gKernelArgs.virtual_allocated_range,
|
||||
gKernelArgs.num_virtual_allocated_ranges, (addr_t)address, size,
|
||||
&foundBase)
|
||||
|| foundBase != (addr_t)address;
|
||||
&foundBase) || foundBase != (addr_t)address;
|
||||
}
|
||||
|
||||
|
||||
@ -127,8 +126,7 @@ is_physical_allocated(void *address, size_t size)
|
||||
return !get_free_physical_address_range(
|
||||
gKernelArgs.physical_allocated_range,
|
||||
gKernelArgs.num_physical_allocated_ranges, (addr_t)address, size,
|
||||
&foundBase)
|
||||
|| foundBase != (addr_t)address;
|
||||
&foundBase) || foundBase != (addr_t)address;
|
||||
}
|
||||
|
||||
|
||||
@ -277,7 +275,8 @@ find_allocated_ranges(void *oldPageTable, void *pageTable,
|
||||
}
|
||||
|
||||
if (map->virtual_address == pageTable) {
|
||||
dprintf("found page table\n");
|
||||
dprintf("%i: found page table at va %p\n", i,
|
||||
map->virtual_address);
|
||||
*_physicalPageTable
|
||||
= (page_table_entry_group *)map->physical_address;
|
||||
keepRange = false;
|
||||
@ -285,7 +284,8 @@ find_allocated_ranges(void *oldPageTable, void *pageTable,
|
||||
}
|
||||
if ((addr_t)map->physical_address <= 0x100
|
||||
&& (addr_t)map->physical_address + map->length >= 0x1000) {
|
||||
dprintf("found exception handlers\n");
|
||||
dprintf("%i: found exception handlers at va %p\n", i,
|
||||
map->virtual_address);
|
||||
*_exceptionHandlers = map->virtual_address;
|
||||
keepRange = false;
|
||||
// we keep it explicitely anyway
|
||||
@ -310,6 +310,9 @@ find_allocated_ranges(void *oldPageTable, void *pageTable,
|
||||
// insert range in virtual ranges to keep
|
||||
|
||||
if (keepRange) {
|
||||
TRACE("%i: keeping free range starting at va %p\n", i,
|
||||
map->virtual_address);
|
||||
|
||||
if (insert_virtual_range_to_keep(map->virtual_address,
|
||||
map->length) != B_OK) {
|
||||
dprintf("cannot map virtual range to keep "
|
||||
@ -320,14 +323,14 @@ find_allocated_ranges(void *oldPageTable, void *pageTable,
|
||||
|
||||
total += map->length;
|
||||
}
|
||||
dprintf("total mapped: %" B_PRIu32 "\n", total);
|
||||
dprintf("total size kept: %" B_PRIu32 "\n", total);
|
||||
|
||||
// remove the boot loader code from the virtual ranges to keep in the
|
||||
// kernel
|
||||
if (remove_virtual_range_to_keep(&__text_begin, &_end - &__text_begin)
|
||||
!= B_OK) {
|
||||
dprintf("find_allocated_ranges(): Failed to remove boot loader range "
|
||||
"from virtual ranges to keep.\n");
|
||||
dprintf("%s: Failed to remove boot loader range "
|
||||
"from virtual ranges to keep.\n", __func__);
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
@ -688,7 +691,10 @@ arch_mmu_init(void)
|
||||
oldTable = table;
|
||||
|
||||
bool realMode = false;
|
||||
|
||||
// TODO: read these values out of the OF settings
|
||||
// NOTE: I've only ever seen -1 (0xffffffff) for these values in
|
||||
// OpenFirmware.. even after loading the bootloader -- Alex
|
||||
addr_t realBase = 0;
|
||||
addr_t realSize = 0x400000;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user