Hi,
our kernel crashes.
kernel size is 64KB, when it was smaller everything was OK.
If I debug with bochs, i have eip = 0xffffffff, so eip is wrong.
May be initialization of CS is wrong (if call is far then 64KB, gcc use far call) and after far call eip crashes.
may be our bootsector is wrong (attached).
Thanks
[attachment deleted by admin]
problem with kernel execution
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:problem with kernel execution
you should check the carry flag for errors after int 13h is called, otherwise, there are little chance that it works on real hardware ...
note that when your kernel was 64K-16 bytes, you were able to load it in the High Memory Area without any trouble, but as soon as it gets bigger, this technique doesn't work anymore: so the "end" of your kernel will overwrite the already-loaded bytes (as you blindly increase bx at each step).
2 practical solutions to your problem are:
- load the kernel at a lower address (in conventionnal memory)
- use the so-called 'unreal mode' (see OSRC or baby steps for details)
to copy loaded sectors to their final position above 1MB+64K-16 ...
note that when your kernel was 64K-16 bytes, you were able to load it in the High Memory Area without any trouble, but as soon as it gets bigger, this technique doesn't work anymore: so the "end" of your kernel will overwrite the already-loaded bytes (as you blindly increase bx at each step).
2 practical solutions to your problem are:
- load the kernel at a lower address (in conventionnal memory)
- use the so-called 'unreal mode' (see OSRC or baby steps for details)
to copy loaded sectors to their final position above 1MB+64K-16 ...