<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/stand/kboot/include, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>kboot: Implement data_from_kernel to read kernel variables</title>
<updated>2025-04-17T21:56:46+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-04-17T04:05:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f3c0d74e3b8e969b9f790f4ec2ac173243f21920'/>
<id>f3c0d74e3b8e969b9f790f4ec2ac173243f21920</id>
<content type='text'>
Since the linux kernel doesn't expose enough of the EFI details to
userland via /sys/firmware/efi, write a routine to extract data from the
kernel directly by parsing /proc/kproc and /proc/kallsyms.

Sponsored by:		Netflix
Reviewed by:		kevans, jhibbits
Differential Revision:	https://reviews.freebsd.org/D49868
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the linux kernel doesn't expose enough of the EFI details to
userland via /sys/firmware/efi, write a routine to extract data from the
kernel directly by parsing /proc/kproc and /proc/kallsyms.

Sponsored by:		Netflix
Reviewed by:		kevans, jhibbits
Differential Revision:	https://reviews.freebsd.org/D49868
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Move common EFI stuff from aarch64 to libkboot</title>
<updated>2025-04-17T21:56:46+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-04-17T04:04:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=92ad79ec33fb5caf9a79c0bd8b33697b34c8e26d'/>
<id>92ad79ec33fb5caf9a79c0bd8b33697b34c8e26d</id>
<content type='text'>
Move efi_read_from_pa, efi_set_systbl and efi_bi_loadsmap into efi.c
Move prototype for populate_avail_from_efi as well, though that arrived
previously.

Move efi memory map variables into efi.c.

Add efi_read_from_sysfs, but if 0 it out. We'll want to use it if we can
get the proposed /sys/firmware/efi/memmap data published in the same
format and the code works, it's just that the current
/sys/firmware/efi/runtime-memmap isn't complete enough to use.

Sponsored by:		Netflix
Reviewed by:		kevans,	jhibbits
Differential Revision:	https://reviews.freebsd.org/D49863
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move efi_read_from_pa, efi_set_systbl and efi_bi_loadsmap into efi.c
Move prototype for populate_avail_from_efi as well, though that arrived
previously.

Move efi memory map variables into efi.c.

Add efi_read_from_sysfs, but if 0 it out. We'll want to use it if we can
get the proposed /sys/firmware/efi/memmap data published in the same
format and the code works, it's just that the current
/sys/firmware/efi/runtime-memmap isn't complete enough to use.

Sponsored by:		Netflix
Reviewed by:		kevans,	jhibbits
Differential Revision:	https://reviews.freebsd.org/D49863
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Method to populate the avail array from EFI map</title>
<updated>2025-04-17T21:56:46+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-04-17T04:04:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=988ee1cc6858136298008df674c13fa17e943f1b'/>
<id>988ee1cc6858136298008df674c13fa17e943f1b</id>
<content type='text'>
If we can get an efi memory map, populate_avail_from_efi will create an
avail array. We only use the regiions marked as 'free' to find a place
for the kernel to land. The other regions are also eligible, but usually
too small to materially affect where we'd put the kernel (not to worry,
the kernel will use that memory).

Sponsored by:		Netflix
Reviewed by:		kevans,	jhibbits
Differential Revision:	https://reviews.freebsd.org/D49862
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we can get an efi memory map, populate_avail_from_efi will create an
avail array. We only use the regiions marked as 'free' to find a place
for the kernel to land. The other regions are also eligible, but usually
too small to materially affect where we'd put the kernel (not to worry,
the kernel will use that memory).

Sponsored by:		Netflix
Reviewed by:		kevans,	jhibbits
Differential Revision:	https://reviews.freebsd.org/D49862
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Add option to parse 32-bit quantity</title>
<updated>2025-04-17T21:56:45+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-04-17T04:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=14acbf6159c3efa8ce3965bb1211d4232af3fb4f'/>
<id>14acbf6159c3efa8ce3965bb1211d4232af3fb4f</id>
<content type='text'>
The type that's exposed from sysfs' memory map is 32-bit and so is the
data-type of memory description.

