Author Topic: What register needs to be set for booting linux kernel in x86 environment  (Read 13099 times)

Offline TOMAR

  • Jr. Member
  • *
  • Posts: 4
I am new to bootloader stuff and going through u-boot code .looking into file zimage.c file with boot_zimage function and following are comments from boot_zimage function

/*Set %ebx, %ebp, and %edi to 0, %esi to point to the boot_params * structure, and then jump to the kernel. We assume that %cs is * 0x10, 4GB flat, and read/execute, and the data segments are 0x18, * 4GB flat, and read/write. U-boot is setting them up that way for * itself in arch/i386/cpu/cpu.c. */

Now these comment says set ebp,ebx and edi resgister to value 0 and now my question is everytime i need to set these register to 0 before giving control to linux kernel  in case of x86 architecture., or its very much uboot specific.

Is it a starndard protocol( Set %ebx, %ebp, and %edi to 0, %esi to point to the boot_params * structure, and then jump to the kernel).which every boot loader has to follow to boot linux/x86 kernel??