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)
Dec 11 2023, 4:33 AM
Unknown Object (File)
Nov 21 2023, 6:42 PM
Unknown Object (File)
Nov 21 2023, 5:05 PM
Unknown Object (File)
Nov 20 2023, 9:21 PM
Unknown Object (File)
Nov 20 2023, 9:20 PM
Unknown Object (File)
Nov 20 2023, 8:43 PM
Unknown Object (File)
Oct 5 2023, 5:25 PM
Unknown Object (File)
Oct 4 2023, 11:10 PM
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.