summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/btx
Commit message (Collapse)AuthorAgeFilesLines
* Set MAINTAINER.rnordier2000-10-023-0/+6
|
* Add a new compile-time tweak to BTX. If you set the make(1) variablejhb2000-08-243-2/+10
| | | | | | | | BOOT_BTX_NOHANG, then BTX will be compiled with the appropriate flags so that it reboots after a fault instead of hanging forever. Requested by: ps Approved by: rnordier
* Emulate the WBINVD instruction when it is called by the BIOS.jhb2000-07-062-12/+30
|
* Change the fault message to say 'BTX halted' isntead of 'System halted' tojhb2000-06-292-2/+2
| | | | | | avoid confusion. Submitted by: George Scott <George.Scott@its.monash.edu.au>
* Rework the detecting of the rdmsr and wrmsr instructions in the v86jhb2000-06-292-14/+14
| | | | | monitor so that the codepath is cleaner and easier to maintain in the future.
* Add support for emulating the RDMSR and WRMSR instructions into BTX. Injhb2000-06-172-4/+48
| | | | | | | | theory, this should allow the K7V Athlon motherboard to boot ok with boot virus protection enabled. However, I have no hardware to test this. It shouldn't break anything though. :) Prodded by: Kelly Yancey <kbyanc@posi.net>
* Convert the short stub of real-mode code into 16-bit assembly.jhb2000-05-242-22/+22
|
* Clean up all of the 16-bit assembly code in the x86 bootstrap to workjhb2000-05-234-327/+266
| | | | | | | | with the new binutils. Now that we have a decent assembler, all the old m4 macros are no longer needed. Instead, straight assembly can be used since as(1) now understands 16-bit addressing, branches, etc. Also, several bugs have been fixed in as(1), allowing boot0.s to be further cleaned up.
* Don't disable interrupts when calling a vm86 mode interrupt or routinejhb2000-04-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | from user mode. Don't disable interrupts when returning from vm86 mode to user mode either. Now, we only disable interrupts before calling a hardware interrupt handler, which is the only time we _should_ be disabling interrupts. Because of this, err, feature, any routine that one called in vm86 mode had to re-enable interrupts by setting the interrupt flag or interrupts would remain disabled even after the routine returned. For example, I have a simple debugging routine that uses a vm86 mode function to dump any arbitrary memory word that I use to read the BIOS timer or any other memory location. This function does 1 load instruction from memory and then returns. Since it didn't re-enable interrupts, the first time I called it to read the BIOS timer, it disabled interrupts. This also affected the PXE bootstrap as it needs interrupts enabled while it is processing. This patch fixes both of those situations so that those functions do not worry about having to enable interrupts. Hardware interrupt handlers worked fine with the old code because they always enable interrupts as part of their routine. If you have any problems with the loader after this commit, please let me know. I'd like to MFC it in a week or two since PXE support needs it. Noticed by: ps, Michael Johnston <michael.johnston@intel.com>
* Mega i386 loader commit.jhb2000-03-283-95/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't hard code 0x10000 as the entry point for the loader. Instead add src/sys/boot/i386/Makefile.inc which defines a make variable with the entry point for the loader. Move the loader's entry point up to 0x20000, which makes PXE happy. - Don't try to use cpp to parse btxldr for the optional BTXLDR_VERBOSE, instead use m4 to achieve this. Also, add a BTXLDR_VERBOSE knob in the btxldr Makefile to turn this option on. - Redo parts of cdldr's Makefile so that it now builds and installs cdboot instead of having i386/loader/Makefile do that. Also, add in some more variables to make the pxeldr Makefile almost identical and thus to ease maintainability. - Teach cdldr about the a.out format. Cdldr now parsers the a.out header of the loader binary and relocates it based on that. The entry point of the loader no longer has to be hardcoded into cdldr. Also, the boot info table from mkisofs is no longer required to get a useful cdboot. - Update the lsdev function for BIOS disks to parse other file systems (such as DOS FAT) that we currently support. This is still buggy as it assumes that a floppy with a DOS boot sector actually has a MBR and parses it as such. I'll be fixing this in the future. - The biggie: Add in support for booting off of PXE-enabled network adapters. Currently, we use the TFTP API provided by the PXE BIOS. Eventually we will switch to using the low-level NIC driver thus allowing both TFTP and NFS to be used, but for now it's just TFTP. Submitted by: ps, alfred Testing by: Benno Rice <benno@netizen.com.au>
* This patch to BTX fixes several small things:jhb2000-02-162-12/+58
| | | | | | | | | | | | | | | | | | | | | 1) Fix a bug in the int15 function 87 emulation where we only copied half of what the BIOS asked for. This caused the Mylex RAID adapter to go haywire and start trashing memory when you tried to boot from it. 2) Don't use interrupt 19 to reboot. Instead, set the reboot flag to a warm boot and jump to the BIOS's reboot handler. int 19 doesn't clear memory or restore the interrupt vector table, and thus really isn't safe. For example, when booting off of PXE, the PXE BIOS eats up a chunk of memory for its internal data and structures. Since we rebooted via int 19, using the 'reboot' command in the loader resulted in that memory not being reclaimed by the BIOS. Thus, after a few PXE boots, the system was out of lower memory. 3) Catch any int 19 calls made by a BTX client or a user pressing Ctrl-Alt-Delete and shutdown BTX and reboot the machine cleanly. This fixes Ctrl-Alt-Delete in the loader and in boot2 instead of presenting the user with a BTX fault. Approved by: jkh Found by: 1) by msmith
* Add the new cdldr CD bootstrap loader. This patch includes the following:jhb2000-01-272-4/+8
| | | | | | | | | | | | | | | | - 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.
* Fix brokenness introduced with the PAGING conditional variable. The valuejhb2000-01-272-2/+6
| | | | | | | | | of %cr0 wasn't reloaded into %eax before being modified to turn protected mode off if PAGING was not defined. The result was that the processor did not exit protected mode, so when it tried to jump to segment 0x0 in the next instruction to clear the prefetch cache like one should when leaving protected mode, it actually tried to jump to a null selector, causing a GPF.
* If PAGING is defined then actually turn it on when entering protectedjhb1999-10-272-0/+10
| | | | mode.
* aThis patch updates the BTX to emulate the BIOS function "Copy Extendedjhb1999-10-123-9/+138
| | | | | | | | | | | | | | | | | | Memory" called as function 0x87 of interrupt 0x15. Since the Mylex RAID adapter's BIOS used this function to access memory (actually PCI bus space) beyond 16 MB, this patch also allows BTX to address all 4 Gig of possible address space on i386+. Since the loader does not have room for 4 MB of page tables, this was done by turning off paging. Paging was turned off via a compile time setting which defaults to off. To enable paging, simply define the make variable PAGING. rnordier might want to clean this up later. Submitted by: W. Gerald Hicks <wghicks@bellsouth.net>, Bosko Milekic <bmilekic@ares.dsuper.net> Reviewed by: msmith Required by: Mylex RAID adapter's BIOS
* Blank out the twiddly thing when outputting the ``BTX loader'' message.brian1999-10-122-2/+2
|
* $Id$ -> $FreeBSD$peter1999-08-2813-13/+13
|
* Drop some non-existent commented-out targets.rnordier1999-05-181-2/+2
|
* Emulate a V86 "movl %cr0,%eax" instruction.rnordier1999-02-252-24/+52
| | | | Feedback and testing: Kurt Hopfensperger <kjhmdjd@ix.netcom.com>
* Push version numbers up to 1.00. This is just intended to reflectrnordier1999-01-224-10/+10
| | | | | | | that the BTX code can be regarded as stable: there are no associated code changes. Suggested by: obrien
* Revise a few comments.rnordier1998-11-022-14/+14
|
* Ignore, rather than emulate, an i386 'hlt' instruction (though forrnordier1998-11-012-22/+22
| | | | | | | most practical purposes, this should be indistinguishable from a more strictly correct approach). Feedback and testing: msmith
* Make the BTX loader much more quiet about what it's doing. This removesmsmith1998-10-303-54/+87
| | | | most of the "what the (*^&%(*^ was that?" stuff that normally flies by.
* Pop the return address off the stack before making a V86_CALLF call;msmith1998-10-221-2/+5
| | | | | this allows us to implement what look like C function calls from user space "directly" to v86 mode code. (Used for calling the PnP BIOS)
* Don't use an absolute path to objcopy.rnordier1998-10-132-4/+4
| | | | Noticed by: Scott Mace <smace@intt.org>
* Override for ELF. Override .s.o suffix rule.rnordier1998-10-111-1/+5
|
* Fix for "get base memory" bug found and mostly fixed by Mike.rnordier1998-10-062-4/+4
|
* The BIOS memory size is only a word. Some BIOSsen have garbage in the othermsmith1998-10-062-4/+4
| | | | 16 bits we were reading here, causing loss of arguments.
* Adjust setting of argument pointer for BTX 0.87.rnordier1998-10-041-4/+5
|
* Allocate space for storing of arguments at the end of conventionalrnordier1998-10-042-4/+6
| | | | memory.
* For system calls, reboot without prompting; for exceptions, displayrnordier1998-10-032-52/+24
| | | | message and await reset.
* Map all BTX system pages readable at ring 3.rnordier1998-10-032-34/+24
| | | | | This resolves the firmware problem first raised in connection with PR 8105, although unrelated.
* Fix an egregious precedence bug.msmith1998-10-021-5/+5
|
* Mark exit() as __attribute__((__noreturn__))msmith1998-10-021-2/+2
|
* Make these compile when there is an obj dir.peter1998-09-252-18/+8
|
* Initial integration of the i386 bootloader and BTX.msmith1998-09-174-8/+21
| | | | | | | | | | | - Discard large amounts of BIOS-related code in favour of the more compact BTX vm86 interface. - Build the loader module as ELF, although the resulting object is a.out, make gensetdefs 32/64-bit sensitive and use a single copy of it. - Throw away installboot, as it's no longer required. - Use direct bcopy operations in the i386_copy module, as BTX maps the first 16M of memory. Check operations against the detected size of actual memory.
* Add exec syscall.rnordier1998-09-152-4/+54
|
* Resynch with working sources before BTX integration.msmith1998-09-142-2/+11
| | | | | | | | | | | - Use format-independant module allocator. - Conditionalise ISA PnP support. - Simplify PnP enumerator interface. - Improve module/object searching. - Add missing depend/install targets in BTX makefiles. - Pass the kernel environment and module data in extended bootinfo fields. - Add a pointer to the end of the kernel + modules in bootinfo. - Fix parsing of old-style kernel arguments.
* Add BTX startup/interface code.rnordier1998-09-146-2/+235
|
* Enable client entry point support.rnordier1998-09-132-4/+4
|
* Add btxldr, a BTX loader for ELF clients.rnordier1998-09-124-2/+758
|
* This commit was generated by cvs2svn to compensate for changes in r39088,rnordier1998-09-124-0/+1023
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * BTX (aka the boot extender) is an i386 kernel that hosts 32-bitrnordier1998-09-124-0/+1023
| | | | | bootstrap programs, and provides page-level protection, hardware interrupt reflection, a virtual-8086 mode interface to BIOS, etc.
* BTX (aka the boot extender) is an i386 kernel that hosts 32-bitrnordier1998-09-121-0/+937
bootstrap programs, and provides page-level protection, hardware interrupt reflection, a virtual-8086 mode interface to BIOS, etc.
OpenPOWER on IntegriCloud