bdiGDB for BDI2000 (PowerPC 7440/7450/86xx) User Manual 39
© Copyright 1997-2015 by ABATRON AG Switzerland V 1.13
3.3.6 Embedded Linux MMU Support
The bdiGDB system supports Linux kernel debugging when MMU is on. The MMU configuration pa-
rameter enables this mode of operation. In this mode, all addresses received from GDB are assumed
to be virtual. Before the BDI accesses memory, it translates this address into a physical one based
on information found in the kernel/user page table.
In order to search the page tables, the BDI needs to know the start addresses of the first level page
table. The configuration parameter PTBASE defines the physical address where the BDI looks for
the virtual address of an array with two virtual addresses of first level page tables. The first one points
normally to the kernel page table, the second one can point to the current user page table. As long
as the base pointer or the first entry is zero, the BDI does only BAT and default translation. Default
translation maps a 256 Mbyte range starting at KERNELBASE to 0x00000000. The second page ta-
ble is only searched if its address is not zero and there was no match in the first one.
The pointer stucture is as follows:
PTBASE (physical address) ->
PTE pointer pointer(virtual or physical address) ->
PTE kernel pointer (virtual or physical address)
PTE user pointer (virtual or physical address)
Newer versions of "arch/ppc/kernel/head.S" support the automatic update of the BDI page table in-
formation structure. Search "head.S" for "abatron" and you will find the BDI specific extensions.
Extract from the configuration file:
[INIT]
......
WM32 0x000000f0 0x00000000 ;invalidate page table base
[TARGET]
....
MMU XLAT ;translate effective to physical address
PTBASE 0x000000f0 ;here is the pointer to the page table pointers