summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi
Commit message (Collapse)AuthorAgeFilesLines
* Major rework of the ia64 loaders. The two primary objectives are:marcel2006-11-0514-1318/+530
| | | | | | | | | | | | | | 1. Make libefi portable by removing ia64 specific code and build it on i386 and amd64 by default to prevent regressions. These changes include fixes and improvements over previous code to establish or improve APIs where none existed or when the amount of kluging was unacceptably high. 2. Increase the amount of sharing between the efi and ski loaders to improve maintainability of the loaders and simplify making changes to the loader-kernel handshaking in the future. The version of the efi and ski loaders are now both changed to 1.2 as user visible improvements and changes have been made.
* Make this compile on EFI32. The EFI_PHYSICAL_ADDRESS type is alwaysmarcel2006-11-031-1/+1
| | | | 64-bit, even when sizeof(void *) is 32-bit.
* Sync the EFI headers with version 1.10.14.62 of the Intel sample EFImarcel2006-11-0220-647/+1255
| | | | | implementation. This re-introduces C99 style comments that previously were replaced by original C comments.
* Extend struct devdesc with a unit field, called d_unit. Promote themarcel2006-11-023-9/+6
| | | | | | | | | device (kind) specific unit field to the common field. This change allows a future version of libefi to work without requiring anything more than what is defined in struct devdesc and as such makes it possible to compile said version of libefi for different platforms without requiring that those platforms have identical derivatives of struct devdesc.
* Remove more Alpha bits from the boot code including fixing severaljhb2006-05-121-1/+1
| | | | stale comments.
* Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:ru2005-09-221-2/+8
| | | | "boot_dfltroot", "boot_mute", and "boot_pause" respectively.
* Don't try to use 'typedef struct foo' if just 'struct foo' makes more sensestefanf2005-03-072-25/+1
| | | | | | | and works on all compilers. This also removes the need for __CC_SUPPORTS_FORWARD_REFERENCE_CONSTRUCT in <sys/cdefs.h>. OK'ed by: marcel, dfr
* Fix typos in a comment.stefanf2005-03-061-1/+1
|
* netchild's mega-patch to isolate compiler dependencies into a centraljoerg2005-03-021-3/+1
| | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago
* Start each of the license/copyright comments with /*-imp2005-01-053-2/+5
|
* Remove the last vestiges of the userconfig option. None of this actuallyscottl2004-12-011-4/+0
| | | | did anything, so this commit should be considered a NO-OP.
* o Introduce efimd_va2pa() to translate addresses in efi_copy{in|out}()marcel2004-11-283-32/+21
| | | | | and efi_readin(). This removes MD code from copy.c. o Don't unconditionally add pal.S to SRCS. It's specific to ia64.
* This file was repocopied to src/sys/boot/ia64/efi.marcel2004-11-236-1127/+0
|
* Unhook the loader subdirectory. The ia64 EFI loader is now buildmarcel2004-11-231-1/+1
| | | | under ../ia64/efi.
* Remove struct ia64_itir and use a plain old uint64_t instead.marcel2004-11-211-3/+4
|
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Redefine a PTE as a 64-bit integral type instead of a struct ofmarcel2004-09-232-33/+21
| | | | | bit-fields. Unify the PTE defines accordingly and update all uses.
* Catch up with change to <machine/pte.h>.marcel2004-08-101-9/+8
|
* o Support the REL32LSB relocation. It's in the ELF file from whichmarcel2004-07-201-9/+18
| | | | | | | | | we construct the EFI image. It doesn't seem to actually end up in the EFI image, AFAICT. o Replace .quad, .long and .short with data8, data4 and data2 resp. The former are gnuisms. o Redefine _start_plabel as a data16 with @iplt(_start) as its value. This is the preferred way to create user PLT entries.
* Fix the creation of EFI images that got broken by the import ofmarcel2004-07-202-3/+3
| | | | | | | | | binutils 2.15. The linker now creates a .rela.dyn section for dynamic relocations, while our script created a .rela section. Likewise, we copied the .rela section to the EFI image, but not the .rela.dyn section. The fix is to rename .rela to .rela.dyn in the linker script so that all relocations end up in the same section again. This we copy into the EFI image.
* Remove advertising clause from University of California Regent's license,imp2004-04-051-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Reset the text attributes when initializing the console. The EFImarcel2004-03-091-0/+1
| | | | | loader typically doesn't do this so that we end up booting the with whatever the EFI loader has set it to last.
* Don't create a mapfile during link. It's not needed for the build.marcel2004-02-131-2/+2
|
* o Don't build with -fpic. It's not needed and inconsistent with howmarcel2004-02-131-5/+0
| | | | | other constributions are compiled. o Remove powerpc specific additions to CFLAGS.
* Tidy up makefiles.ru2004-02-123-83/+27
| | | | Tested by: marcel
* Convert to __FBSDID.obrien2004-01-045-10/+15
|
* Fix typo in comment.jhb2003-12-101-1/+1
|
* Don't hardcode unit 0 for the current device if we're loaded from anmarcel2003-08-023-18/+23
| | | | | | | | | | | | EFI file system. When booting from a CD and there's already an EFI system partition on the disk, setting the current device to unit 0 will select the harddisk. This invariably breaks installing FreeBSD when other operating systems have been installed before. We obviously want to do the same when we're booting over the network. Maybe later. Based on a patch (from memory) from: arun
* Have the linker script look more like the default linker scriptmarcel2003-07-171-46/+39
| | | | | on ia64. This fixes the breakage caused by the gcc upgrade that resulted in a broken executable.
* sys/ia64/ia64/pal.s has been repocopied to pal.S.ru2003-07-021-1/+1
| | | | | Approved by: marcel Repocopied by: joe
* Enable the i386 loader to load and run an amd64 kernel. If this putspeter2003-05-011-3/+3
| | | | | | | | | | | | | | | things over floppy size limits, I can exclude it for release builds or something like that. Most of the changes are to get the load_elf.c file into a seperate elf32_ or elf64_ namespace so that you can have two ELF loaders present at once. Note that for 64 bit kernels, it actually starts up the kernel already in 64 bit mode with paging enabled. This is really easy because we have a known minimum feature set. Of note is that for amd64, we have to pass in the bios int 15 0xe821 memory map because once in long mode, you absolutely cannot make VM86 calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader metadata startup, just like sparc64 and powerpc. Much of the infrastructure to support this was adapted from sparc64.
* Use __FBSDID rather than rcsid[].obrien2003-04-038-32/+16
|
* Speed up debugging in the context of unexpected traps by printingmarcel2003-03-011-5/+6
| | | | | the address of the image base of the loader. Given cr.iip, we can use the symbol table to figure out what function caused the trap.
* Paranoia: Don't use the length of the option string alone tomarcel2003-03-011-1/+1
| | | | | determine whether we have command line options. We expect a valid string pointer as well.
* Increase the block size for reading and writing from 8KB to 1MB andmarcel2003-02-261-4/+7
| | | | | | | introduce a preprocessor define for it. The larger block size significantly speeds up the loading of the kernel. Submitted by: Arun Sharma <arun.sharma@intel.com>
* Consistently use NOFORTH to control the usage of ficl.obrien2003-02-261-4/+3
|
* Simplify page alignment.marcel2003-02-201-11/+4
|
* Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.jake2002-12-191-1/+1
|
* Add command `hcdp'. This command dumps the DIG64 HCDP table if onemarcel2002-12-181-0/+75
| | | | exists.
* Pass the HCDP table address to the kernel. If no such table exists,marcel2002-12-105-14/+24
| | | | | | | | | | | | | 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-104-22/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-21/+32
| | | | | | | 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-101-101/+2
| | | | 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-081-6/+10
| | | | | | | | | | | | | | | | | | | 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 :-)
* Remove a left-over virtual mapping of uncached I/O port space.marcel2002-11-282-17/+3
| | | | | | | | | | | | | 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)
* MFp4:marcel2002-11-241-5/+24
| | | | | | | | | 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)
OpenPOWER on IntegriCloud