HomeFreeBSD

kboot: Keep track of what's used in the segment

Description

kboot: Keep track of what's used in the segment

Keep track of how much is used in the segment as we allocate it to the
application. Set memsz to 0 first, and increment it as used. Adjust the
bufsz before we call kexec so the kernel copies the right amount (it's
an error for bufsz to be bigger than memsz, so we set them == when we
retrieve the segment). Make sure we round to the page size, otherwise
kexec_load gets cranky.

Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D38315

Details

Provenance
impAuthored on Feb 3 2023, 3:41 PM
Reviewer
tsoome
Differential Revision
D38315: kboot: Keep track of what's used in the segment
Parents
rGdb8d0c0cd998: kboot: Allocate a really big first segment
Branches
Unknown
Tags
Unknown