summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
...
* Always use the smaller GCC builtin memcpyphk2002-12-142-20/+0
|
* Remove unused variable.phk2002-12-142-2/+2
|
* Don't fill in the table with the BIOS idea about disk-geometry, we don'tphk2002-12-142-30/+0
| | | | use it. This saves a surprising number of bytes.
* Uniformly refer to a file system as "file system".ru2002-12-122-2/+2
| | | | Approved by: re
* Pass the HCDP table address to the kernel. If no such table exists,marcel2002-12-108-28/+33
| | | | | | | | | | | | | NULL is passed. The address of the HCDP table can be found by iterating over the configuration tables in the EFI system table. To avoid more duplication, a function can be called with the GUID of interest. The function will do the scanning. Use the function in all places where we iterate over the configuration tables in an attempt to find a specific one. Bump the loader version number as the result of this. Approved by: re (blanket)
* The exit() function has been moved to libefi.c to better deal withmarcel2002-12-101-39/+0
| | | | | | | cleaning up after ourselves. Approved by: re (blankoscheck) German corrections: Alexander (both :-)
* Change the startup code to fix a memory leak and to allow us tomarcel2002-12-105-41/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accept load options (=command line options). The call graph changes from *entry*->efi_main->efi_init, where efi_main is the EFI equivalent of main to *entry*->efi_main->main, where main is what you'd expect. efi_main now is what efi_init was. The prototype of main follows that of C. The first argument is argc and the second is argv. There is no third argument. Allocation of heap pages is now handled by the EFI library and it now deallocates the pages when main() returns or when exit() is called. This allows us to safely return to the boot manager (or EFI shell) without leaks. EFI applications are responsible to free all memory themselves. Handling of the load options is a bit tricky. There are either no load options, load options in ASCII or load options in Unicode. The EFI library will translate the ASCII options to Unicode options as to simplify user code. Since the load options are passed as a single string (if present) and main() accepts argc and argv, the startup code also has to split the string into words and build the argv vector. Here the trickiness starts. When the loader is started from the EFI shell, argv[0] will automaticly load the program name. In all other cases (ie through the boot manager), this is not the case. Unfortunately, there's no trivial way to check. Hence, a set of conditions is checked to determine if we need to fill in argv[0] ourselves or not. This checking is not perfect. There are known cases where it fails to do the right thing. The logic works for most expected cases, though. This includes the case where no options are given. Approved by: re (blanket)
* o Make all GUID variables global to maximize reuse.marcel2002-12-102-42/+64
| | | | | | | o Recognize the HCDP configuration table. o Dump the GUID of tables we don't recognize. Approved by: re (carte blanche)
* Build EFI with -fshort-wchar so that L"some string" works with themarcel2002-12-101-1/+1
| | | | EFI has defined CHAR16.
* Remove _putchar, _puts and _puthex. These functions are unused.marcel2002-12-102-202/+4
| | | | Approved by: re (blanket)
* Add the GUID of the DIG64 HCDP table.marcel2002-12-081-0/+3
|
* The boot manager sets the watchdog timer to 5 minutes before invokingmarcel2002-12-082-12/+20
| | | | | | | | | | | | | | | | | | | a boot option. When the timer expires the machine is rebooted. Disable the watchdog timer for 2 reasons: o We're an interactive program. We cannot guarantee that we've booted the kernel in the time available to us. There have been situations where netbooting the right kernel took 2 tries and more time than given. Not to speak of the normal behaviour to have the loader sitting at the prompt while the user is off doing other things (such as figuring out what to type next ;-) o We may not boot a kernel at all. We may exit as the result of the user typing quit (assuming it took less than 5 minutes to type it :-). It is documented that loaders should have disabled the watchdog timer if they return to the boot manager. Not doing so would cause a reboot while in the boot manager. This appears to be harmless, besides of course the actual reboot. Approved by: re (weisse karte)
* In efi_cons_poll we check if a key is present (pending) by checkingmarcel2002-12-081-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | the signaled state of the apropriate event. As a side-effect of checking the event, it's signaled state is cleared if it was set. In efi_cons_getchar we used to wait for the apropriate event to be signaled before reading a character. This however does not work if we poll before reading the characteri, such as during autoboot. On a more compliant EFI implementation this resulted in the behaviour that hitting a key during autoboot would stop the countdown, but would then wait for a new character to arrive instead of reading the already pending key that stopped the countdown. The correct behaviour for efi_cons_getchar is to try to read a key and if none is pending, to wait for the apropriate event to signal the arrival of a new key. Note that with the previous behaviour, the second key would determine how the autoboot was interrupted. This would indicate that the first key got lost. This indicates that EFI does not necessarily maintain a queue of pending keys. FWIW... Approved by: re (carte blanche) French corrected by: various people :-)
* Fix a dumb bug that broke net booting on sparc64. The wrong length wasjake2002-12-021-1/+1
| | | | | | | | passed to strncmp. Noticed by: tmm Approved by: re Pointy hat to: jake
* Remove a left-over virtual mapping of uncached I/O port space.marcel2002-11-284-34/+6
| | | | | | | | | | | | | Previous kernels unwantingly depended on this mapping, but as of version 1.123 of src/sys/ia64/ia64/machdep.c this dependency has been removed. Consequently, one has to update the kernel before updating the loader. The documented/recommended upgrade will suffice in this case. Due to a visible (from the kernels point of view) change in behaviour, bump the loader version number from 0.3 to 1.0. Approved by: re (carte blanc)
* Enable UFS2 support in boot1. Just as with sparc64 the same boot1 worksjhb2002-11-271-1/+0
| | | | | | great with both UFS1 and UFS2 filesystems. Approved by: re
* Create a new 32-bit fs_flags word in the superblock. Add code to movemckusick2002-11-271-1/+1
| | | | | | | | | | | | | | | | | the old 8-bit fs_old_flags to the new location the first time that the filesystem is mounted by a new kernel. One of the unused flags in fs_old_flags is used to indicate that the flags have been moved. Leave the fs_old_flags word intact so that it will work properly if used on an old kernel. Change the fs_sblockloc superblock location field to be in units of bytes instead of in units of filesystem fragments. The old units did not work properly when the fragment size exceeeded the superblock size (8192). Update old fs_sblockloc values at the same time that the flags are moved. Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk> Sponsored by: DARPA & NAI Labs.
* Eliminate references to defunct kernel tunables.yar2002-11-263-24/+0
| | | | | Approved by: re PR: bin/43343
* MFp4:marcel2002-11-242-10/+48
| | | | | | | | | o Show the contents of the AP wakeup descriptor when dumping SAL information. o Increase S/N ratio when listing the itr and dtr. Only show valid mappings and give the total number of TRs. Approved by: re (blanket)
* The new "all sound drivers" driver name is snd_driver. Loader.conf didn'tdcs2002-11-221-1/+1
| | | | | | knew about it, though. Now it does. MFC after: 2 weeks
* Document loader tunables hw.pci.enable_io_modes andmdodd2002-11-132-0/+24
| | | | | | | hw.pci.allow_unsupported_io_range. Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com> Approved by: re (murray)
* Loader tunable 'machdep.disable_mtrrs'.mdodd2002-11-132-0/+6
| | | | | | | | Sysctl of same name to reflect status. Submitted by: jhb Approved by: re (murray) MFC after: 1 day
* Change the device path representation in libofw to use the full firmwarejake2002-11-1011-647/+93
| | | | | | | | | path, instead of an internal i386 specific one. Don't try to interpret a disklabel in ofw_disk.c, open the partition's device node directly and let the firmware do it. This fixes booting from a partition other than 'a' on sparc64, which is needed to support more installation methods. No objection: ppc
* Correctly recognize both bogus and genuine BSD disklabels.phk2002-11-031-1/+4
| | | | | | Don't expect me to participate in a discussion which is which. Sponsored by: DARPA & NAI Labs.
* Fix indentation of comments.mini2002-11-021-17/+17
|
* Add loader variables to control the loading of various networking modules.mini2002-11-021-0/+31
| | | | Submitted by: David Yeske <dyeske@yahoo.com>
* o Fix a size calculation based on a 8KB page, while under EFImarcel2002-10-245-33/+71
| | | | | | | | | | | | pages are 4KB. o As a second order fix, don't assume we have enough space after the bootinfo block left in a page to hold the memory map. o A third order fix as that we removed the assumption that a bootinfo block fits in a single 8KB page. PR: ia64/39415 submitted by: Espen Skoglund <esk@ira.uka.de>
* Pass the right number of tlb slots to the kernel. The allocation schemetmm2002-10-181-10/+4
| | | | | | | was changed in r1.4, but I neglected to update most of the code in metadata.c. Pointy hat to: tmm
* Compile in support for zipfs and bzipfs so we can load the gzipped mfsrootjake2002-10-132-0/+14
| | | | that releases use.
* Remove '-DUFS1_ONLY' from CFLAGS. It is not needed.nyan2002-10-101-2/+0
|
* Revert MEM_USR back to 0xa000 for BTX clients. Instead, adjust boot2jhb2002-10-088-18/+18
| | | | | | | to run at 0xc000 by changing its virtual start address from 0x1000 to 0x2000. Tested by: phk
* Now that ufsread.c doesn't do 64bit divide remainder operations,phk2002-10-082-30/+4
| | | | | | don't bother with libkern. Sponsored by: DARPA & NAI Labs.
* Save a couple of bytes by not returning ints nobody care about.phk2002-10-082-12/+12
| | | | Sponsored by: DARPA & NAI labs
* It seems that the only problem with UFS2 booting on i386 is the 64bitphk2002-10-081-10/+12
| | | | | | | | | divide/remainder calls. For reasons not resolved, compiling the relevant routines from libkern into boot2 results in stack corruption. Do the simple thing: Don't use 64bit divide/remainder operations. Sponsored by: DARPA & NAI Labs
* Reinstate rev 1.36 with an important line that got missed. Note thisgreen2002-10-082-4/+10
| | | | | also improves the "random undocumented offsets into various memory spaces" a little bit.
* Remove unused TYPE_WD and TYPE_WFD.phk2002-10-082-4/+0
|
* Correctly calculate dmadat: We need to take the address of _end, it'sphk2002-10-082-2/+2
| | | | | | | contents is irrelevant and likely to be zero; This doesn't change the resultant value, but it does save a couple of bytes because &_end is constant.
* Unbreak boot2 by backing out rev 1.36 to Makefile, which does notphk2002-10-082-6/+2
| | | | | | | | | | | | | | | | | | work as advertised: bang# pwd /bang/src/sys/boot/i386/boot2 bang# make clean >& /dev/null bang# cvs -q update -r 1.35 Makefile >& /dev/null bang# make >& /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x725 bang# cvs -q update -r 1.36 Makefile > & /dev/null bang# make clean > & /dev/null bang# make > & /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x25 bang#
* Save four bytes by shortening a string two chars.phk2002-10-082-4/+2
| | | | Sponsored by: DARPA & NAI Labs.
* Correct a bug in adding 0x700 to a number.green2002-10-072-2/+6
|
* Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.phk2002-10-076-12/+84
| | | | | | | | Conditionalize the "XX bytes left" checks reference on UFS1/UFS12. Conditionally build the necessary 64bit math for boot2 if UFS12. Sponsored by: DARPA & NAI Labs.
* Change the comment character from # to // in boot1.s and runphk2002-10-074-646/+648
| | | | | | it through CPP so we can conditionalized things. Sponsored by: DARPA & NAI Labs
* Correctly adjust for moved start address.phk2002-10-072-2/+2
| | | | | | | | It seems that the existence of a "depend" target in src/sys/boot is not to be taken as an indication that it actually does what one would expect, at least it clearly threw my testing off. Apologies to: jhb
* Added '#include <sys/diskpc98.h>'.nyan2002-10-071-0/+1
| | | | Submitted by: kawanobe@st.rim.or.jp (Kawanobe Koh)
* Correctly compensate for both offset and unoffset on-disk BSD disklabels.phk2002-10-072-2/+4
| | | | Sponsored by: DARPA & NAI Labs.
* Move MEM_USR a page upwards to make space for larger UFS1 boot2.phk2002-10-074-10/+10
| | | | | | | Load 4 sectors more than we used to. This is harmless overhead for the UFS1_ONLY case, but sufficient for boot2(UFS1+2). Sponsored by: DARPA & NAI Labs
* Ups, forgot to tell cvs commit about this file.phk2002-10-071-0/+1
| | | | | | Move UFS1_ONLY to Makefiles instead of common/ufsread.c Sponsored by: DARPA & NAI Labs
* Move the definition of UFS1_ONLY into the Makefiles where it belongs.phk2002-10-074-3/+5
| | | | Sponsored by: DARPA & NAI Labs.
* Connected boot2.nyan2002-10-031-1/+1
|
* Added some header files from -stable and fixed the boot[12] programs.nyan2002-10-038-7/+1077
|
OpenPOWER on IntegriCloud