Digital Stronghold - Software Engineering Blog




May 22, 2006

Kernel head

This is a late post. Simply explains how the kernel sits in after grub.

[BITS 32]
	
global _start
extern kernel_entry
	
PAGEALIGN	equ 1<<0
MEMORYINFO	equ 1<<1
HEADERFLAGS	equ PAGEALIGN | MEMORYINFO ; 0x3 that is
HEADERMAGIC	equ 0x1BADB002
CHECKSUM	equ -(HEADERMAGIC + HEADERFLAGS)
STACKSIZE	equ 0x4000
	
section .text
ALIGN 4 	; section must be 4 byte-aligned
multibootheader	;
	dd HEADERMAGIC
	dd HEADERFLAGS
	dd CHECKSUM
	
_start:
	mov esp, stack+STACKSIZE
	push eax
	push ebx
	call kernel_entry
	jmp $
	
; GDT here
	
; ISRs here
	
section .bss
ALIGN 4
stack	resb STACKSIZE	; 16KB of memory

I’m just sad tonight, that’s why I decided to post this out of nothing. Well I guess keeping myself busy would be wise enough.

Comments »

The URI to TrackBack this entry is: http://eradicus.blogsome.com/2006/05/22/a-boot-signature/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Theme designed by Joset Anthony Zamora


Digital Stronghold

↑ Get Headline Animator