summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/btx
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-01-27 21:21:01 +0000
committerjhb <jhb@FreeBSD.org>2000-01-27 21:21:01 +0000
commit372aab7cb7ba4c4b8a577deb8144be83c910bc81 (patch)
treeb4785689232fee6eb6466dc7ffa3145397733193 /sys/boot/i386/btx
parentf1a9497df5db81a71987fa20f10c831030987e36 (diff)
downloadFreeBSD-src-372aab7cb7ba4c4b8a577deb8144be83c910bc81.zip
FreeBSD-src-372aab7cb7ba4c4b8a577deb8144be83c910bc81.tar.gz
Add the new cdldr CD bootstrap loader. This patch includes the following:
- Fix btxldr to preserve a NULL bootinfo pointer when it copies the kernel arguments. - Add the cdldr bootstrap program. This program is tacked onto the beginning of the standard 3rd stage boot loader (/boot/loader) to form the CD boot loader (/boot/cdboot). When a CD is booted, the cdboot file is copied into memory instead and executed. The cdldr stub emulates the environment normally provided by boot2 and then starts the loader. This booting method does not emulate a floppy drive, but boots directly off of the CD. This should fix the problems some BIOS's have with emulating a 2.88 MB floppy image. - Add support to the loader to recognize that it has been booted by cdldr instead of boot2 and use a simpler method of extracting the BIOS boot device.
Diffstat (limited to 'sys/boot/i386/btx')
-rw-r--r--sys/boot/i386/btx/btxldr/btxldr.S6
-rw-r--r--sys/boot/i386/btx/btxldr/btxldr.s6
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/boot/i386/btx/btxldr/btxldr.S b/sys/boot/i386/btx/btxldr/btxldr.S
index ebf6a37..d506a62 100644
--- a/sys/boot/i386/btx/btxldr/btxldr.S
+++ b/sys/boot/i386/btx/btxldr/btxldr.S
@@ -90,7 +90,9 @@ start.1: movl (%ebx),%eax # Get argument and
call dputstr # End message
movl $0x48,%ecx # Allocate space
subl %ecx,%ebp # for bootinfo
- movl 0x18(%esp,1),%esi # Source
+ movl 0x18(%esp,1),%esi # Source: bootinfo
+ cmpl $0x0, %esi # If the bootinfo pointer
+ je start_null_bi # is null, don't copy it
movl %ebp,%edi # Destination
rep # Copy
movsb # it
@@ -99,7 +101,7 @@ start.1: movl (%ebx),%eax # Get argument and
movl %ebp,%eax # bootinfo
call dhexout # relocation
call dputstr # message
- movl $0x18,%ecx # Allocate space
+start_null_bi: movl $0x18,%ecx # Allocate space
subl %ecx,%ebp # for arguments
leal 0x4(%esp,1),%esi # Source
movl %ebp,%edi # Destination
diff --git a/sys/boot/i386/btx/btxldr/btxldr.s b/sys/boot/i386/btx/btxldr/btxldr.s
index ebf6a37..d506a62 100644
--- a/sys/boot/i386/btx/btxldr/btxldr.s
+++ b/sys/boot/i386/btx/btxldr/btxldr.s
@@ -90,7 +90,9 @@ start.1: movl (%ebx),%eax # Get argument and
call dputstr # End message
movl $0x48,%ecx # Allocate space
subl %ecx,%ebp # for bootinfo
- movl 0x18(%esp,1),%esi # Source
+ movl 0x18(%esp,1),%esi # Source: bootinfo
+ cmpl $0x0, %esi # If the bootinfo pointer
+ je start_null_bi # is null, don't copy it
movl %ebp,%edi # Destination
rep # Copy
movsb # it
@@ -99,7 +101,7 @@ start.1: movl (%ebx),%eax # Get argument and
movl %ebp,%eax # bootinfo
call dhexout # relocation
call dputstr # message
- movl $0x18,%ecx # Allocate space
+start_null_bi: movl $0x18,%ecx # Allocate space
subl %ecx,%ebp # for arguments
leal 0x4(%esp,1),%esi # Source
movl %ebp,%edi # Destination
OpenPOWER on IntegriCloud