diff options
author | Joursoir <chat@joursoir.net> | 2022-09-27 18:59:00 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-10-04 02:34:12 +0300 |
commit | 14c0596d40f5b02153ce379ea6060bd82120f4f9 (patch) | |
tree | 58d633b4aa883c7e9a52cbdf6431263a77458eeb /arch/x86/boot/head.s | |
parent | 3955de98fa26ca847041f5fcb50268927b44a208 (diff) | |
download | mfsos-14c0596d40f5b02153ce379ea6060bd82120f4f9.tar.gz mfsos-14c0596d40f5b02153ce379ea6060bd82120f4f9.tar.bz2 mfsos-14c0596d40f5b02153ce379ea6060bd82120f4f9.zip |
move our bootloader to special directory
Diffstat (limited to 'arch/x86/boot/head.s')
-rw-r--r-- | arch/x86/boot/head.s | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/arch/x86/boot/head.s b/arch/x86/boot/head.s deleted file mode 100644 index d24e36c..0000000 --- a/arch/x86/boot/head.s +++ /dev/null @@ -1,35 +0,0 @@ -/* - head.s is loaded at 0x1000 (by second stage), its main goal - is run 32-bit startup code. - - After that manipulations it jumps to kernel written by C -*/ - -.code32 # Tell GAS to generate 32 bit code -.extern kernel_main - -.set CODESEG, 0x08 -.set DATASEG, 0x10 - -.global _start -_start: - mov $DATASEG, %ax # Point segment registers to the - mov %ax, %ds # data selector we defined in our GDT - mov %ax, %es - mov %ax, %ss - mov %ax, %fs - mov %ax, %gs - - mov $0x90000, %ebp # Update stack position so it is right - mov %ebp, %esp # at the top of the free space. - -check_a20: - mov $0x112345, %edi # Odd megabyte address - mov $0x012345, %esi # Even megabyte address - mov %esi, (%esi) # If A20 line is disabled two pointers - mov %edi, (%edi) # would point to the address 0x012345 - cmpsd # Compare values at addresses - je . # If equivalent, loop forever - - call kernel_main - jmp . # infinite loop |