Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootloader transfers control to the kernel, The address calculation has a mistake. #846

Open
YaowenGuo opened this issue Apr 1, 2024 · 0 comments

Comments

@YaowenGuo
Copy link

Describe the bug
The doc description bootloader jump to kernel at When the bootloader transfers control to the kernel, it starts at:

X + sizeof(KernelBootSector) + 1

I think it should not add ! It should be "X + sizeof(KernelBootSector)". The "MZ" magic is at address 0x10000, and the _start is offset 512 byte, which should add 0x200, So it's address should at 0x10200. By viewing memory data at 0x10200.

00010200: eb6a 4864 7253 0f02 0000 0000 0010 9442  .jHdrS.........B
00010210: b081 0080 0000 1000 0000 0000 0000 0000  ................
00010220: 0000 0000 00fe 0000 0000 0200 ffff ff7f  ................

The eb which is the _start: .byte 0xeb.

Screenshots
Data at 0x10200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant