From 1cd8b4c9b41689f9a74d24bbf5e582b1f1f1a6ce Mon Sep 17 00:00:00 2001 From: ment Date: Wed, 27 Apr 2011 23:19:30 +0200 Subject: [PATCH] shifted PBS loader to not overlap with FAT32 header --- sys/src/boot/pc/pbs.s | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/sys/src/boot/pc/pbs.s b/sys/src/boot/pc/pbs.s index a4c1fc191..6b11eded9 100644 --- a/sys/src/boot/pc/pbs.s +++ b/sys/src/boot/pc/pbs.s @@ -4,7 +4,7 @@ #define RELOC 0x7c00 TEXT _magic(SB), $0 - BYTE $0xEB; BYTE $0x3C; /* jmp .+ 0x3C (_start0x3E) */ + BYTE $0xEB; BYTE $0x58; /* jmp .+ 0x58 (_start0x5A) */ BYTE $0x90 /* nop */ TEXT _version(SB), $0 BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00; @@ -35,9 +35,26 @@ TEXT _nhiddenhi(SB), $0 BYTE $0x00; BYTE $0x00; TEXT _bigvolsize(SB), $0 BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00; +/* FAT32 structure, starting @0x24 */ +TEXT _fatsz32(SB), $0 + BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00 +TEXT _extflags(SB), $0 + BYTE $0x00; BYTE $0x00 +TEXT _fsver(SB), $0 + BYTE $0x00; BYTE $0x00 +TEXT _rootclust(SB), $0 + BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00 +TEXT _fsinfo(SB), $0 + BYTE $0x00; BYTE $0x00 +TEXT _bkboot(SB), $0 + BYTE $0x00; BYTE $0x00 +TEXT _reserved0(SB), $0 + BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00; + BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00; + BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00 TEXT _driveno(SB), $0 BYTE $0x00 -TEXT _reserved0(SB), $0 +TEXT _reserved1(SB), $0 BYTE $0x00 TEXT _bootsig(SB), $0 BYTE $0x00 @@ -49,9 +66,9 @@ TEXT _label(SB), $0 BYTE $0x00; BYTE $0x00; BYTE $0x00 TEXT _type(SB), $0 BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00; - BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00; + BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x00 -_start0x3E: +_start0x5A: CLI CLR(rAX) MTSR(rAX, rSS) /* 0000 -> rSS */