Who or how changes processor modes, processor states, CPU privilege levels?

I read about Linux device drivers, which mentions that the kernel runs in privileged mode, which gives it unlimited access to all H / W. How to prevent a user program from installing a CPU in this mode?

+5
source share
2 answers

If you want to understand this stuff, one of the best ways to approach it - follow the Linux boot process kernel boot process through the code. For example, suppose you are using x86-based Linux. What happens at boot time is that the BIOS gives the loader control. The bootloader in tern gives kernel control.

​​ . - . /arch/x 86/boot/header.S

/arch/x 86/boot/main.c. go_to_protected_mode()

/arch/x 86/boot/pm.c

, , , , . - , .

+6

- . , . , ..... : , ... .

Billmic

+1

All Articles