smp ? me no know about smp here...

This will be the stage 1 loader...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23222 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2008-01-02 22:05:28 +00:00
parent f6872148ca
commit 9776e38eb1
2 changed files with 67 additions and 1 deletions

View File

@ -28,9 +28,9 @@ platform_add_menus(Menu *menu)
item->SetData(B_SAFEMODE_FAIL_SAFE_VIDEO_MODE);
item->SetHelpText("The system will use VESA mode and won't try to open any video graphics driver");
#if 0
smp_add_safemode_menus(menu);
#if 0
menu->AddItem(item = new(nothrow) MenuItem("Don't call the BIOS"));
item->SetType(MENU_ITEM_MARKABLE);

View File

@ -0,0 +1,66 @@
/*
* Copyright 2005, Ingo Weinhold, bonefish@users.sf.net.
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT license.
*
* Author:
* François Revol, revol@free.fr.
*/
#define FUNCTION(x) .global x; .type x,@function; x
/*
* stage1 boot code for TOS for use as boot block of HDD partitions.
* cf.
* http://www.fortunecity.com/skyscraper/apple/308/html/chap3.htm
* http://leonard.oxg.free.fr/articles/multi_atari/multi_atari.html
* http://alive.atari.org/alive10/btmania.php
*
* The offset of the partition in 512 byte blocks must be written at
* position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does
* that) or otherwise the code can't find the partition.
* The partition must be a BFS formatted. The file "beos/system/zbeos"
* (the stage 2 boot loader) loaded into memory at 0x1000:0x0000 (linear address
* 0x10000) and entered at 0x:1000:0x0200 with parameters eax - partition offset
* in 512 byte blocks and dl - BIOS ID of the boot drive.
*
* Compile via:
* nasm -f bin -O5 -o stage1.bin stage1.S
*/
// 1 enabled verbose output
//#define DEBUG 1
#define BOOT_BLOCK_START_ADDRESS 0x7c00
#define STACK_ADDRESS BOOT_BLOCK_START_ADDRESS
#define READ_BUFFER_STACK STACK_ADDRESS - 0x2000
#define PARTITION_OFFSET_OFFSET 506
#define BFS_SUPERBLOCK_OFFSET 512
// BFS definitions
#define SUPER_BLOCK_MAGIC1 '1SFB' ; nasm reverses '...' consts
#define SUPER_BLOCK_MAGIC2 0xdd121031
#define SUPER_BLOCK_MAGIC3 0x15b6830e
#define INODE_MAGIC1 0x3bbe0ad9
#define NUM_DIRECT_BLOCKS 12
#define S_IFMT 00000170000o
#define S_IFDIR 00000040000o
// BIOS calls
rts