Deleted Added
full compact
boot1.S (62660) boot1.S (80751)
1#
2# Copyright (c) 1998 Robert Nordier
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are freely
6# permitted provided that the above copyright notice and this
7# paragraph and the following disclaimer are duplicated in all
8# such forms.
9#
10# This software is provided "AS IS" and without any express or
11# implied warranties, including, without limitation, the implied
12# warranties of merchantability and fitness for a particular
13# purpose.
14#
15
1#
2# Copyright (c) 1998 Robert Nordier
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are freely
6# permitted provided that the above copyright notice and this
7# paragraph and the following disclaimer are duplicated in all
8# such forms.
9#
10# This software is provided "AS IS" and without any express or
11# implied warranties, including, without limitation, the implied
12# warranties of merchantability and fitness for a particular
13# purpose.
14#
15
16# $FreeBSD: head/sys/boot/i386/boot2/boot1.S 62660 2000-07-06 00:29:40Z jhb $
16# $FreeBSD: head/sys/boot/i386/boot2/boot1.S 80751 2001-07-31 19:50:09Z jhb $
17
18# Memory Locations
19 .set MEM_REL,0x700 # Relocation address
20 .set MEM_ARG,0x900 # Arguments
21 .set MEM_ORG,0x7c00 # Origin
22 .set MEM_BUF,0x8c00 # Load area
23 .set MEM_BTX,0x9000 # BTX start
24 .set MEM_JMP,0x9010 # BTX entry point

--- 13 unchanged lines hidden (view full) ---

38 .set SIZ_SEC,0x200 # Sector size
39
40 .globl start
41 .globl xread
42 .code16
43
44start: jmp main # Start recognizably
45
17
18# Memory Locations
19 .set MEM_REL,0x700 # Relocation address
20 .set MEM_ARG,0x900 # Arguments
21 .set MEM_ORG,0x7c00 # Origin
22 .set MEM_BUF,0x8c00 # Load area
23 .set MEM_BTX,0x9000 # BTX start
24 .set MEM_JMP,0x9010 # BTX entry point

--- 13 unchanged lines hidden (view full) ---

38 .set SIZ_SEC,0x200 # Sector size
39
40 .globl start
41 .globl xread
42 .code16
43
44start: jmp main # Start recognizably
45
46 .org 0x4,0x90
46# This is the start of a standard BIOS Parameter Block (BPB). Most bootable
47# FAT disks have this at the start of their MBR. While normal BIOS's will
48# work fine without this section, IBM's El Torito emulation "fixes" up the
49# BPB by writing into the memory copy of the MBR. Rather than have data
50# written into our xread routine, we'll define a BPB to work around it.
51# The data marked with (T) indicates a field required for a ThinkPad to
52# recognize the disk and (W) indicates fields written from IBM BIOS code.
53# The use of the BPB is based on what OpenBSD and NetBSD implemented in
54# their boot code but the required fields were determined by trial and error.
55#
56# Note: If additional space is needed in boot1, one solution would be to
57# move the "prompt" message data (below) to replace the OEM ID.
58
59 .org 0x03, 0x00
60oemid: .space 0x08, 0x00 # OEM ID
61
62 .org 0x0b, 0x00
63bpb: .word 512 # sector size (T)
64 .byte 0 # sectors/clustor
65 .word 0 # reserved sectors
66 .byte 0 # number of FATs
67 .word 0 # root entries
68 .word 0 # small sectors
69 .byte 0 # media type (W)
70 .word 0 # sectors/fat
71 .word 18 # sectors per track (T)
72 .word 2 # number of heads (T)
73 .long 0 # hidden sectors (W)
74 .long 0 # large sectors
75
76 .org 0x24, 0x00
77ebpb: .byte 0 # BIOS physical drive number (W)
78
79 .org 0x25,0x90
47#
48# Trampoline used by boot2 to call read to read data from the disk via
49# the BIOS. Call with:
50#
51# %cx:%ax - long - LBA to read in
52# %es:(%bx) - caddr_t - buffer to read data into
53# %dl - byte - drive to read from
54# %dh - byte - num sectors to read

--- 273 unchanged lines hidden ---
80#
81# Trampoline used by boot2 to call read to read data from the disk via
82# the BIOS. Call with:
83#
84# %cx:%ax - long - LBA to read in
85# %es:(%bx) - caddr_t - buffer to read data into
86# %dl - byte - drive to read from
87# %dh - byte - num sectors to read

--- 273 unchanged lines hidden ---