diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-08 12:32:46 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-08 12:32:46 +0200 |
commit | 8b04f07a43ae14f224d2ddec9570d4e565e8dfdc (patch) | |
tree | 392bab2d6777ce524cf70aa17a0be0775fc881f5 /src | |
parent | 4ec0b9a98f124daaebaf13b5e7dfc5e8350a1ae9 (diff) | |
download | abaos-8b04f07a43ae14f224d2ddec9570d4e565e8dfdc.tar.gz abaos-8b04f07a43ae14f224d2ddec9570d4e565e8dfdc.tar.bz2 |
retested with all 3 C compilers
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 4 | ||||
-rw-r--r-- | src/boot.asm | 4 | ||||
-rw-r--r-- | src/kernel.c | 2 | ||||
-rw-r--r-- | src/kernel.h | 1 | ||||
-rw-r--r-- | src/stage1_functions.asm | 2 |
5 files changed, 7 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile index f258160..934ec7b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,10 +13,10 @@ all: image.bin kernel.sym # + M * 512 (M is currently 7) = 3144 for kernel.bin # + 1 * 512 = 512 for magic.bin # (M + N + 1 is the number of sectors to be read in stage 2, as stage 1 -# loads only the first sector, so adapt NOF_LOAD_SECTORS to 32) +# loads only the first sector, so adapt NOF_LOAD_SECTORS to 36) image.bin: boot.bin kernel.bin magic.bin cat boot.bin kernel.bin > image.tmp - truncate -s 16384 image.tmp + truncate -s 18432 image.tmp cat image.tmp magic.bin > image.bin boot.bin: boot.asm boot_gdt.asm stage1_functions.asm stage2_functions.asm stage2_switch_mode.asm stage2_a20.asm diff --git a/src/boot.asm b/src/boot.asm index 8dbbb8a..9620fcc 100644 --- a/src/boot.asm +++ b/src/boot.asm @@ -152,7 +152,7 @@ BEGIN_PROTECTED_MODE: call pm_print_newline ; call our kernel - call c_entry + call kernel_main ; restore cursor variables from VGA hardware call read_hardware_vga_cursor @@ -188,4 +188,4 @@ MESSAGE_HALTED: times 2048-($-$$) db 0 ; position is 0x8400 now for the C entry -c_entry: +kernel_main: diff --git a/src/kernel.c b/src/kernel.c index 9202325..9f4fae5 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -25,7 +25,7 @@ static bool terminate = false; // must be first entry in kernel.bin (0x8400) as stage 2 of // the boot loader expects the entry point to be here! -void entry( void ) +void kernel_main( void ) { serial_t serial; serial_init( &serial ); diff --git a/src/kernel.h b/src/kernel.h index 740e1ef..dc23fd6 100644 --- a/src/kernel.h +++ b/src/kernel.h @@ -3,6 +3,7 @@ #include "stdio.h" +void kernel_main( void ); void kernel_panic( const char *format, ... ); void kernel_halt( void ); diff --git a/src/stage1_functions.asm b/src/stage1_functions.asm index 293f105..ddb1c76 100644 --- a/src/stage1_functions.asm +++ b/src/stage1_functions.asm @@ -2,7 +2,7 @@ ; 3 * 512 for bootloader stage2 and the kernel code ; (note: the first sector gets loaded by the BIOS, so ; subtract 1 here!) -NOF_LOAD_SECTORS equ 32 +NOF_LOAD_SECTORS equ 36 ; IN bx: begin of memory area to dump ; IN ax: number of words to dump |