diff options
Diffstat (limited to 'i686')
-rw-r--r-- | i686/init.s | 9 | ||||
-rw-r--r-- | i686/meson.build | 9 | ||||
-rw-r--r-- | i686/toolchain.ini | 18 | ||||
-rw-r--r-- | i686/toolchain.mk | 2 |
4 files changed, 10 insertions, 28 deletions
diff --git a/i686/init.s b/i686/init.s index 92710df..c0c25c0 100644 --- a/i686/init.s +++ b/i686/init.s @@ -15,6 +15,9 @@ k_ptable0x300: .skip 1024 * 4 .section .text .global k_init .extern kmain +.extern pic_init +.extern gdt_install +.extern idt_install k_init: # kernel entry point, higher half @@ -33,6 +36,12 @@ k_init: mov $k_stack, %esp # point stack pointer to the stack + # hardware init + call pic_init # Programmable Interrupt Controller + call gdt_install # Global Descriptor Table + call idt_install # Interrupt Descriptor Table + + # jump into kernel call kmain /* If the system has nothing more to do, put it in an infinite loop */ diff --git a/i686/meson.build b/i686/meson.build deleted file mode 100644 index f6bed8e..0000000 --- a/i686/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -arch = declare_dependency( - sources: ['boot.S', 'init.s', - 'gdt.c', 'lgdt.c', 'lidt.c' - ], - include_directories: 'include', - compile_args: '-mgeneral-regs-only' -) - -test('GDT', executable('gdt', ['test/gdt.c', 'gdt.c'], include_directories: 'include', native: true)) diff --git a/i686/toolchain.ini b/i686/toolchain.ini deleted file mode 100644 index 5114cfe..0000000 --- a/i686/toolchain.ini +++ /dev/null @@ -1,18 +0,0 @@ -[constants] -arch = 'i686' - -[host_machine] -system = 'none' -cpu_family = 'x86' -cpu = 'i686' -endian = 'little' - -[binaries] -c = 'i686-elf-gcc' -ar = 'i686-elf-ar' -strip = 'i686-elf-strip' - -[built-in options] -c_args = ['-ffreestanding'] -c_link_args = ['-nostdlib'] - diff --git a/i686/toolchain.mk b/i686/toolchain.mk index 5842584..7bef9bc 100644 --- a/i686/toolchain.mk +++ b/i686/toolchain.mk @@ -6,7 +6,7 @@ CCFLAGS = -Wall -Wextra -Wpedantic -fanalyzer -ffreestanding -std=gnu11 -mgenera LD = i686-elf-ld LDFLAGS = -static -nostdlib AR = i686-elf-ar -ARFLAGS = -ruv +ARFLAGS = -crus STRIP = i686-elf-strip |