From c8baeaf6cf3f10987ff3796abd450559fd7a7b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 20 Apr 2004 01:20:43 +0000 Subject: [PATCH] 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 --- src/kernel/boot/platform/bios_ia32/shell.S | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/kernel/boot/platform/bios_ia32/shell.S b/src/kernel/boot/platform/bios_ia32/shell.S index 6dfced1d0b..3fa33bf9c3 100644 --- a/src/kernel/boot/platform/bios_ia32/shell.S +++ b/src/kernel/boot/platform/bios_ia32/shell.S @@ -14,6 +14,8 @@ * the entry function of the embedded ELF part of the loader. */ +#define GLOBAL(x) .globl x ; x + .text .code16 @@ -47,6 +49,13 @@ bfs_start: push %ds 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 call enable_a20 // enable a20 gate @@ -76,9 +85,6 @@ _protected_code_segment: mov $0x10000, %ebp // setup new stack mov %ebp, %esp - movb %dl, gBootDriveID - // save boot device - call _start //-------------------------------------------------------------- @@ -150,8 +156,10 @@ gdt_descriptor: .word 0x2f // 6 entries in the GDT (8 bytes each) .long gdt -.globl gBootDriveID -gBootDriveID: +GLOBAL(gBootDriveID): .byte 0 +GLOBAL(gBootPartitionOffset): + .long 0 + .org 1024