summaryrefslogtreecommitdiff
path: root/sys/boot/efi
Commit message (Collapse)AuthorAgeFilesLines
* MFaltix:Marcel Moolenaar2011-03-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Pre-Boot Virtual Memory (PBVM) to the loader. PBVM allows us to link the kernel at a fixed virtual address without having to make any assumptions about the physical memory layout. On the SGI Altix 350 for example, there's no usuable physical memory below 192GB. Also, the PBVM allows us to control better where we're going to physically load the kernel and its modules so that we can make sure we load the kernel in memory that's close to the BSP. The PBVM is managed by a simple page table. The minimum size of the page table is 4KB (EFI page size) and the maximum is currently set to 1MB. A page in the PBVM is 64KB, as that's the maximum alignment one can specify in a linker script. The bottom line is that PBVM is between 64KB and 8GB in size. The loader maps the PBVM page table at a fixed virtual address and using a single translations. The PBVM itself is also mapped using a single translation for a maximum of 32MB. While here, increase the heap in the EFI loader from 512KB to 2MB and set the stage for supporting relocatable modules. Notes: svn path=/head/; revision=219691
| * Merge svn+ssh://svn.freebsd.org/base/head@219553Marcel Moolenaar2011-03-121-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/altix/; revision=219554
| * | Bump the heap size to 2MB. We typically have the memory for it, so there'sMarcel Moolenaar2011-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | no point in being stingy. Notes: svn path=/projects/altix/; revision=219536
* | | Revert previous commit: EFI_STATUS is a 64-bit integral on ia64. Fix theMarcel Moolenaar2011-03-161-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | compile warning on i386 (where EFI_STATUS is a 32-bit integral) by casting the status argument to u_long instead. Pointy hat: brucec MFC after: 3 days Notes: svn path=/head/; revision=219683
* | Handle memory allocation failures in include().Rebecca Cran2011-02-231-1/+1
|/ | | | | | | | | PR: i386/85652 Submitted by: Ben Thomas <bthomas at virtualiron.com> MFC after: 3 days Notes: svn path=/head/; revision=218974
* Help static analysis by initializing variables that we know cannot beMarcel Moolenaar2011-01-062-0/+2
| | | | | | | used uninitialized, but which cannot be inferred from the code itself. Notes: svn path=/head/; revision=217067
* MF tbemd: move to using specific architecture makefilesWarner Losh2010-08-231-1/+1
| | | | Notes: svn path=/head/; revision=211679
* Remove file system support based on the simple file system protocolMarcel Moolenaar2010-01-094-446/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | as this only allows us to access file systems that EFI knows about. With a loader that can only use EFI-supported file systems, we're forced to put /boot on the EFI system partition. This is suboptimal in the following ways: 1. With /boot a symlink to /efi/boot, mergemaster complains about the mismatch and there's no quick solution. 2. The EFI loader can only boot a single version of FreeBSD. There's no way to install multiple versions of FreeBSD and select one at the loader prompt. 3. ZFS maintains /boot/zfs/zpool.cache and with /boot a symlink we end up with the file on a MSDOS file system. ZFS does not have proper handling of file systems that are under Giant. Implement a disk device based on the block I/O protocol instead and pull in file system code from libstand. The disk devices are really the partitions that EFI knows about. This change is backward compatible. MFC after: 1 week Notes: svn path=/head/; revision=201941
* Enable GCC stack protection (aka Propolice) for userland:Ruslan Ermilov2008-06-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64. Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work. Submitted by: Jeremie Le Hen <jeremie@le-hen.org> Notes: svn path=/head/; revision=180012
* Major rework of the ia64 loaders. The two primary objectives are:Marcel Moolenaar2006-11-0514-1315/+527
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=164010
* Make this compile on EFI32. The EFI_PHYSICAL_ADDRESS type is alwaysMarcel Moolenaar2006-11-031-1/+1
| | | | | | | 64-bit, even when sizeof(void *) is 32-bit. Notes: svn path=/head/; revision=163929
* Sync the EFI headers with version 1.10.14.62 of the Intel sample EFIMarcel Moolenaar2006-11-0220-637/+1245
| | | | | | | | implementation. This re-introduces C99 style comments that previously were replaced by original C comments. Notes: svn path=/head/; revision=163898
* Extend struct devdesc with a unit field, called d_unit. Promote theMarcel Moolenaar2006-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. Notes: svn path=/head/; revision=163897
* Remove more Alpha bits from the boot code including fixing severalJohn Baldwin2006-05-121-1/+1
| | | | | | | stale comments. Notes: svn path=/head/; revision=158467
* Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:Ruslan Ermilov2005-09-221-2/+8
| | | | | | | "boot_dfltroot", "boot_mute", and "boot_pause" respectively. Notes: svn path=/head/; revision=150469
* Don't try to use 'typedef struct foo' if just 'struct foo' makes more senseStefan Farfeleder2005-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 Notes: svn path=/head/; revision=143250
* Fix typos in a comment.Stefan Farfeleder2005-03-061-1/+1
| | | | Notes: svn path=/head/; revision=143176
* netchild's mega-patch to isolate compiler dependencies into a centralJoerg Wunsch2005-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 Notes: svn path=/head/; revision=143063
* Start each of the license/copyright comments with /*-Warner Losh2005-01-053-2/+5
| | | | Notes: svn path=/head/; revision=139738
* Remove the last vestiges of the userconfig option. None of this actuallyScott Long2004-12-011-4/+0
| | | | | | | did anything, so this commit should be considered a NO-OP. Notes: svn path=/head/; revision=138249
* o Introduce efimd_va2pa() to translate addresses in efi_copy{in|out}()Marcel Moolenaar2004-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. Notes: svn path=/head/; revision=138141
* This file was repocopied to src/sys/boot/ia64/efi.Marcel Moolenaar2004-11-236-1127/+0
| | | | Notes: svn path=/head/; revision=138026
* Unhook the loader subdirectory. The ia64 EFI loader is now buildMarcel Moolenaar2004-11-231-1/+1
| | | | | | | under ../ia64/efi. Notes: svn path=/head/; revision=138004
* Remove struct ia64_itir and use a plain old uint64_t instead.Marcel Moolenaar2004-11-211-3/+4
| | | | Notes: svn path=/head/; revision=137978
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+1
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* Redefine a PTE as a 64-bit integral type instead of a struct ofMarcel Moolenaar2004-09-232-33/+21
| | | | | | | | bit-fields. Unify the PTE defines accordingly and update all uses. Notes: svn path=/head/; revision=135630
* Catch up with change to <machine/pte.h>.Marcel Moolenaar2004-08-101-9/+8
| | | | Notes: svn path=/head/; revision=133420
* o Support the REL32LSB relocation. It's in the ELF file from whichMarcel Moolenaar2004-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. Notes: svn path=/head/; revision=132437
* Fix the creation of EFI images that got broken by the import ofMarcel Moolenaar2004-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. Notes: svn path=/head/; revision=132435
* Remove advertising clause from University of California Regent's license,Warner Losh2004-04-051-4/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core Notes: svn path=/head/; revision=127919
* Reset the text attributes when initializing the console. The EFIMarcel Moolenaar2004-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. Notes: svn path=/head/; revision=126764
* Don't create a mapfile during link. It's not needed for the build.Marcel Moolenaar2004-02-131-2/+2
| | | | Notes: svn path=/head/; revision=125767
* o Don't build with -fpic. It's not needed and inconsistent with howMarcel Moolenaar2004-02-131-5/+0
| | | | | | | | other constributions are compiled. o Remove powerpc specific additions to CFLAGS. Notes: svn path=/head/; revision=125766
* Tidy up makefiles.Ruslan Ermilov2004-02-123-83/+27
| | | | | | | Tested by: marcel Notes: svn path=/head/; revision=125729
* Convert to __FBSDID.David E. O'Brien2004-01-045-10/+15
| | | | Notes: svn path=/head/; revision=124140
* Fix typo in comment.John Baldwin2003-12-101-1/+1
| | | | Notes: svn path=/head/; revision=123399
* Don't hardcode unit 0 for the current device if we're loaded from anMarcel Moolenaar2003-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 Notes: svn path=/head/; revision=118346
* Have the linker script look more like the default linker scriptMarcel Moolenaar2003-07-171-46/+39
| | | | | | | | on ia64. This fixes the breakage caused by the gcc upgrade that resulted in a broken executable. Notes: svn path=/head/; revision=117676
* sys/ia64/ia64/pal.s has been repocopied to pal.S.Ruslan Ermilov2003-07-021-1/+1
| | | | | | | | Approved by: marcel Repocopied by: joe Notes: svn path=/head/; revision=117158
* Enable the i386 loader to load and run an amd64 kernel. If this putsPeter Wemm2003-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. Notes: svn path=/head/; revision=114379
* Use __FBSDID rather than rcsid[].David E. O'Brien2003-04-038-32/+16
| | | | Notes: svn path=/head/; revision=113038
* Speed up debugging in the context of unexpected traps by printingMarcel Moolenaar2003-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. Notes: svn path=/head/; revision=111693
* Paranoia: Don't use the length of the option string alone toMarcel Moolenaar2003-03-011-1/+1
| | | | | | | | determine whether we have command line options. We expect a valid string pointer as well. Notes: svn path=/head/; revision=111692
* Increase the block size for reading and writing from 8KB to 1MB andMarcel Moolenaar2003-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> Notes: svn path=/head/; revision=111543
* Consistently use NOFORTH to control the usage of ficl.David E. O'Brien2003-02-261-4/+3
| | | | Notes: svn path=/head/; revision=111536
* Simplify page alignment.Marcel Moolenaar2003-02-201-11/+4
| | | | Notes: svn path=/head/; revision=111168
* Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.Jake Burkholder2002-12-191-1/+1
| | | | Notes: svn path=/head/; revision=108100
* Add command `hcdp'. This command dumps the DIG64 HCDP table if oneMarcel Moolenaar2002-12-181-0/+75
| | | | | | | exists. Notes: svn path=/head/; revision=108025
* Pass the HCDP table address to the kernel. If no such table exists,Marcel Moolenaar2002-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) Notes: svn path=/head/; revision=107733
* The exit() function has been moved to libefi.c to better deal withMarcel Moolenaar2002-12-101-39/+0
| | | | | | | | | | cleaning up after ourselves. Approved by: re (blankoscheck) German corrections: Alexander (both :-) Notes: svn path=/head/; revision=107724