summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/loader
Commit message (Collapse)AuthorAgeFilesLines
* MFC 304018: Add defines needed to export SMBIOS serial numbersjhb2016-08-191-0/+12
| | | | | | | | Some defines needed for exporting serial numbers from the SMBIOS were missed during integration of SMBIOS support in the EFI boot loader (r281138). This is needed for getting the hostid set from the system hardware UUID. PR: 206031
* MFC r296769: boot/efi: Prefer nm to objdumpemaste2016-04-111-3/+3
| | | | | | | | | Both objdump and nm are equally capable of reporting undefined symbols. This gets us a step closer to building without binutils as we have an nm implementation from ELF Tool Chain. Sponsored by: The FreeBSD Foundation
* MFC: r292563marius2016-04-043-7/+7
| | | | | | | | loader.efi: strip trailing whitespace MFC: r293244 (remainder missing in r294275) Introduce and use new EFI_ERROR_CODE macro for EFI errors
* MFC: r287299 [1]marius2016-02-221-23/+502
| | | | | | | | | | | | | | | | | | | Add a gop command to help diagnose VT efifb problems. The gop command has the following sub-commands: list - list all possible modes (paged) get - return the current mode set <mode> - set the current mode to <mode> MFC: r287317, r287422, r287475, r287489, r287538 [2] Add support for the UGA draw protocol. This includes adding a command called 'uga' to show whether UGA is implemented by the firmware and what the settings are. It also includes filling the efi_fb structure from the UGA information when GOP isn't implemented by the firmware. PR: 207313 [1], 202730 [2] Approved by: re (gjb)
* Merge from current r294767,294769,295408imp2016-02-111-13/+184
| | | | | | | | r294767: Parse command line arguments in loader.fi r294769: Allow newlines to be treated as whitespace when parsing args r295408: Implement -P command line option in for EFI booting. Approved by: re@ (gjb@)
* Catch the EFI loader up to the latest ZFS Boot Environment Menu featuresallanjude2016-02-101-0/+33
| | | | | | | | | | | | | | | MFC: r294072 Move init_zfs_bootenv to sys/boot/zfs/zfs.c instead of having a copy in each loader MFC: r294073 Connect the ZFS boot environment menu to the UEFI loader MFC: r295357 Do not set vfs.root.mountfrom unnecessarily when initializing ZFS BE menu Approved by: re (marius) Relnotes: yes Sponsored by: ScaleEngine Inc.
* MFC r294068, r294265smh2016-01-284-1/+122
| | | | | | | | | | | MFC r294068: Add EFI ZFS boot support MFC r294265: Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works. Relnotes: Yes Sponsored by: Multiplay
* MFC r281060, r294060, r294291, r294493, r294284:smh2016-01-282-32/+68
| | | | | | | | | | | | | | | | | | | MFC r281060: Remove an unnecessary space in a printf call MFC r294060: Modularise EFI boot loader MFC r294291 (by andrew): Reset the filesystem cache MFC r294493: Fix EFI UFS caching MFC r294284 (by emaste): boot1: correct typo in error message Sponsored by: Multiplay
* MFC r281169, r293724, r293796, r294029, r294041, r294058smh2016-01-2810-21/+34
| | | | | | | | | | | | | | | | | | | | | | MFC r281169 (by andrew): Make global variabled only used in this file static MFC r294058: Make common boot file_loadraw name parameter const MFC r294041: Remove unused reg param from fdt_fixup_memory MFC r293724: Enable warnings in EFI boot code MFC r293796: Fix typo in libefi.c MFC r294029: Only build EFI components on supported compilers Sponsored by: Multiplay
* MFC r293274:smh2016-01-251-2/+2
| | | | | | style(9) fixes for EFI boot Sponsored by: Multiplay
* MFC r293245: loader.efi style(9) cleanupemaste2016-01-201-35/+29
| | | | Submitted by: smh
* MFC r293233: loader.efi: add terminal emulation supportemaste2016-01-201-1/+2
| | | | | | | This is based on the vidconsole implementation. Submitted by: Toomas Soome <tsoome@me.com> Relnotes: Yes
* MFC r292584:ian2016-01-191-2/+25
| | | | | | | | | | | | | | Set env vars from values on the efi loader command line. Examine each cmdline arg and if it contains an '=' convert it to ascii and pass it to putenv(). This allows var=value settings to come in on the command line. This will allow overriding dhcp server-provided data in loader(8), as discussed in PR 202098 PR: 202098 Relnotes: Yes (this goes together with r294343)
* MFC r293244: Introduce and use new EFI_ERROR_CODE macro for EFI errorsemaste2016-01-182-5/+4
|
* MFC r293165: loader.efi: support non-contiguous console modesemaste2016-01-181-2/+3
|
* MFC r287930: Various small cleanups to EFI loader Makefiles.emaste2016-01-181-2/+1
|
* MFC r281524 by andrew@: Use MACHINE in the efi loader when it is what we meanemaste2016-01-071-7/+7
| | | | | | | It may not be the same as MACHINE_CPUARCH, it just happened to be the case the architectures this code currently supports. Fixes build failure reported by Oliver Pinter.
* loader.efi: combine GetMemoryMap and ExitBootServices and retry on erroremaste2016-01-073-52/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r292338: UEFI: combine GetMemoryMap and ExitBootServices and retry on error The EFI memory map may change before or during the first ExitBootServices call. In that case ExitBootServices returns an error, and GetMemoryMap and ExitBootServices must be retried. Glue together calls to GetMemoryMap(), ExitBootServices() and storage of (now up-to-date) MODINFOMD_EFI_MAP metadata within a single function. That new function - bi_add_efi_data_and_exit() - uses space previously allocated in bi_load_efi_data() to store the memory map (it will fail if that space is too short). It handles re-calling GetMemoryMap() once to update the map key if necessary. Finally, if ExitBootServices() is successful, it stores the memory map and its header as MODINFOMD_EFI_MAP metadata. ExitBootServices() calls are now done earlier, from within arch- independent bi_load() code. MFC r292442: loader.efi: show EFI error number, not full status value EFI return values set the high bit to indicate an error. The log messages changed here are printed only in the case of an error, so including the error bit is redundant. Also switch to decimal to match the error definitions (in sys/boot/efi/include/efierr.h). MFC r292515: loader.efi: refresh size in GetMemoryMap retry loop If ExitBootServices fails due to a changed efi_mapkey then GetMemoryMap must be called again. In this case it is also possible for the memory map to grow, so repeat the initial GetMemoryMap call to fetch the new size. Also roll bi_add_efi_data_and_exit into bi_load_efi_data as there's no need for it to be a separate function. PR: 202455 Relnotes: Yes Sponsored by: The FreeBSD Foundation
* MFC r281138: SMBIOS support for EFIemaste2016-01-072-1/+16
| | | | Restore smbios support lost in r293297
* MFC r288372: Use EFI page size constants instead of hardcoding 4096emaste2016-01-071-3/+3
|
* MFC r287934: Increase EFI staging size from 32MB to 48MBemaste2016-01-071-1/+1
| | | | | | | | | The EFI boot loader allocates a single chunk of contiguous memory to hold the kernel, modules, and any other loaded data. This memory block is relocated to the kernel's expected location during the transfer of control from the loader to the kernel. PR: 201679
* MFC r280950: Move the efi loaders to be under sys/boot/efiemaste2016-01-0717-0/+1966
| | | | | In HEAD this was done to support UEFI on arm64. Merging to stable/10 to facilitate the merging of later UEFI changes.
* This file was repocopied to src/sys/boot/ia64/efi.marcel2004-11-234-740/+0
|
* Remove struct ia64_itir and use a plain old uint64_t instead.marcel2004-11-211-3/+4
|
* Redefine a PTE as a 64-bit integral type instead of a struct ofmarcel2004-09-231-20/+16
| | | | | bit-fields. Unify the PTE defines accordingly and update all uses.
* Catch up with change to <machine/pte.h>.marcel2004-08-101-9/+8
|
* Fix the creation of EFI images that got broken by the import ofmarcel2004-07-201-2/+2
| | | | | | | | | 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.
* Don't create a mapfile during link. It's not needed for the build.marcel2004-02-131-2/+2
|
* Tidy up makefiles.ru2004-02-121-72/+20
| | | | Tested by: marcel
* Don't hardcode unit 0 for the current device if we're loaded from anmarcel2003-08-021-17/+8
| | | | | | | | | | | | 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
* Use __FBSDID rather than rcsid[].obrien2003-04-032-8/+4
|
* 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.
* Consistently use NOFORTH to control the usage of ficl.obrien2003-02-261-4/+3
|
* 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-102-14/+6
| | | | | | | | | | | | | 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)
* Change the startup code to fix a memory leak and to allow us tomarcel2002-12-101-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* 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)
* Remove a left-over virtual mapping of uncached I/O port space.marcel2002-11-281-0/+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)
* Disable loader ufs support. It causes the loader to crash on the Itanium2peter2002-07-201-1/+1
| | | | | box that I have. We have no EFI disk drivers yet anyway (maybe that is the problem).
* Fix printf format errorspeter2002-07-201-2/+2
|
* -ffreestanding is the word.obrien2002-05-101-0/+1
| | | | | (also resort some CFLAGS such that the more "important" value are first so they are easier to see)
* We must not let install(1) strip loader.efi when installing it, or thepeter2002-04-071-0/+1
| | | | resulting binary will be damaged and no longer work.
* Set BINDIRpeter2002-04-071-0/+1
|
* Add loader bootforth infrastructure and install it.peter2002-04-071-4/+20
|
* Try and tidy up some very loose ends with paths to various libraries etc.peter2002-04-061-3/+15
|
* Do not assume that ${OBJCOPY} variable exists. It was hidden by thepeter2002-04-061-0/+1
| | | | fact that the 'ia64-make' wrapper explicitly set it.
* Fix self hosted loader building. When you use a self configured gcc, itpeter2002-04-061-1/+0
| | | | | | | | | | | | | detects and uses the gas section merge support. As a result, a whole bunch of new sections arrive, including .rodata.str1.8, which was not included in our custom ldscript.ia64. The result was a loader binary that EFI rejected. While here, collect the loader shell commands linker set and include it in the data area rather than having its own section. /boot/loader.efi was the last holdout for having a 100% self built ia64 system.
OpenPOWER on IntegriCloud