| dd2cfed9 | 29-Jul-2024 |
Warner Losh <[email protected]> |
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
(cherry picked from commit 9f7f90507528aaa9a2f54575c1d4f4010d01c2e5)
show more ...
|
| d55ddce0 | 11-Mar-2024 |
Warner Losh <[email protected]> |
kboot: kbootfdt: fix error handling
If we are able to open /sys/firmware/fdt, but aren't able to read it, fall back to /proc/device-tree. Remove comment that's not really true, it turns out.
Sponso
kboot: kbootfdt: fix error handling
If we are able to open /sys/firmware/fdt, but aren't able to read it, fall back to /proc/device-tree. Remove comment that's not really true, it turns out.
Sponsored by: Netflix
(cherry picked from commit 462af7676b3ee8a8bd9ee9b55a35c0cf815a351f)
show more ...
|
| cb9ef3a7 | 11-Mar-2024 |
Warner Losh <[email protected]> |
kboot: Use is_linux_error to check mmap return error
Rather than checking against the (incorrect) -511, use the is_linux_error() function to check to see if host_mmap failed.
Sponsored by: Netflix
kboot: Use is_linux_error to check mmap return error
Rather than checking against the (incorrect) -511, use the is_linux_error() function to check to see if host_mmap failed.
Sponsored by: Netflix
(cherry picked from commit d75524b3fe21752b233f66ae8e9d6450d507f75c)
show more ...
|
| 0bca0de6 | 11-Mar-2024 |
Warner Losh <[email protected]> |
kboot: Print UEFI memory map
If we can read the UEFI memory map, go ahead and print the memory map. While the kernel prints this with bootverbose, having it at this stage is useful for debugging oth
kboot: Print UEFI memory map
If we can read the UEFI memory map, go ahead and print the memory map. While the kernel prints this with bootverbose, having it at this stage is useful for debugging other problems.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44287
(cherry picked from commit a9cd3b675e243648aa681bc6ce1bf3e788be88c8)
show more ...
|
| 519aef90 | 11-Mar-2024 |
Warner Losh <[email protected]> |
kboot: hostfs -- check for llseek failure correctly
The host_* syscalls are all raw Linux system calls, not the POSIX wrappers that glibc / musl create. So we have to ranage change the return value
kboot: hostfs -- check for llseek failure correctly
The host_* syscalls are all raw Linux system calls, not the POSIX wrappers that glibc / musl create. So we have to ranage change the return value of host_llseek correctly to use the negative value hack that all Linux system calls use.
This fixes a false positive error detection when we do something like lseek(fd, 0xf1234567, ...); This returns 0xf1234567, which is a negative value which used to trigger the error path. Instead, we check using the is_linux_error() and store the return value in a long. Translate that errno to a host errno and set the global errno to that and return -1. lseek can't otherwise return a negative number, since it's the offset after seeking into the file, which by definition is positive.
This kept the 'read the UEFI memory map out of physical memory' from working on aarch64 (whose boot loader falls back to reading it since there are restrictive kernel options that can also prevent it), since the physical address the memory map was at on my platform was like 0xfa008018.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44286
(cherry picked from commit d650c3efb638f1b2742429a5fb8e7c087839868b)
show more ...
|
| d18377cb | 11-Mar-2024 |
Warner Losh <[email protected]> |
kboot: Avoid UB in signed shift
offset is signed. Copy it to the unsigned res before shifting. This avoids any possible undefined behavior for right shifting signed numbers. No functional change int
kboot: Avoid UB in signed shift
offset is signed. Copy it to the unsigned res before shifting. This avoids any possible undefined behavior for right shifting signed numbers. No functional change intended (and the code generated is the nearly same for aarch64).
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44285
(cherry picked from commit 8b1925f29c54f5791db3c8dcdf2b67541bb8ab32)
show more ...
|
| a975ee49 | 28-Jan-2024 |
Warner Losh <[email protected]> |
kboot: update copyright on these files.
host_syscalls.c: I've written, so put Netflix copyright on. It's possible in the confusion that Nathan wrote the host_gettimeofday implementation.
syscall_nr
kboot: update copyright on these files.
host_syscalls.c: I've written, so put Netflix copyright on. It's possible in the confusion that Nathan wrote the host_gettimeofday implementation.
syscall_nr: These files likely can't enjoy copyright protection since they are just facts (the per-arch Linux system calls), so add a note they are in the public domain.
Sponsored by: Netflix
(cherry picked from commit 8f7327dceecc225029b17378e4a26ae0b73a0a49)
show more ...
|
| edf8a9a4 | 28-Jan-2024 |
Warner Losh <[email protected]> |
kboot: Cleanup libkern reference
For aarch64 and amd64, we don't pull in anything from libkern, so we don't need it in our path. However, powerpc needs ucmpdi2 from libkern, so bring it into libkbo
kboot: Cleanup libkern reference
For aarch64 and amd64, we don't pull in anything from libkern, so we don't need it in our path. However, powerpc needs ucmpdi2 from libkern, so bring it into libkboot's build and omit it from loader.kboot.
Sponsored by: Netflix
(cherry picked from commit 4aabaa1890e927ed3dd34ccc4642268ea6a505ce)
show more ...
|
| 93fa71ab | 28-Jan-2024 |
Warner Losh <[email protected]> |
kboot: Move _start out of kboot and into libkboot
Move the startup code from kboot/kboot to kboot/libkboot and add the necessary infrastructure for it to build. move start_arch.h, a private header f
kboot: Move _start out of kboot and into libkboot
Move the startup code from kboot/kboot to kboot/libkboot and add the necessary infrastructure for it to build. move start_arch.h, a private header for libkboot, over as well.
Sponsored by: Netflix
(cherry picked from commit a03411e84728e9b267056fd31c7d1d9d1dc1b01e)
show more ...
|