remove obsolete startup.s modifications
This commit is contained in:
@ -18,28 +18,6 @@
|
|||||||
.global os_stack
|
.global os_stack
|
||||||
.size os_stack, 4096
|
.size os_stack, 4096
|
||||||
|
|
||||||
# NOTE: New Start
|
|
||||||
|
|
||||||
# .section .gdt
|
|
||||||
# gdt_start:
|
|
||||||
# .quad 0x0000000000000000 # null descriptor
|
|
||||||
# .quad 0x00cf9a000000ffff # code segment descriptor: base=0, limit=4GB, 32-bit code
|
|
||||||
# .quad 0x00cf92000000ffff # data segment descriptor: base=0, limit=4GB, 32-bit data
|
|
||||||
# gdt_end:
|
|
||||||
#
|
|
||||||
# gdt_descriptor:
|
|
||||||
# .word gdt_end - gdt_start - 1 # limit
|
|
||||||
# .long gdt_start # base
|
|
||||||
#
|
|
||||||
# .section .idt
|
|
||||||
# idt_table:
|
|
||||||
# .space 256*8 # 256 entries x 8 bytes each
|
|
||||||
# idt_descriptor:
|
|
||||||
# .word 256*8-1 # limit
|
|
||||||
# .long idt_table # base
|
|
||||||
|
|
||||||
# NOTE: New End
|
|
||||||
|
|
||||||
#.Lstack_bottom:
|
#.Lstack_bottom:
|
||||||
os_stack:
|
os_stack:
|
||||||
.byte 0
|
.byte 0
|
||||||
@ -57,8 +35,6 @@ os_stack:
|
|||||||
.global _start
|
.global _start
|
||||||
.type _start, @function
|
.type _start, @function
|
||||||
_start:
|
_start:
|
||||||
# NOTE: Old Start
|
|
||||||
|
|
||||||
# Welcome to kernel mode!
|
# Welcome to kernel mode!
|
||||||
# To set up a stack, we simply set the esp register to point to the top of
|
# To set up a stack, we simply set the esp register to point to the top of
|
||||||
# our stack (as it grows downwards).
|
# our stack (as it grows downwards).
|
||||||
@ -77,34 +53,6 @@ _start:
|
|||||||
.Lhang:
|
.Lhang:
|
||||||
jmp .Lhang
|
jmp .Lhang
|
||||||
|
|
||||||
# NOTE: Old End
|
|
||||||
|
|
||||||
# NOTE: New Start
|
|
||||||
|
|
||||||
# cli
|
|
||||||
#
|
|
||||||
# lgdt gdt_descriptor # GDT
|
|
||||||
# lidt idt_descriptor # IDT Stub
|
|
||||||
#
|
|
||||||
# # set up segment registers (flat 32-bit)
|
|
||||||
# movw $0x10, %ax
|
|
||||||
# movw %ax, %ds
|
|
||||||
# movw %ax, %es
|
|
||||||
# movw %ax, %fs
|
|
||||||
# movw %ax, %gs
|
|
||||||
# movw %ax, %ss
|
|
||||||
# movl $.Lstack_top, %esp # set stack
|
|
||||||
#
|
|
||||||
# # call main C function
|
|
||||||
# call os_main
|
|
||||||
#
|
|
||||||
# cli
|
|
||||||
# hlt
|
|
||||||
# .Lhang:
|
|
||||||
# jmp .Lhang
|
|
||||||
|
|
||||||
# NOTE: New End
|
|
||||||
|
|
||||||
# Set the size of the _start symbol to the current location '.' minus its start.
|
# Set the size of the _start symbol to the current location '.' minus its start.
|
||||||
# This is useful when debugging or when you implement call tracing.
|
# This is useful when debugging or when you implement call tracing.
|
||||||
.size _start, . - _start
|
.size _start, . - _start
|
||||||
|
|||||||
Reference in New Issue
Block a user