Amit Singh Tomar
Amit Singh Tomar

Reputation: 8610

How booting Linux on x86 is different from booting Linux on ARM

I am trying to understand linux boot proces on x86 and ARM archtectiure and wanted to know the difference between booting linux on x86 and booting linux on ARM.

I have gone through the linux boot protocol on x86 and find that kernel is loaded in two steps.

https://www.kernel.org/doc/Documentation/x86/boot.txt

1) Load real mode kernel code with allocation for command line parameters.

2) Load the protected mode(non-real) kernel code.

Is it beacause of the unusual address space of x86 archtectiure?

I don't see such behaviour on ARM side where linux Image is loaded as a whole into CPU address mapped to logical kernel space at contiguous location.

Could anyone provide me the insight of linux booting process on both these architecture?

Upvotes: 0

Views: 1230

Answers (1)

Chris Desjardins
Chris Desjardins

Reputation: 2716

The reason for the two step process on x86 is because of the real mode switch you mentioned. In order to maintain backwards compatibility with "real" x86 software all x86 processors initially come up in real mode and indeed everything is quite limited in this mode (addressable memory, register sizes, etc... ). So a minimal load is initially used which does little more than switch to protected mode, work around some old hacks (http://www.win.tue.nl/~aeb/linux/kbd/A20.html) and then load a proper OS.

Arm is not hindered by this type of thing because they started out later than Intel as a 32bit machine so there is less legacy crap to deal with on arm.

Upvotes: 1

Related Questions