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)
Thu, May 16, 11:48 PM
Unknown Object (File)
Thu, May 16, 11:48 PM
Unknown Object (File)
Thu, May 16, 11:47 PM
Unknown Object (File)
Wed, May 15, 12:45 AM
Unknown Object (File)
Wed, May 8, 7:59 AM
Unknown Object (File)
Sat, Apr 27, 10:58 AM
Unknown Object (File)
Sun, Apr 21, 1:49 PM
Unknown Object (File)
Apr 18 2024, 5:34 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.