//SPARTAN/trunk/arch/ia32/src/boot/boot.S |
---|
52,6 → 52,7 |
cli |
xorw %ax, %ax |
movw %ax, %ds |
movw %ax, %es |
movw %ax, %ss # initialize stack segment register |
movl $BOOTSTRAP_OFFSET - 0x400, %esp # initialize stack pointer |
85,7 → 86,7 |
movw %ax, %ds # kernel data + stack |
movw %ax, %ss |
movb $0xd1, %al # enable A20 using the keyboard controller |
movb $0xd1, %al # enable A20 using i8042 controller |
outb %al, $0x64 |
movb $0xdf, %al |
outb %al, $0x60 |
//SPARTAN/trunk/arch/ia32/src/boot/memmap.S |
---|
38,11 → 38,8 |
.section K_TEXT_START_2 |
memmap_arch_init: |
e820begin: |
xorl %ebx,%ebx # during first call, ebx must be 0 |
movw %bx,%ds |
movw %bx,%es |
movw $e820table_boot,%di |
movb $MEMMAP_E820_MAX_RECORDS,e820counter_boot |
e820loop: |
66,8 → 63,8 |
decb e820counter_boot # buffer is full |
jz e820end |
cmpl $0,%ebx |
jne e820loop |
testl %ebx,%ebx |
jnz e820loop |
e820end: |
movb $MEMMAP_E820_MAX_RECORDS,%al |
110,7 → 107,9 |
e801end: |
ret |
.section K_DATA_START |
#memory size in 1 kb chunks |
e801memorysize: |
.long 0 |