cdboot.S (173697) | cdboot.S (177626) |
---|---|
1# 2# Copyright (c) 2001 John Baldwin <jhb@FreeBSD.org> 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27# SUCH DAMAGE. 28# 29 | 1# 2# Copyright (c) 2001 John Baldwin <jhb@FreeBSD.org> 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27# SUCH DAMAGE. 28# 29 |
30# $FreeBSD: head/sys/boot/i386/cdboot/cdboot.s 173697 2007-11-17 17:32:40Z jhb $ | 30# $FreeBSD: head/sys/boot/i386/cdboot/cdboot.s 177626 2008-03-26 07:32:08Z brueffer $ |
31 32# 33# This program is a freestanding boot program to load an a.out binary 34# from a CD-ROM booted with no emulation mode as described by the El 35# Torito standard. Due to broken BIOSen that do not load the desired 36# number of sectors, we try to fit this in as small a space as possible. 37# 38# Basically, we first create a set of boot arguments to pass to the loaded --- 130 unchanged lines hidden (view full) --- 169 mov (%si),%al # Get first char of next path 170 or %al,%al # Is it double nul? 171 jnz lookup_path # No, try it. 172 mov $msg_failed,%si # Failed message 173 jmp error # Halt 174lookup_found: # Found a loader file 175# 176# Load the binary into the buffer. Due to real mode addressing limitations | 31 32# 33# This program is a freestanding boot program to load an a.out binary 34# from a CD-ROM booted with no emulation mode as described by the El 35# Torito standard. Due to broken BIOSen that do not load the desired 36# number of sectors, we try to fit this in as small a space as possible. 37# 38# Basically, we first create a set of boot arguments to pass to the loaded --- 130 unchanged lines hidden (view full) --- 169 mov (%si),%al # Get first char of next path 170 or %al,%al # Is it double nul? 171 jnz lookup_path # No, try it. 172 mov $msg_failed,%si # Failed message 173 jmp error # Halt 174lookup_found: # Found a loader file 175# 176# Load the binary into the buffer. Due to real mode addressing limitations |
177# we have to read it in in 64k chunks. | 177# we have to read it in 64k chunks. |
178# 179 mov DIR_SIZE(%bx),%eax # Read file length 180 add $SECTOR_SIZE-1,%eax # Convert length to sectors 181 shr $SECTOR_SHIFT,%eax 182 cmp $BUFFER_LEN,%eax 183 jbe load_sizeok 184 mov $msg_load2big,%si # Error message 185 call error --- 415 unchanged lines hidden --- | 178# 179 mov DIR_SIZE(%bx),%eax # Read file length 180 add $SECTOR_SIZE-1,%eax # Convert length to sectors 181 shr $SECTOR_SHIFT,%eax 182 cmp $BUFFER_LEN,%eax 183 jbe load_sizeok 184 mov $msg_load2big,%si # Error message 185 call error --- 415 unchanged lines hidden --- |