summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
AgeCommit message (Collapse)Author
2019-05-11whitespace removalMike Larkin
2019-05-11whitespace removalMike Larkin
2019-05-11whitespace removalMike Larkin
2019-05-11Further cleanup of efi32/64.Mike Larkin
Removes some code and files not needed by efi32 and efi64. ok guenther
2019-05-11Refactor efiboot into 32 and 64 bit copies.Mike Larkin
Make 2 separate efiboots, one for 32 bit and one for 64 bit to allow us to remove lots of #ifdef code. Needed to ease the development effort for random-VA linked kernels ok tedu, deraadt
2019-05-11Refactor efiboot into 32 and 64 bit copies.Mike Larkin
Make 2 separate efiboots, one for 32 bit and one for 64 bit to allow us to remove lots of #ifdef code. Needed to ease the development effort for random-VA linked kernels ok tedu, deraadt
2019-05-10Disentangle #ifdef EFIBOOT.Mike Larkin
Separate out files used by both BIOS and EFI boot modes. These files had many #ifdef EFIBOOT code paths that make it difficult to move forward with changes needed to support random base VA linked kernels. ok deraadt@
2019-05-05Add support for the EFI Random Number Generator Protocol and use it to XORMark Kettenis
random data into the buffer that we feed the kernel. ok deraadt@, mlarkin@
2019-04-25Add a check to tftp_open() that we are actually opening a TFTP device.Christian Weisgerber
When reading a file from a non-TFTP device, clear the bootmac variable to prevent the kernel from going into netboot mode. This allows loading a kernel from a disk device after having booted efiboot from PXE. style tweak and ok kettenis@
2019-04-20When copying the EFI-stored kernel to the correct operating location,Theo de Raadt
use memmove. We don't know whether EFI allocated overlapping memory.
2019-04-20libsa's memcpy() is actually memmove(). make a proper memmove(), and giveTheo de Raadt
memcpy() correct behaviour. This also brings the bcopy() macro into line.
2019-04-10crank versionsTheo de Raadt
2019-04-10change marks[] array to uint64_t, so the code can track full 64-bitTheo de Raadt
details from the ELF header instead of faking it. Proposal from mlarkin, tested on most architectures already
2019-04-08crank version; looks good deraadtFlorian Obser
2019-03-15Many machines with serial ports ship with uefi firmware which does notJonathan Gray
have the serial io protocol. Fallback to direct inb/outb hardware access in this case using code derived from arch/amd64/stand/libsa/bioscons.c ok kettenis@
2019-01-02markup boot prompt commands using Ic, not Nm; ok jmc@anton
2018-12-16Avoid using a too big bounce buffer by splitting up large reads. AllowsOtto Moerbeek
for booting using large (64k) blocksize filesystems. ok tedu@
2018-12-10Ensure that we close the file descriptor after loading microcode.Joel Sing
Otherwise we end up keeping file descriptor and inode related buffers around, that are unnecessarily consuming memory. ok deraadt@ patrick@
2018-12-10Do not call free on a non-allocated pointer.Joel Sing
ok deraadt@
2018-11-20Fix typos in memprobe address check. Diff from Andrew Daugherity.YASUOKA Masahiko
2018-11-12Fix grammar in commentPhilip Guenther
2018-11-07Document `machine gop [mode]' commandkn
Feedback and OK jmc
2018-10-20Bring over changes from aarch64 to fix building with ld.lld on amd64.Mark Kettenis
ok patrick@, naddy@
2018-10-16Add linker script to assis lld with building something usable that doesn'tMark Kettenis
have a PT_GNU_STACK segment and doesn't pad the bootblocks to a full page. ok naddy@, help from guenther@
2018-10-13Tweak linker flags and objcopy invocation to make things build with lld.Mark Kettenis
BOOTIA32.EFI works but BOOTX64.EFI unfortunately doesn't work yet. ok patrick@
2018-08-24Don't treat UnicodeChar == 0 as a keyboard input.YASUOKA Masahiko
This fixes the problem that which prevents typing the passpharase for softraid on boot. It happened at least with some external keyboards on ThinkPad X2{6,8}0. diff from Frank Groeneveld ok tb
2018-08-10Bump boot loader versions for softraid passphrase handling change.Joel Sing
2018-08-10Retry on incorrect passphrase for softraid crypto boot.Joel Sing
Historically, the softraid crypto support in the boot loaders has only given one attempt to provide the correct passphrase. There were a few reasons for this, including the fact that pkcs5_pbkdf2() allows an empty passphrase and that returning EPERM allowed for another attempt. With the event of KARL and the need for bsd.booted with hibernate resumption, this becomes much more of an issue - if you get the passphrase wrong you fail to resume. There are also other situations like using /etc/boot.conf to switch serial console, but an incorrect passphrase results in the config not being read. Also, bcrypt_pbkdf() does not permit empty passphrases. This reworks the softraid crypto support in the boot loaders so that it loops requesting a valid passphrase until one is provided, or an empty passphrase is entered (at which point it will abort). ok mortimer@ tb@
2018-07-11Detect vmm(4) in the bootloader and automatically switch to the serialMike Larkin
console at 115200 baud. tested by phessler and myself, ok deraadt
2018-07-06Fix efiboot not to panic when a serial which does not exist actuallyYASUOKA Masahiko
is specified as the console. Current implementation can't assume the given device is proved at the callback functions if the system has one serial device at least.
2018-06-18"a = 1; b = 100; c = a * b; if (c == 0) c = 100;"Kenneth R Westerback
is pretty silly. Nuke the if's. ok millert@
2018-04-23Move efi_cleanup() to before the mem_pass() since efi_cleanup() mightYASUOKA Masahiko
change the memory map. diff from Ryan Lennox ok kettenis
2018-04-18crank versionTheo de Raadt
2018-04-18re-enable ucode loading. The problem is the standard memory allocatorTheo de Raadt
cannot handle the larger firmwares, so we must place them somewhere else where the kernel can read them. Let's use 1MB. And pay attention if someone gets burned by this decision. Other solutions get a lot more hairy ok mlarkin jsing
2018-04-15Disable microcode loading added in r1.20 of exec_i386.c.Joel Sing
The implementation tries to allocate sufficient memory to match the size of the microcode file and will blow the boot loader heap when loading a larger microcode file. This has been causing "heap full" errors at boot on some machines. Diagnosed with deraadt@
2018-03-02The UEFI specification states that a watchdog timer should be armed forJonathan Gray
five minutes. Disable the timer to make it possible to use efiboot for more than five minutes. ok patrick@ kettenis@
2018-02-18document "machine video"; requested by tinkerJason McIntyre
while here, put "directory" in the right place
2018-02-06Load the Intel microcode much earlier. So far we had loaded it afterPatrick Wildt
the CPUs identified and then we had to update the CPU flags afterwards. As microcode updates can add/remove instructions and features, we need to load it earlier. Thus, make the bootloader look for the microcode and supply it to the kernel as another bootarg. This way we can update the cores' microcode before we identify them. ok deraadt@
2018-01-30Fix TFTP reading of zero-size files:Christian Weisgerber
The AllocatePages EFI call returns an error when the allocation size is 0. Skip allocating memory and actually transferring the file when it is empty. Properly return the number of unread bytes so that a read() of n bytes does not return n if no bytes were read. While here, disallow lseek() beyond the TFTP file buffer for SEEK_CUR as we already do for SEEK_SET. ok patrick@
2018-01-21Add missing OpenBSD CVS tagPatrick Wildt
2017-12-18Add sizes for free() in libsa for amd64 and i386.Frederic Cambus
OK tom@, deraadt@
2017-11-25Implement network boot support in efiboot(8). This changes efiboot(8)Patrick Wildt
to recognize if it has been booted via PXE. The new TFTP file system layer will then use the matching PXE base code protocol handle to load the files. Since this uses the PXE base code protocol for abstraction instead of the raw Simple Network protocol this will at this point not work on u-boot based machines as needed on ARM. Feedback and ok tom@ Also tested by afresh1@
2017-11-06Modify "machine video" command not to list mode when chaning video mode.YASUOKA Masahiko
diff from Klemens Nanni
2017-11-06Call CD-ROM devices cdN instead of hdN. Also select the booted deviceYASUOKA Masahiko
properly when the system is booted from CD-ROM. Initial diff from FUKAUMI Naoki.
2017-10-17remove the remaining references to .depend files since nothing creates themChristian Weisgerber
any longer; ok espie@ deraadt@
2017-10-11Add "machine gop" command to support changing graphic output mode.YASUOKA Masahiko
The selected mode is used by efifb(4). original diff from Klemens Nanni, tested by Andrew Daugherity
2017-10-06Revert previous video mode when setting GOP SetMode is failed. ThisYASUOKA Masahiko
prevents the video output problem on ThinkPad X121e and so on. diff from Klemens Nanni, test by Andrew Daugherity
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-08-07Add "machine exit" and "machine poweroff" commands to the arm64 and armv7Mark Kettenis
bootloaders. Replace while (1) { } with for (;;) continue; per request from tom@. ok tom@, jsg@
2017-07-31Back out previous commit but handle the case where the device path consistsMark Kettenis
of a single MEDIA_DEVICE_PATH component specially to cater for U-Boot's somewhat broken device path handling. Add comments to prevent confusion in the future. Bump the version number once again. ok brynet@