501983e6 | 15-Oct-2024 |
Warner Losh <imp@FreeBSD.org> |
loader.efi: Parse SPCR v3 and v4
We can get the UART clock from v3 SPCR, and a precise baudrate from v4. Some precise baudrates will currently be rejected by the kernel.
Sponsored by: Netflix Revi
loader.efi: Parse SPCR v3 and v4
We can get the UART clock from v3 SPCR, and a precise baudrate from v4. Some precise baudrates will currently be rejected by the kernel.
Sponsored by: Netflix Reviewed by: adrian, andrew Differential Revision: https://reviews.freebsd.org/D47096
show more ...
|
70253b53 | 15-Oct-2024 |
Warner Losh <imp@FreeBSD.org> |
loader.efi: Parse SPCR table entry in ACPI tables
If there's a SPCR, then use it to create and pass the right values to the uart. We pass xo=0 in to calcuate the xo from the baud rate. We try to be
loader.efi: Parse SPCR table entry in ACPI tables
If there's a SPCR, then use it to create and pass the right values to the uart. We pass xo=0 in to calcuate the xo from the baud rate. We try to be smart about what we set. We either set io or mm or pv/pd. Old kernels will still work, despite pb/pd not being supported, because we'll fall back to the SPCR parsing in the kernel.
We don't support Rev3 or Rev4 SPCR yet. It's too new to be in real hardware yet.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47085
show more ...
|
94164106 | 15-Oct-2024 |
Warner Losh <imp@FreeBSD.org> |
loader.efi: |= the boot flags how
how is assumed to be 0, so we directly assign to it. It might not always be 0, so or-in these bits.
Sponsored by: Netflix Reviewed by: bz, andrew Differential Re
loader.efi: |= the boot flags how
how is assumed to be 0, so we directly assign to it. It might not always be 0, so or-in these bits.
Sponsored by: Netflix Reviewed by: bz, andrew Differential Revision: https://reviews.freebsd.org/D47084
show more ...
|
c8ebbd28 | 18-Sep-2024 |
Colin Percival <cperciva@FreeBSD.org> |
loader: Expand EFI entropy if < 2048 bytes
The EFI RNG on some platforms takes a long time if we request 2048 bytes of entropy, so we would like to request less; but our kernel Fortuna RNG needs to
loader: Expand EFI entropy if < 2048 bytes
The EFI RNG on some platforms takes a long time if we request 2048 bytes of entropy, so we would like to request less; but our kernel Fortuna RNG needs to be fed 2048 bytes in order to consider itself "fully seeded". If we have between 64 bytes (the size of a single Fortuna pool and enough to guarantee cryptographic security) and 2048 bytes (what Fortuna wants) then the boot process will hang waiting for more entropy despite in fact having enough to operate securely.
Since 64 bytes of entropy is plenty to be cryptographically secure (an attack of cost ~ 2^128 is infeasible, which implies a mere 16 bytes of entropy), use PBKDF2 (aka pkcs5v2_genkey_raw) to spread the entropy across 2048 bytes. This is secure since PBKDF2 has the property that every subset of output bytes has within O(1) of the maximum possible amount of entropy.
Reviewed by: pjd MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46635
show more ...
|
6fdb07d5 | 12-Aug-2024 |
Ahmad Khalifa <ahmadkhalifa570@gmail.com> |
loader: provide error message in command_errmsg instead of printing
Also provide an error message when argc is too long instead of printing "no error message".
Reviewed by: imp, kib Pull Request: h
loader: provide error message in command_errmsg instead of printing
Also provide an error message when argc is too long instead of printing "no error message".
Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1381
show more ...
|
b538d491 | 03-Jun-2024 |
Ahmad Khalifa <ahmadkhalifa570@gmail.com> |
Add a new sysctl in order to diffrentiate UEFI architectures
With the new 32-bit UEFI loader, it's convenient to have a sysctl to figure out how we booted. Can be accessed at machdep.efi_arch
Revie
Add a new sysctl in order to diffrentiate UEFI architectures
With the new 32-bit UEFI loader, it's convenient to have a sysctl to figure out how we booted. Can be accessed at machdep.efi_arch
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
show more ...
|
6818ff77 | 14-May-2024 |
Ahmad Khalifa <ahmadkhalifa570@gmail.com> |
loader: Fix 32-bit compatibility
main.c - Fix rsdp cast. framebuffer.c - - Use temp variable instead of directly passing pointer when EFI_PHYSICAL_ADDRESS is expected. Also fix FreePa
loader: Fix 32-bit compatibility
main.c - Fix rsdp cast. framebuffer.c - - Use temp variable instead of directly passing pointer when EFI_PHYSICAL_ADDRESS is expected. Also fix FreePages cast. - Mask framebuffer address given to us by UEFI.
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
show more ...
|
95f75b0e | 31-May-2024 |
Ahmad Khalifa <ahmadkhalifa570@gmail.com> |
loader: Fix shadow_fb allocation
Using AllocateMaxAddress here means that gfx_state->tg_shadow_fb is treated as the highest address we can receive. Since gfx_state->tg_shadow_fb is NULL, we never re
loader: Fix shadow_fb allocation
Using AllocateMaxAddress here means that gfx_state->tg_shadow_fb is treated as the highest address we can receive. Since gfx_state->tg_shadow_fb is NULL, we never receive anything. Use AllocateAnyPages instead.
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
show more ...
|
9f7f9050 | 30-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
loader: Bump all versions to 3.0
Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a wa
loader: Bump all versions to 3.0
Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a warning that their boot loader is too old. We check only the major version, though, so minor versions can still be bumped for individual loaders (though I honestly doubt we'll ever need to do that again).
Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45888
show more ...
|