What bootloader does is:
- CPU init
- IVT init
- Hardware Init & finding kernel, loading (initialize external memory interface and filesystem)
- upload kernel from ROM to memort and then jmp to kernel’s entry
so… when bootloader upload kernel into memory space, what address it uploads to?? at zero? from the end??
if we look at it, its all relative address on compiled kernel, so I thought bootloader would place .data and .bss on some specific regions (like heap-area and stack-area on “normal” memory space)
but of course in bootloader level, there wouldnt be any memory mapping done or pagin happening, so kernel should be at some fixed address.
SO Kernel should be PIC(Position Independant Code), `.text`, `.data`, `.bss`is placed with fixed offset, so we can know location of all sections relative to some base address.
+)
If one process keep holding context without releasing it to kernel, unless there is external inturrupt or system call from that process, there is no way to steal back context from that process. So we need “timed inturrupt” or “watchdog” to monitor stall processes. (or maybe in multicore we can do this on other core?)