Page MenuHomeFreeBSD

kboot: move to generic syscall interface
ClosedPublic

Authored by imp on Dec 16 2021, 5:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 6:05 AM
Unknown Object (File)
Oct 2 2024, 4:41 PM
Unknown Object (File)
Oct 1 2024, 1:03 PM
Unknown Object (File)
Sep 28 2024, 12:35 PM
Unknown Object (File)
Sep 28 2024, 1:25 AM
Unknown Object (File)
Sep 27 2024, 8:12 PM
Unknown Object (File)
Sep 24 2024, 10:33 PM
Unknown Object (File)
Sep 24 2024, 8:31 PM
Subscribers

Details

Summary

Just have the MD code provide syscall and have generic code for the
rest.

Sponsored by: Netflix

Test Plan

This commit is the one I'm most worried about

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43423
Build 40311: arc lint + arc unit

Event Timeline

imp requested review of this revision.Dec 16 2021, 5:00 PM
stand/kboot/arch/powerpc64/host_syscall.S
18

'so' flag is used by the syscall interface, on FreeBSD too, to denote error. Examining uses of host_open(), I'm guessing that 0 is already a taken file descriptor (stdin?), so returning 0 on error is acceptable. Not sure why host_read() would return 0 on error. I would expect -1 instead.

imp marked an inline comment as done.Dec 22 2021, 5:20 AM
imp added inline comments.
stand/kboot/arch/powerpc64/host_syscall.S
18

Yea. It's weird. And these are Linux calls, so a negative errno is expected...

And looking at how it's used, an error in open would translate to reading stdin given how open is used. So I'm guessing there were no such errors.

Likewise for reads.... But why is that code even there...

I was able to build kboot for powerpc64, with diffs D33511 - D33515.
In the machines that I have access to, Petitboot can't run BE loader.kboot, but I was able to build and run a LE loader.kboot.
However, as mentioned in D33511, it can just run some loader commands, but can't list files or load a kernel. But the older version, without these changes, also can't.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 30 2021, 11:32 PM
This revision was automatically updated to reflect the committed changes.
imp marked an inline comment as done.