Page MenuHomeFreeBSD

bhyve: Move most early initialization into an MD routine
ClosedPublic

Authored by markj on Jul 12 2023, 1:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 5:33 PM
Unknown Object (File)
Mon, Oct 21, 5:09 PM
Unknown Object (File)
Oct 3 2024, 7:31 PM
Unknown Object (File)
Sep 25 2024, 2:24 PM
Unknown Object (File)
Sep 19 2024, 4:19 AM
Unknown Object (File)
Sep 18 2024, 11:07 AM
Unknown Object (File)
Sep 4 2024, 1:25 PM
Unknown Object (File)
Aug 12 2024, 1:14 AM
Subscribers

Details

Summary

Prior to initializing PCI devices, main() calls a number of
initialization routines, many of which are amd64-specific. Move this
list of calls to bhyverun_machdep.c. Similarly, add an MD function to
handle late initialization.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jul 12 2023, 1:51 PM
jhb added inline comments.
usr.sbin/bhyve/amd64/bhyverun_machdep.c
140

I assume arm64 uses the bsp?

This revision is now accepted and ready to land.Jul 12 2023, 6:42 PM
corvink added inline comments.
usr.sbin/bhyve/amd64/xmsr.c
240

Nit: This doesn't belong to this commit.

usr.sbin/bhyve/amd64/xmsr.c
240

I assumed it was because now this routine is called by bhyve_init_platform which consistently works with errno values whereas before when it was in main() it wasn't necessary to be consistent.

markj added inline comments.
usr.sbin/bhyve/amd64/bhyverun_machdep.c
140

Yes, it sets the initial value for ELR in this function.

usr.sbin/bhyve/amd64/xmsr.c
240

Right, I was trying to normalize error handling at the same time.

This revision was automatically updated to reflect the committed changes.
markj marked an inline comment as done.