From 20b97ea7c0dbbdc13800e12ff5c86c00c4a342ec Mon Sep 17 00:00:00 2001 From: aqua Date: Fri, 8 Mar 2024 17:24:49 +0200 Subject: Bazel build --- i686/init.s | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 i686/init.s (limited to 'i686/init.s') diff --git a/i686/init.s b/i686/init.s deleted file mode 100644 index ad329bb..0000000 --- a/i686/init.s +++ /dev/null @@ -1,49 +0,0 @@ -.section .stack, "aw", @nobits -.global k_stack -.align 16 /* Stack on x86 must be 16-byte aligned according to System V ABI */ -k_stack_bottom: - .skip 16 * 1024 /* 16 kByte */ -k_stack: - -.section .pages, "aw", @nobits -.align 4096 -.global k_pagedir -k_pagedir: .skip 1024 * 4 -.global k_ptable0x300 -k_ptable0x300: .skip 1024 * 4 - -.section .text -.global k_init -.extern kmain -.extern gdt_install -.extern idt_install -k_init: - # kernel entry point, higher half - - # unmap the identity mapping as its no longer necessary - movl $0, k_pagedir + 0 * 4 - mov %cr3, %ecx # reload cr3 to force a TLB flush - mov %ecx, %cr3 - - # zero out the stack - mov $4096, %ecx # loop counter - mov $k_stack_bottom, %edi # start from the bottom - xor %edx, %edx # clear %edx -1: movl %edx, (%edi) # store %edx into address in %edi - addl $4, %edi # point to next address - loop 1b # loop according to %ecx - - mov $k_stack, %esp # point stack pointer to the stack - - # hardware init - 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 */ - cli # disable interrupts -h: hlt # wait for interrupt - jmp h # continue waiting for interrupt - -- cgit v1.2.1