Added support for the boot partition offset as provided by the BFS boot block.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7251 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-04-20 01:20:43 +00:00
parent 9fd7586724
commit c8baeaf6cf

View File

@ -14,6 +14,8 @@
* the entry function of the embedded ELF part of the loader. * the entry function of the embedded ELF part of the loader.
*/ */
#define GLOBAL(x) .globl x ; x
.text .text
.code16 .code16
@ -47,6 +49,13 @@ bfs_start:
push %ds push %ds
pop %es pop %es
.code32 // save knowledge from the BFS boot block for later use
.byte 0x67
movb %dl, gBootDriveID - 0x10000
.byte 0x67
movl %eax, gBootPartitionOffset - 0x10000
.code16
cli // no interrupts please cli // no interrupts please
call enable_a20 // enable a20 gate call enable_a20 // enable a20 gate
@ -76,9 +85,6 @@ _protected_code_segment:
mov $0x10000, %ebp // setup new stack mov $0x10000, %ebp // setup new stack
mov %ebp, %esp mov %ebp, %esp
movb %dl, gBootDriveID
// save boot device
call _start call _start
//-------------------------------------------------------------- //--------------------------------------------------------------
@ -150,8 +156,10 @@ gdt_descriptor:
.word 0x2f // 6 entries in the GDT (8 bytes each) .word 0x2f // 6 entries in the GDT (8 bytes each)
.long gdt .long gdt
.globl gBootDriveID GLOBAL(gBootDriveID):
gBootDriveID:
.byte 0 .byte 0
GLOBAL(gBootPartitionOffset):
.long 0
.org 1024 .org 1024