cdboot.S (173720) | cdboot.S (177626) |
---|---|
1# 2# Copyright (c) 2006 TAKAHASHI Yoshihiro <nyan@FreeBSD.org> 3# Copyright (c) 2001 John Baldwin <jhb@FreeBSD.org> 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 14 unchanged lines hidden (view full) --- 23# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28# SUCH DAMAGE. 29# 30 | 1# 2# Copyright (c) 2006 TAKAHASHI Yoshihiro <nyan@FreeBSD.org> 3# Copyright (c) 2001 John Baldwin <jhb@FreeBSD.org> 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 14 unchanged lines hidden (view full) --- 23# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28# SUCH DAMAGE. 29# 30 |
31# $FreeBSD: head/sys/boot/pc98/cdboot/cdboot.s 173720 2007-11-18 03:14:06Z nyan $ | 31# $FreeBSD: head/sys/boot/pc98/cdboot/cdboot.s 177626 2008-03-26 07:32:08Z brueffer $ |
32 33# 34# Basically, we first create a set of boot arguments to pass to the loaded 35# binary. Then we attempt to load /boot/loader from the CD we were booted 36# off of. 37# 38 39# --- 370 unchanged lines hidden (view full) --- 410 mov (%si),%al # Get first char of next path 411 or %al,%al # Is it double nul? 412 jnz lookup_path # No, try it. 413 mov $msg_failed,%si # Failed message 414 jmp error # Halt 415lookup_found: # Found a loader file 416# 417# Load the binary into the buffer. Due to real mode addressing limitations | 32 33# 34# Basically, we first create a set of boot arguments to pass to the loaded 35# binary. Then we attempt to load /boot/loader from the CD we were booted 36# off of. 37# 38 39# --- 370 unchanged lines hidden (view full) --- 410 mov (%si),%al # Get first char of next path 411 or %al,%al # Is it double nul? 412 jnz lookup_path # No, try it. 413 mov $msg_failed,%si # Failed message 414 jmp error # Halt 415lookup_found: # Found a loader file 416# 417# Load the binary into the buffer. Due to real mode addressing limitations |
418# we have to read it in in 64k chunks. | 418# we have to read it in 64k chunks. |
419# 420 mov %es:DIR_SIZE(%bx),%eax # Read file length 421 add $SECTOR_SIZE-1,%eax # Convert length to sectors 422 shr $SECTOR_SHIFT,%eax 423 cmp $BUFFER_LEN,%eax 424 jbe load_sizeok 425 mov $msg_load2big,%si # Error message 426 jmp error --- 385 unchanged lines hidden --- | 419# 420 mov %es:DIR_SIZE(%bx),%eax # Read file length 421 add $SECTOR_SIZE-1,%eax # Convert length to sectors 422 shr $SECTOR_SHIFT,%eax 423 cmp $BUFFER_LEN,%eax 424 jbe load_sizeok 425 mov $msg_load2big,%si # Error message 426 jmp error --- 385 unchanged lines hidden --- |