stay like hang my kernel
Posted: Sat Mar 27, 2004 5:44 am
hello everybody,
i had big problem which solve by pype.clicker , but
still new two problem arises
1) when i declare variable which write to video memory
it work within function but when i declare global it
dont display me which i print..
2) when i add function in kernel.c which it take 2 functions
properly but when i add third any function it give linking time
error... text header section not fit
in link script my virtual mem is 3GB and physical mem is 1mb
i am trying to wrap aroung the kernel so it start from 1mb
bits 32
extern main
global start
MULTIBOOT_PAGE_ALIGN equ 1<<0
MULTIBOOT_MEMORY_INFO equ 1<<1
MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO
CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
align 4
dd MULTIBOOT_HEADER_MAGIC
dd MULTIBOOT_HEADER_FLAGS
dd CHECKSUM
start :
lgdt [gdt_desc - 0xC0000000 + 0x100000]
jmp gdt_code:hi_jump
hi_jump :
mov eax, gdt_data
mov ds, eax
mov es, eax
mov fs, eax
mov gs, eax
mov ss, eax
call main
jmp $
gdt_desc :
GDTSIZE dw gdt_end - gdt - 1
GDTBASE dd gdt - 0xC0000000 + 0x100000
gdt :
gdt_null EQU $ - gdt
dd 0
dd 0
gdt_code EQU $ - gdt
dw 0FFFFh
dw 0
db 0
db 10011010b
db 11001111b
db 0
gdt_data EQU $ - gdt
dw 0FFFFh
dw 0
db 0
db 10010010b
db 11001111b
db 0
gdt_end:
:-\
please help me
waiting for reply
from
nil
i had big problem which solve by pype.clicker , but
still new two problem arises
1) when i declare variable which write to video memory
it work within function but when i declare global it
dont display me which i print..
2) when i add function in kernel.c which it take 2 functions
properly but when i add third any function it give linking time
error... text header section not fit
in link script my virtual mem is 3GB and physical mem is 1mb
i am trying to wrap aroung the kernel so it start from 1mb
bits 32
extern main
global start
MULTIBOOT_PAGE_ALIGN equ 1<<0
MULTIBOOT_MEMORY_INFO equ 1<<1
MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO
CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
align 4
dd MULTIBOOT_HEADER_MAGIC
dd MULTIBOOT_HEADER_FLAGS
dd CHECKSUM
start :
lgdt [gdt_desc - 0xC0000000 + 0x100000]
jmp gdt_code:hi_jump
hi_jump :
mov eax, gdt_data
mov ds, eax
mov es, eax
mov fs, eax
mov gs, eax
mov ss, eax
call main
jmp $
gdt_desc :
GDTSIZE dw gdt_end - gdt - 1
GDTBASE dd gdt - 0xC0000000 + 0x100000
gdt :
gdt_null EQU $ - gdt
dd 0
dd 0
gdt_code EQU $ - gdt
dw 0FFFFh
dw 0
db 0
db 10011010b
db 11001111b
db 0
gdt_data EQU $ - gdt
dw 0FFFFh
dw 0
db 0
db 10010010b
db 11001111b
db 0
gdt_end:
:-\
please help me
waiting for reply
from
nil