3 |
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc. |
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc. |
4 |
* Copyright (C) 2002,2003 Yoshinori K. Okuji <okuji@enbug.org> |
* Copyright (C) 2002,2003 Yoshinori K. Okuji <okuji@enbug.org> |
5 |
* Copyright (C) 2003 Marco Gerards <metgerards@student.han.nl> |
* Copyright (C) 2003 Marco Gerards <metgerards@student.han.nl> |
6 |
|
* Copyright (C) 2003 Jeroen Dekkers <jeroen@dekkers.cx> |
7 |
* |
* |
8 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
9 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
53 |
#include <pupa/machine/console.h> |
#include <pupa/machine/console.h> |
54 |
#include <pupa/machine/linux.h> |
#include <pupa/machine/linux.h> |
55 |
#include <pupa/machine/kernel.h> |
#include <pupa/machine/kernel.h> |
56 |
|
#include <pupa/machine/multiboot.h> |
57 |
|
|
58 |
#define ABS(x) ((x) - EXT_C(start) + PUPA_BOOT_MACHINE_KERNEL_ADDR + 0x200) |
#define ABS(x) ((x) - EXT_C(start) + PUPA_BOOT_MACHINE_KERNEL_ADDR + 0x200) |
59 |
|
|
624 |
|
|
625 |
|
|
626 |
/* |
/* |
627 |
|
* This starts the multiboot kernel. |
628 |
|
*/ |
629 |
|
|
630 |
|
FUNCTION(pupa_multiboot_real_boot) |
631 |
|
/* Push the entry address on the stack. */ |
632 |
|
pushl %eax |
633 |
|
/* Move the address of the multiboot information structure to ebx. */ |
634 |
|
movl %edx,%ebx |
635 |
|
|
636 |
|
/* Unload all modules and stop the floppy driver. */ |
637 |
|
call EXT_C(pupa_dl_unload_all) |
638 |
|
call EXT_C(pupa_stop_floppy) |
639 |
|
|
640 |
|
/* Interrupts should be disabled. */ |
641 |
|
cli |
642 |
|
|
643 |
|
/* Move the magic value into eax and jump to the kernel. */ |
644 |
|
movl $PUPA_MB_MAGIC2,%eax |
645 |
|
popl %ecx |
646 |
|
jmp *%ecx |
647 |
|
|
648 |
|
|
649 |
|
/* |
650 |
* int pupa_biosdisk_rw_int13_extensions (int ah, int drive, void *dap) |
* int pupa_biosdisk_rw_int13_extensions (int ah, int drive, void *dap) |
651 |
* |
* |
652 |
* Call IBM/MS INT13 Extensions (int 13 %ah=AH) for DRIVE. DAP |
* Call IBM/MS INT13 Extensions (int 13 %ah=AH) for DRIVE. DAP |