Stack register value in the kernel setup code

Alexander Kuleshov kuleshovmail at gmail.com
Wed Dec 24 04:23:15 EST 2014


Hello,

I runn kernel with grub in qemu, connected with gdb and put break
point to 0x10200 (to this jump -
https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S#L297)

Registers value are following:

eax            0x1020    4128

ecx            0x0    0

edx            0x100000    1048576

ebx            0x0    0

esp            0xf7f4    0xf7f4

ebp            0x0    0x0

esi             0x1ac7c    109692

edi             0x0    0

eip             0x68    0x68

eflags         0x2    [ ]

cs              0x1020    4128

ss              0x1000    4096

ds              0x1000    4096

es              0x1000    4096

fs               0x1000    4096

gs              0x1000    4096

Seems that segment registers are corret, but why esp is 0xf7f4?

Thank you.



More information about the Kernelnewbies mailing list