@ -249,10 +249,88 @@ When the bootloader transfers control to the kernel, it starts at:
X + sizeof(KernelBootSector) + 1
X + sizeof(KernelBootSector) + 1
```
```
where `X` is the address of the kernel boot sector being loaded. In my case, `X` is `0x10000`, as we can see in a [memory dump](https://github.com/0xAX/linux-insides/issues/758#issuecomment-732536804):
where `X` is the address of the kernel boot sector being loaded. In my case, `X` is `0x10000`, as we can see in a memory dump:
![kernel first address](images/kernel_first_address.png)
![kernel first address](images/kernel_first_address.png)
Here we can see the memory address of the entry point, which is `0x0000000001000000`. Let's go ahead.
Before trying to debug the kernel, please see [Booting a Custom Linux Kernel in QEMU and Debugging It With GDB](http://nickdesaulniers.github.io/blog/2018/10/24/booting-a-custom-linux-kernel-in-qemu-and-debugging-it-with-gdb/)
The bootloader has now loaded the Linux kernel into memory, filled the header fields, and then jumped to the corresponding memory address. We now move directly to the kernel setup code.
The bootloader has now loaded the Linux kernel into memory, filled the header fields, and then jumped to the corresponding memory address. We now move directly to the kernel setup code.