Mercurial > hg > Members > taiki > original_os
changeset 4:ef4c29d7eda2
success to move on grub2. simple test program.
author | Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Jul 2012 19:56:21 +0900 |
parents | b541382769e6 |
children | be1123717c14 |
files | simpletest/multiboot2.h simpletest/testbootstrap.S simpletest/testbootstrap.o simpletest/testkernel.c simpletest/testkernel.elf |
diffstat | 5 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/simpletest/multiboot2.h Mon Jul 23 19:56:21 2012 +0900 @@ -0,0 +1,3 @@ +#define MULTIBOOT2_HEADER_MAGIC 0xe85250d6 +#define MULTIBOOT_ARCHITECTURE_I386 0 +#define MULTIBOOT_HEADER_TAG_END 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/simpletest/testbootstrap.S Mon Jul 23 19:56:21 2012 +0900 @@ -0,0 +1,21 @@ +#include "multiboot2.h" +.text +.code32 +.globl start +start: + jmp go_kernel + .align 8 + +multiboot_header: + .long MULTIBOOT2_HEADER_MAGIC + .long MULTIBOOT_ARCHITECTURE_I386 + .long multiboot_header_end - multiboot_header + .long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT_ARCHITECTURE_I386 + (multiboot_header_end - multiboot_header)) + .short MULTIBOOT_HEADER_TAG_END + .short 0 + .long 8 +multiboot_header_end: + +go_kernel: + pushl %eax +