realigned assembly a bit
git-svn-id: svn://anubis/hos/trunk@18 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
parent
1b0da72e5a
commit
8fe8d78051
@ -14,9 +14,11 @@
|
|||||||
|
|
||||||
%define PAGE_SIZE 0x1000 ; 4KB pages
|
%define PAGE_SIZE 0x1000 ; 4KB pages
|
||||||
|
|
||||||
; Get these symbols from the linker
|
; Symbols from the linker
|
||||||
extern _end, _bss
|
extern _end, _bss
|
||||||
|
|
||||||
|
; Symbols from C
|
||||||
|
extern k_mbsave
|
||||||
|
|
||||||
;-------------------------------------------------------
|
;-------------------------------------------------------
|
||||||
[section .text]
|
[section .text]
|
||||||
@ -30,7 +32,7 @@ start:
|
|||||||
;**************************************************************************
|
;**************************************************************************
|
||||||
;* Multiboot header data block *
|
;* Multiboot header data block *
|
||||||
;**************************************************************************
|
;**************************************************************************
|
||||||
align 4
|
align 4
|
||||||
multiboot_header:
|
multiboot_header:
|
||||||
dd MULTIBOOT_HEADER_MAGIC ; magic
|
dd MULTIBOOT_HEADER_MAGIC ; magic
|
||||||
dd MULTIBOOT_HEADER_FLAGS ; flags
|
dd MULTIBOOT_HEADER_FLAGS ; flags
|
||||||
@ -69,6 +71,15 @@ segmented_start:
|
|||||||
mov ax, 0x0700 + 'b'
|
mov ax, 0x0700 + 'b'
|
||||||
mov [VIRTUAL_OFFSET+0xB8000+160*8+1*2], ax
|
mov [VIRTUAL_OFFSET+0xB8000+160*8+1*2], ax
|
||||||
|
|
||||||
|
; add ebx, VIRTUAL_OFFSET
|
||||||
|
; push eax
|
||||||
|
; push ebx ; pointer to multiboot info struct
|
||||||
|
; call k_mbsave
|
||||||
|
; add esp, 8
|
||||||
|
|
||||||
|
; mov ax, 0x0700 + 'c'
|
||||||
|
; mov [VIRTUAL_OFFSET+0xB8000+160*8+2*2], ax
|
||||||
|
|
||||||
idle_loop:
|
idle_loop:
|
||||||
hlt
|
hlt
|
||||||
jmp idle_loop
|
jmp idle_loop
|
||||||
@ -87,23 +98,23 @@ gdt_tmp32: ; 0 = null descriptor
|
|||||||
; a base of 0x2000_0000, when added to 0xE000_0000 will produce
|
; a base of 0x2000_0000, when added to 0xE000_0000 will produce
|
||||||
; 0x0000_0000 physical before paging in effect
|
; 0x0000_0000 physical before paging in effect
|
||||||
KERNEL_CODE_32_TMP_SEG equ $-gdt_tmp32 ; 8
|
KERNEL_CODE_32_TMP_SEG equ $-gdt_tmp32 ; 8
|
||||||
db 0xff ;limit 7:0
|
db 0xff ; limit 7:0
|
||||||
db 0xff ;limit 15:8
|
db 0xff ; limit 15:8
|
||||||
db 0x00 ;base 7:0
|
db 0x00 ; base 7:0
|
||||||
db 0x00 ;base 15:8
|
db 0x00 ; base 15:8
|
||||||
db 0x00 ;base 23:16
|
db 0x00 ; base 23:16
|
||||||
db 0x9a ;access
|
db 0x9a ; access
|
||||||
db 0xcf ;flags / limit 19:16
|
db 0xcf ; flags / limit 19:16
|
||||||
db 0x20 ;base 31:24
|
db 0x20 ; base 31:24
|
||||||
|
|
||||||
KERNEL_DATA_32_TMP_SEG equ $-gdt_tmp32 ; 16
|
KERNEL_DATA_32_TMP_SEG equ $-gdt_tmp32 ; 16
|
||||||
db 0xff ;limit 7:0
|
db 0xff ; limit 7:0
|
||||||
db 0xff ;limit 15:8
|
db 0xff ; limit 15:8
|
||||||
db 0x00 ;base 7:0
|
db 0x00 ; base 7:0
|
||||||
db 0x00 ;base 15:8
|
db 0x00 ; base 15:8
|
||||||
db 0x00 ;base 23:16
|
db 0x00 ; base 23:16
|
||||||
db 0x92 ;access
|
db 0x92 ; access
|
||||||
db 0xcf ;flags / limit 19:16
|
db 0xcf ; flags / limit 19:16
|
||||||
db 0x20 ;base 31:24
|
db 0x20 ; base 31:24
|
||||||
|
|
||||||
gdt_end_tmp32:
|
gdt_end_tmp32:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user