Sponsored by:		Netflix
Reviewed by:		kevans, andrew,	jhibbits
Differential Revision:	https://reviews.freebsd.org/D49856
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The type that's exposed from sysfs' memory map is 32-bit and so is the
data-type of memory description.

Sponsored by:		Netflix
Reviewed by:		kevans, andrew,	jhibbits
Differential Revision:	https://reviews.freebsd.org/D49856
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Start to move efi common routines to libkboot</title>
<updated>2025-04-09T21:16:57+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-04-09T21:16:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=136d2dc093105625e943466384efa1e1c16afad3'/>
<id>136d2dc093105625e943466384efa1e1c16afad3</id>
<content type='text'>
Start to move the common efi routines into libkboot by moving the efi
memory map walking and implementing a printing routine around it.

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Start to move the common efi routines into libkboot by moving the efi
memory map walking and implementing a printing routine around it.

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Move str* util routines to libkboot</title>
<updated>2025-04-09T21:16:55+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-04-09T21:16:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b2bd8c9a1d87ee60f13715370824c56f5ab7a4d2'/>
<id>b2bd8c9a1d87ee60f13715370824c56f5ab7a4d2</id>
<content type='text'>
These are needed for the next round of EFI support for amd64 (partially
shared with aarch64, but only partially because the Linux host interfaces
are different to get the same info).

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are needed for the next round of EFI support for amd64 (partially
shared with aarch64, but only partially because the Linux host interfaces
are different to get the same info).

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Move seg code into libkboot</title>
<updated>2025-04-09T21:16:55+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2025-04-09T21:16:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=757dc8ab1245118bd3861ee2853b42c3476c1ed4'/>
<id>757dc8ab1245118bd3861ee2853b42c3476c1ed4</id>
<content type='text'>
This code is really generic segment processing and should live here. It
also interfaces primarily with Linux APIs, so it's also appropriate for
this if we have a version of that runs as a FreeBSD binary using FreeBSD
system calls and APIs, though that's in the future somehow...

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This code is really generic segment processing and should live here. It
also interfaces primarily with Linux APIs, so it's also appropriate for
this if we have a version of that runs as a FreeBSD binary using FreeBSD
system calls and APIs, though that's in the future somehow...

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Create function for error checking.</title>
<updated>2024-03-11T21:21:51+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-03-11T20:15:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3ae18fdfbcaad827defdc217386e73c993beeba0'/>
<id>3ae18fdfbcaad827defdc217386e73c993beeba0</id>
<content type='text'>
Linux has the convention of returning -ERRNO to flag errors from its
system calls. Sometimes other negative values are returned that are
success...  However, only values -1 to -4096 (inclusive) are really
errors. The rest are either truncated values that only look negative (so
use long instead of int), or are things like addresses or legal unsigned
file offsets or similar that are successful returns. Filter out the
latter.

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linux has the convention of returning -ERRNO to flag errors from its
system calls. Sometimes other negative values are returned that are
success...  However, only values -1 to -4096 (inclusive) are really
errors. The rest are either truncated values that only look negative (so
use long instead of int), or are things like addresses or legal unsigned
file offsets or similar that are successful returns. Filter out the
latter.

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: update copyright on these files.</title>
<updated>2024-01-28T20:04:32+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-01-28T19:19:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8f7327dceecc225029b17378e4a26ae0b73a0a49'/>
<id>8f7327dceecc225029b17378e4a26ae0b73a0a49</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>kboot: Assert copyright here</title>
<updated>2024-01-28T20:04:32+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-01-28T19:17:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2b7918f13c6fce378a75f8247b5dd203bf4a3c5d'/>
<id>2b7918f13c6fce378a75f8247b5dd203bf4a3c5d</id>
<content type='text'>
According to git blame I've 95%+ rewritten this file. Update copyright to
reflect that, but give nod to Nathan for the original I started with.

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to git blame I've 95%+ rewritten this file. Update copyright to
reflect that, but give nod to Nathan for the original I started with.

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
</feed>
