Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand/bootxx The reserved space for the BIOS P...
details: https://anonhg.NetBSD.org/src/rev/77752dde06a7
branches: trunk
changeset: 553242:77752dde06a7
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Oct 13 06:08:28 2003 +0000
description:
The reserved space for the BIOS Parameter Block (BPB) only needs to be for
FAT16 (11+51) except when booting from FAT{12,16,32}, which needs FAT32 (11+79).
We still reserve the BPB for non-bootxx_msdos PBR bootblocks because
they may be installed as a floppy boot record (and those need a BPB).
Remove some redundant wording in an error messsage, saving 6 bytes.
diffstat:
sys/arch/i386/stand/bootxx/pbr.S | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r 1761b42de800 -r 77752dde06a7 sys/arch/i386/stand/bootxx/pbr.S
--- a/sys/arch/i386/stand/bootxx/pbr.S Mon Oct 13 05:46:26 2003 +0000
+++ b/sys/arch/i386/stand/bootxx/pbr.S Mon Oct 13 06:08:28 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pbr.S,v 1.8 2003/10/08 04:25:45 lukem Exp $ */
+/* $NetBSD: pbr.S,v 1.9 2003/10/13 06:08:28 lukem Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -72,6 +72,12 @@
#define TABENTRYSIZE (MBR_BS_PARTNAMESIZE + 1)
#define NAMETABSIZE (4 * TABENTRYSIZE)
+#ifdef BOOT_FROM_FAT
+#define MBR_AFTERBPB 90 /* BPB size in FAT32 partition BR */
+#else
+#define MBR_AFTERBPB 62 /* BPB size in floppy master BR */
+#endif
+
#ifdef TERSE_ERROR
/*
* Error codes. Done this way to save space.
@@ -118,7 +124,7 @@
. = start + MBR_BPB_OFFSET /* move to start of BPB */
/* (ensures oemname doesn't overflow) */
- . = start + MBR_BOOTCODE_OFFSET /* skip BPB */
+ . = start + MBR_AFTERBPB /* skip BPB */
start0:
xor %ax, %ax /* don't trust values of ds, es or ss */
mov %ax, %ds
@@ -281,7 +287,7 @@
* and the disk packet capability.
*
* This is actually relatively pointless:
- * 1) we onlye us LBA reads if CHS ones would fail
+ * 1) we only use LBA reads if CHS ones would fail
* 2) the MBR code managed to read the same sectors
* 3) the BIOS will (ok should) reject the LBA read as a bad BIOS call
*/
@@ -361,7 +367,7 @@
.asciz "\r\n"
#ifndef TERSE_ERROR
-ERR_READ: .asciz "Disk read error"
+ERR_READ: .asciz "Disk read"
ERR_NO_BOOTXX: .asciz "Not a bootxx image"
ERR_PTN: .asciz "No NetBSD partition"
#ifndef NO_LBA_CHECK
Home |
Main Index |
Thread Index |
Old Index