pxeldr.S (119714) | pxeldr.S (125693) |
---|---|
1# 2# Copyright (c) 2000 John Baldwin 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) 2000 John Baldwin 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/pxeldr/pxeldr.S 119714 2003-09-03 08:12:20Z phk $ | 16# $FreeBSD: head/sys/boot/i386/pxeldr/pxeldr.S 125693 2004-02-11 08:42:38Z ru $ |
17 18# 19# This simple program is a preloader for the normal boot3 loader. It is simply 20# prepended to the beginning of a fully built and btxld'd loader. It then 21# copies the loader to the address boot2 normally loads it, emulates the 22# boot[12] environment (protected mode, a bootinfo struct, etc.), and then jumps 23# to the start of btxldr to start the boot process. This method allows a stock 24# /boot/loader to be booted over the network via PXE w/o having to write a --- 80 unchanged lines hidden (view full) --- 105 xorl %eax, %eax # zero %eax 106 movw $(MEM_ARG_SIZE/4), %cx # Size of arguments in 32-bit 107 # dwords 108 rep # Clear the arguments 109 stosl # to zero 110 orb $KARGS_FLAGS_PXE, 0x8(%bx) # kargs->bootflags |= 111 # KARGS_FLAGS_PXE 112 popl 0xc(%bx) # kargs->pxeinfo = *PXENV+ | 17 18# 19# This simple program is a preloader for the normal boot3 loader. It is simply 20# prepended to the beginning of a fully built and btxld'd loader. It then 21# copies the loader to the address boot2 normally loads it, emulates the 22# boot[12] environment (protected mode, a bootinfo struct, etc.), and then jumps 23# to the start of btxldr to start the boot process. This method allows a stock 24# /boot/loader to be booted over the network via PXE w/o having to write a --- 80 unchanged lines hidden (view full) --- 105 xorl %eax, %eax # zero %eax 106 movw $(MEM_ARG_SIZE/4), %cx # Size of arguments in 32-bit 107 # dwords 108 rep # Clear the arguments 109 stosl # to zero 110 orb $KARGS_FLAGS_PXE, 0x8(%bx) # kargs->bootflags |= 111 # KARGS_FLAGS_PXE 112 popl 0xc(%bx) # kargs->pxeinfo = *PXENV+ |
113ifdef(`ALWAYS_SERIAL',` | 113#ifdef ALWAYS_SERIAL |
114# 115# set the RBX_SERIAL bit in the howto byte. 116 orl $RB_SERIAL, (%bx) # enable serial console | 114# 115# set the RBX_SERIAL bit in the howto byte. 116 orl $RB_SERIAL, (%bx) # enable serial console |
117') 118ifdef(`PROBE_KEYBOARD',` | 117#endif 118#ifdef PROBE_KEYBOARD |
119# 120# Look at the BIOS data area to see if we have an enhanced keyboard. If not, 121# set the RBX_SERIAL bit in the howto byte. 122 testb $KEYBOARD_BIT, MEM_BIOS_KEYBOARD # keyboard present? 123 jnz keyb # yes, so skip 124 orl $RB_SERIAL, (%bx) # enable serial console 125keyb: | 119# 120# Look at the BIOS data area to see if we have an enhanced keyboard. If not, 121# set the RBX_SERIAL bit in the howto byte. 122 testb $KEYBOARD_BIT, MEM_BIOS_KEYBOARD # keyboard present? 123 jnz keyb # yes, so skip 124 orl $RB_SERIAL, (%bx) # enable serial console 125keyb: |
126') | 126#endif |
127# 128# Turn on the A20 address line 129# 130 callw seta20 # Turn A20 on 131# 132# Relocate the loader and BTX using a very lazy protected mode 133# 134 movw $relocate_msg, %si # Display the --- 153 unchanged lines hidden --- | 127# 128# Turn on the A20 address line 129# 130 callw seta20 # Turn A20 on 131# 132# Relocate the loader and BTX using a very lazy protected mode 133# 134 movw $relocate_msg, %si # Display the --- 153 unchanged lines hidden --- |