stand/efi: Changes to efichar to allow it to be used in the kernelReplace malloc/free with EFICHAR_MALLOC and EFICHAR_FREEE macros.Obtained from: Juniper Networks, Inc.Reviewed by: impDifferent
stand/efi: Changes to efichar to allow it to be used in the kernelReplace malloc/free with EFICHAR_MALLOC and EFICHAR_FREEE macros.Obtained from: Juniper Networks, Inc.Reviewed by: impDifferential Revision: https://reviews.freebsd.org/D44541
show more ...
stand: Fix typo (triple S)Reviewed by: impPull Request: https://github.com/freebsd/freebsd-src/pull/955
stand/efi: Consolidate integer typesWe have no need for 5 different copies of these.Sponsored by: NetflixReviewed by: rcm, kevans, andrewDifferential Revision: https://reviews.freebsd.org/D42
stand/efi: Consolidate integer typesWe have no need for 5 different copies of these.Sponsored by: NetflixReviewed by: rcm, kevans, andrewDifferential Revision: https://reviews.freebsd.org/D42699
Remove $FreeBSD$: one-line .c comment patternRemove /^/[*/]\s*\$FreeBSD\$.*\n/
Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
libefi: add efi_devpath_next_instance()UEFI device path may be path to one device, or concatenated list of instancesto different devices (textually represented as comma separated list).Provide g
libefi: add efi_devpath_next_instance()UEFI device path may be path to one device, or concatenated list of instancesto different devices (textually represented as comma separated list).Provide generic function to get next instance from device path.Returns next instance or end node.The use case is like:EFI_DEVICE_PATH *node = (EFI_DEVICE_PATH *)buf;while (!IsDevicePathEnd(node)) { process(node); node = efi_devpath_next_instance(node);}Where buf is pointing to either single device path orconcatenated list of device paths (such as from ConIn or ConOut).Reviewers: impDifferential Revision: https://reviews.freebsd.org/D40081
stand: Create common gen_setcurrdev and replace codeReplace 4 identical copies of *_setcurrdev with gen_setcurrdev to avoidhaving to create a 5th copy. uboot_setcurrdev is actually different andn
stand: Create common gen_setcurrdev and replace codeReplace 4 identical copies of *_setcurrdev with gen_setcurrdev to avoidhaving to create a 5th copy. uboot_setcurrdev is actually different andneeds to remain separate (even though it's quite similar).Sponsored by: NetflixReviewed by: fuz@fuz.su, kevansDifferential Revision: https://reviews.freebsd.org/D38003
stand: efi_fmtdev can be reduced to devformatdevformat produces the same output as efi_fmtdev, so just use it toreduce on the dependencies.Sponsored by: NetflixDifferential Revision: https://r
stand: efi_fmtdev can be reduced to devformatdevformat produces the same output as efi_fmtdev, so just use it toreduce on the dependencies.Sponsored by: NetflixDifferential Revision: https://reviews.freebsd.org/D35924
loader.efi: fix panic() after BS offpanic() is using multiple services - attempting to readkeyboard, accessing time functions and finally, exiting the loader.Protect all the accessed listed abov
loader.efi: fix panic() after BS offpanic() is using multiple services - attempting to readkeyboard, accessing time functions and finally, exiting the loader.Protect all the accessed listed above. Note, when BS are off,we really can not just exit the loader, we only can reboot.MFC after: 1 week
stand: Fix a common typo in source code comments- s/existance/existence/MFC after: 3 days
Add support for getting early entropy from UEFIUEFI provides a protocol for accessing randomness. This is a good wayto gather early entropy, especially when there's no driver for the RNGon the pl
Add support for getting early entropy from UEFIUEFI provides a protocol for accessing randomness. This is a good wayto gather early entropy, especially when there's no driver for the RNGon the platform (as is the case on the Marvell Armada8k (MACCHIATObin)for now).If the entropy_efi_seed option is enabled in loader.conf (default: YES)obtain 2048 bytes of entropy from UEFI and pass is to the kernel as a"module" of name "efi_rng_seed" and type "boot_entropy_platform"; ifpresent, ingest it into the kernel RNG.Submitted by: Greg VReviewed by: markm, kevansApproved by: csprng (markm)MFC after: 3 weeksDifferential Revision: https://reviews.freebsd.org/D20780
loader: abstract boot services exiting to libefi functionMove direct call of ExitBootServices to efi_exit_boot_services. Thisfunction sets boot_services_active to false so callers don't have to d
loader: abstract boot services exiting to libefi functionMove direct call of ExitBootServices to efi_exit_boot_services. Thisfunction sets boot_services_active to false so callers don't have to doit everywhere (though currently only loader/bootinfo.c is affected).Sponsored by: NetflixDifferential Revision: https://reviews.freebsd.org/D32226
efi(8): Fix a typo in a source code comment- s/writting/writing/MFC after: 3 days
efi: switch boot_services_gone to boot_services_activeTurn the presence or absence of boot services into a positive bool (andchange its type to bool). Move declaration to efi.h in the globalvaria
efi: switch boot_services_gone to boot_services_activeTurn the presence or absence of boot services into a positive bool (andchange its type to bool). Move declaration to efi.h in the globalvariables section.Sponsored by: NetflixReviewed by: tsoome, kibDifferential Revision: https://reviews.freebsd.org/D31814
Fix some common typos in comments- occured -> occurred- normaly -> normally- controling -> controlling- fileds -> fields- insterted -> inserted- outputing -> outputtingMFC after: 1 week
loader: implement framebuffer consoleDraw console on efi.Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list,vbe set xxx).autoload font (/boot/fonts) based on resolution and font size
loader: implement framebuffer consoleDraw console on efi.Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list,vbe set xxx).autoload font (/boot/fonts) based on resolution and font size.Add command loadfont (set font by file) andvariable screen.font (set font by size). Pass loaded font to kernel.Export variables:screen.heightscreen.widthscreen.depthAdd gfx primitives to draw the screen and put png image on the screen.Rework menu draw to iterate list of consoles to enamble device specificoutput.Probably something else I forgot...Relnotes: yesDifferential Revision: https://reviews.freebsd.org/D27420
RISC-V boot1.efi and loader.efi supportThis implementation doesn't have any major deviations from the other EFIports. I've copied the boilerplate from arm and arm64.I've tested this with the fol
RISC-V boot1.efi and loader.efi supportThis implementation doesn't have any major deviations from the other EFIports. I've copied the boilerplate from arm and arm64.I've tested this with the following boot flows:OpenSBI (M-mode) -> u-boot (S-mode) -> loader.efi -> FreeBSDOpenSBI (M-mode) -> u-boot (S-mode) -> boot1.efi -> loader.efi -> FreeBSDDue to the way that u-boot handles secondary CPUs, OpenSBI >= v0.7 is required,as the HSM extension is needed to bring them up explicitly. Because of this,using BBL as the SBI implementation will not be possible. Additionally, thereare a few recent u-boot changes that are required as well, all of which will bepresent in the upcoming v2020.07 release.Looks good: emasteDifferential Revision: https://reviews.freebsd.org/D25135
stand: remove redundant declarationsThese are picked out by the amd64-gcc6 build; time() is declared in <time.h>and delay() is declared in <bootstrap.h>. These are the correct places forthese in
stand: remove redundant declarationsThese are picked out by the amd64-gcc6 build; time() is declared in <time.h>and delay() is declared in <bootstrap.h>. These are the correct places forthese in stand/, so remove the duplicate declarations and make sure thedelay() consumer in libefi that depended on the extra delay() declarationincludes <bootstrap.h>.MFC after: 1 week
Revert r362466Such change should not have happen without prior discussion and review.With hat: transitioning core
Improve wording to be more precise and clear.No functional change intended.s/Master Boot/Main Boot/ (also called MBR)MFC after: 1 weekSponsored by: Mellanox Technologies
loader.efi: efipart needs better support detecting nested partitionsJust as disks can have nested partitions, the same happens with cd devices,so we need to detect device paths and make sure we wi
loader.efi: efipart needs better support detecting nested partitionsJust as disks can have nested partitions, the same happens with cd devices,so we need to detect device paths and make sure we will not mix the handles.To address this:we fetch handle array and create linked list of block devices.we walk the list and detect parent devices and set children pd_parent.for {fd, cd, hd}, we walk device list and pick up our devices and store tocorresponding list. We make sure we store parent device first.For sorting we use 3 steps: We check for floppy, we check for cd and theneverything else must be hd.In general, it seems the floppy devices have no parent.CD can have both parents and children (multiple boot entries, partitionsfrom the hybrid disk image).Tested by: cross+freebsd@distal.com on Cisco UCS systems, C200 series (C220M5, C240M4).Also on MBP with UEFI 1.10Reported by: Chriss RossMFC after: 1wDifferential Revision: https://reviews.freebsd.org/D22553
loader: fall back to term_emu on efi console with serial backendIn case of efi console having serial backend (video + serial or only serial),we need to stick with old emulator till we can draw con
loader: fall back to term_emu on efi console with serial backendIn case of efi console having serial backend (video + serial or only serial),we need to stick with old emulator till we can draw console.Eventually we would need to get console terminal emulator to be removedfrom serial console because the serial link already has the terminal.However, we need to implement comconsole on all efi platforms first, thenwe need the ability to draw console, so we do not have to use SimpleTextOutputprotocol (which will write both on video and serial in case of multiplexedComOut).Differential Revision: https://reviews.freebsd.org/D22161
loader: use teken teminal emulator for x86 and uefiReplace mini cons25 emulator with teken, this does enable us proper consoleterminal for loader and will make it possible to implement differentb
loader: use teken teminal emulator for x86 and uefiReplace mini cons25 emulator with teken, this does enable us proper consoleterminal for loader and will make it possible to implement differentback end callbacks to draw to screen.At this time we still only "draw" in text mode.
loader.efi: efilib.h and libefi.c were left out of 350654And this is second followup for 350654
loader: add HTTP support using UEFIAdd support for an HTTP "network filesystem" using the UEFI's HTTPstack.This also supports HTTPS, but TianoCore EDK2 implementations currentlycrash while fetc
loader: add HTTP support using UEFIAdd support for an HTTP "network filesystem" using the UEFI's HTTPstack.This also supports HTTPS, but TianoCore EDK2 implementations currentlycrash while fetching loader files.Only IPv4 is supported at the moment. IPv6 support is planned for afollow-up changeset.Note that we include some headers from the TianoCore EDK II project instand/efi/include/Protocol verbatim, including links to the license insteadof including the full text because that's their preferred way ofcommunicating it, despite not being normal FreeBSD project practice.Submitted by: scottphReviewed by: imp, bcranDifferential Revision: https://reviews.freebsd.org/D20643
123