Deleted Added
full compact
cdboot.S (130943) cdboot.S (157652)
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 130943 2004-06-22 21:55:22Z jhb $
30# $FreeBSD: head/sys/boot/i386/cdboot/cdboot.s 157652 2006-04-11 04:39:29Z sobomax $
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

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

480 call putc # Output it
481 mov $8,%al # Backspace
482 call putc # Output it
483 pop %bx # Restore
484 pop %ax # Restore
485 ret
486
487#
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

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

480 call putc # Output it
481 mov $8,%al # Backspace
482 call putc # Output it
483 pop %bx # Restore
484 pop %ax # Restore
485 ret
486
487#
488# Enable A20
488# Enable A20. Put upper limit on amount of time we wait for the
489# keyboard controller to get ready (65K x ISA access time). If
490# we wait more than that amount it's likely that the hardware
491# is legacy-free and simply doesn't have keyboard controller
492# and don't need enabling A20 at all.
489#
490seta20: cli # Disable interrupts
493#
494seta20: cli # Disable interrupts
491seta20.1: in $0x64,%al # Get status
495 xor %cx,%cx # Clear
496seta20.1: inc %cx # Increment, overflow?
497 jz seta20.3 # Yes
498 in $0x64,%al # Get status
492 test $0x2,%al # Busy?
493 jnz seta20.1 # Yes
494 mov $0xd1,%al # Command: Write
495 out %al,$0x64 # output port
496seta20.2: in $0x64,%al # Get status
497 test $0x2,%al # Busy?
498 jnz seta20.2 # Yes
499 mov $0xdf,%al # Enable
500 out %al,$0x60 # A20
499 test $0x2,%al # Busy?
500 jnz seta20.1 # Yes
501 mov $0xd1,%al # Command: Write
502 out %al,$0x64 # output port
503seta20.2: in $0x64,%al # Get status
504 test $0x2,%al # Busy?
505 jnz seta20.2 # Yes
506 mov $0xdf,%al # Enable
507 out %al,$0x60 # A20
501 sti # Enable interrupts
508seta20.3: sti # Enable interrupts
502 ret # To caller
503
504#
505# Convert AL to hex, saving the result to [EDI].
506#
507hex8: pushl %eax # Save
508 shrb $0x4,%al # Do upper
509 call hex8.1 # 4

--- 84 unchanged lines hidden ---
509 ret # To caller
510
511#
512# Convert AL to hex, saving the result to [EDI].
513#
514hex8: pushl %eax # Save
515 shrb $0x4,%al # Do upper
516 call hex8.1 # 4

--- 84 unchanged lines hidden ---