f9micro / f9-kernel

An efficient and secure microkernel built for ARM Cortex-M cores, inspired by L4
Other
679 stars 145 forks source link

kdb: Add MPU dump #131

Closed louisom closed 7 years ago

louisom commented 7 years ago

For education reason, we can add MPU dump in kdb to observe MPU status interactively.

This commit simply make an warp function kdb_dump_mpu for mpu_dump, since mpu_dump already print the title, I slightly change the parameter of mpu_dump to change this behavior.

The result will look like this:

    ## KDB ##
    commands:
    K: print kernel tables
    e: dump ktimer events
    n: show timer (now)
    s: show softirqs
    t: dump threads
    M: dump MPU status
    m: dump memory pools
    a: dump address spaces
    p: show sampling
    ----------------

## KDB ##
-------MPU------
b:20011800, sz:2**8, attr:1300
b:20011900, sz:2**8, attr:1300
b:20011a00, sz:2**8, attr:1300
b:20010800, sz:2**11, attr:0300
b:20012400, sz:2**8, attr:1300
b:2000f800, sz:2**11, attr:0300
b:20011600, sz:2**8, attr:1300
b:20010000, sz:2**10, attr:0300
----------------