| #
b3e76948
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
df065f69
|
| 26-Aug-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: More sensible defaults when ConOut is missing
When ConOut is missing, we used to default to serial. Except we did it in the worst way possible by just setting the howto bits and not updating
stand: More sensible defaults when ConOut is missing
When ConOut is missing, we used to default to serial. Except we did it in the worst way possible by just setting the howto bits and not updating the console setting, which lead to weird behavior where we'd get some things on the video port, others on serial.
Instead, set console to "efi,comconsole" for this case. Also set RB_MULTIPLE always (so we get dual consoles from the kernel) and or in RB_SERIAL when we can't find GOPs that suggest the precense of a video console. This will put output in the most places and have a sensible default for 'primary' console.
Sponsored by: Netflix Reviewed by: emaste, manu Differential Revision: https://reviews.freebsd.org/D36299
show more ...
|
| #
a765ac11
|
| 30-Jun-2022 |
Ed Maste <emaste@FreeBSD.org> |
Remove "All Rights Reserved" from Foundation copyrights
MFC after: 1 week Sponsored by: The FreeBSD Foundation
|
| #
50180d2b
|
| 11-Jan-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader.efi: reworked framebuffer setup
Pass gfx_state to efi_find_framebuffer(), so we can pick between GOP and UGA in efi_find_framebuffer(), also we can then set up struct gen_fb in gfx_state from
loader.efi: reworked framebuffer setup
Pass gfx_state to efi_find_framebuffer(), so we can pick between GOP and UGA in efi_find_framebuffer(), also we can then set up struct gen_fb in gfx_state from efifb and isolate efi fb data processing into framebuffer.c.
This change does allow us to clean up efi_cons_init() and reduce BS->LocateProtocol() calls.
A little downside is that we now need to translate gen_fb back to efifb in bootinfo.c (for passing to kernel), and we need to add few -I options to CFLAGS.
show more ...
|
| #
b3e76948
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
df065f69
|
| 26-Aug-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: More sensible defaults when ConOut is missing
When ConOut is missing, we used to default to serial. Except we did it in the worst way possible by just setting the howto bits and not updating
stand: More sensible defaults when ConOut is missing
When ConOut is missing, we used to default to serial. Except we did it in the worst way possible by just setting the howto bits and not updating the console setting, which lead to weird behavior where we'd get some things on the video port, others on serial.
Instead, set console to "efi,comconsole" for this case. Also set RB_MULTIPLE always (so we get dual consoles from the kernel) and or in RB_SERIAL when we can't find GOPs that suggest the precense of a video console. This will put output in the most places and have a sensible default for 'primary' console.
Sponsored by: Netflix Reviewed by: emaste, manu Differential Revision: https://reviews.freebsd.org/D36299
show more ...
|
| #
a765ac11
|
| 30-Jun-2022 |
Ed Maste <emaste@FreeBSD.org> |
Remove "All Rights Reserved" from Foundation copyrights
MFC after: 1 week Sponsored by: The FreeBSD Foundation
|
| #
50180d2b
|
| 11-Jan-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader.efi: reworked framebuffer setup
Pass gfx_state to efi_find_framebuffer(), so we can pick between GOP and UGA in efi_find_framebuffer(), also we can then set up struct gen_fb in gfx_state from
loader.efi: reworked framebuffer setup
Pass gfx_state to efi_find_framebuffer(), so we can pick between GOP and UGA in efi_find_framebuffer(), also we can then set up struct gen_fb in gfx_state from efifb and isolate efi fb data processing into framebuffer.c.
This change does allow us to clean up efi_cons_init() and reduce BS->LocateProtocol() calls.
A little downside is that we now need to translate gen_fb back to efifb in bootinfo.c (for passing to kernel), and we need to add few -I options to CFLAGS.
show more ...
|
| #
ca987d46
|
| 14-Nov-2017 |
Warner Losh <imp@FreeBSD.org> |
Move sys/boot to stand. Fix all references to new location
Sponsored by: Netflix
|
| #
7562d7dd
|
| 25-Oct-2017 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader.efi: Make framebuffer commands available for arm64
Move framebuffer.{c,h} to sys/boot/efi/loader and add the efifb related metadata and pass it to the kernel
Reviewed by: imp, andrew Differe
loader.efi: Make framebuffer commands available for arm64
Move framebuffer.{c,h} to sys/boot/efi/loader and add the efifb related metadata and pass it to the kernel
Reviewed by: imp, andrew Differential Revision: https://reviews.freebsd.org/D12757
show more ...
|
| #
9e62ed8f
|
| 01-Apr-2015 |
Andrew Turner <andrew@FreeBSD.org> |
Move the efi loaders to be under sys/boot/efi. This will help us add support for booting arm and arm64 from UEFI.
Differential Revision: https://reviews.freebsd.org/D2164 Reviewed by: emaste, imp (p
Move the efi loaders to be under sys/boot/efi. This will help us add support for booting arm and arm64 from UEFI.
Differential Revision: https://reviews.freebsd.org/D2164 Reviewed by: emaste, imp (previous version) Sponsored by: The FreeBSD Foundation
show more ...
|
| #
8c00aba8
|
| 04-Apr-2014 |
Ed Maste <emaste@FreeBSD.org> |
Support UEFI booting on amd64 via loader.efi
This is largely the work from the projects/uefi branch, with some additional refinements. This is derived from (and replaces) the original i386 efi impl
Support UEFI booting on amd64 via loader.efi
This is largely the work from the projects/uefi branch, with some additional refinements. This is derived from (and replaces) the original i386 efi implementation; i386 support will be restored later.
Specific revisions of note from projects/uefi:
r247380:
Adjust our load device when we boot from CD under UEFI.
The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible.
To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias.
Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r247216:
Use the UEFI Graphics Output Protocol to get the parameters of the framebuffer.
Sponsored by: The FreeBSD Foundation
show more ...
|