Module defs

Module defs 

Source
Expand description

system level definitions

Modules§

ExternSyms
HWDefs
Limits
Mem
memory definitions

Structs§

IntNumber
interrut numbers. Not complete, add more when needed (see docs/interrupt.txt)

Statics§

mb_info_pm_addr
physical address of multiboot info block. This value is set at run time by init asm code. Both values are safe to read, but mb_info_pm_addr must be converted to the virtual mapping via P2V before dereferencing.
mb_magic
multiboot magic value, it must be 0x2BAD8002. This value is set at runtime by init asm code. CARE: the release build will not treat these as volatile and they may hardcode the initial value (0) because they sees “static const zero”. Therefore when reading them must do a volatile read.

Functions§

P2V
physical address to virtual. reverse of V2P
V2P
convert VA <-> PA wrt. the kernel id mapping from 0xffff_8000_0000_0000 ~ 0xffff_800f_ffff_ffff virtual to 0x0 ~ 0xf_ffff_ffff physical (64G)
is_aligned_4k
rounddown_4k
roundup_4k