-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ASL compiler support (ACPI) #199
base: master
Are you sure you want to change the base?
Conversation
ASL compiler will be used to build ACPI tables at runtime
We'll switch between precompiled AMLs (used now) and runtime-compiling ACPI when starting xhyve. 'acpi.c' and 'acpitbl.c' have same acpi tables offsets definitions. To prevent problems in future and partly save compatibility with bhyve sources, rename definitios in 'acpitbl.c'
Since this moment we're assuming that ACPI tables build method will be chosen at runtime. If ASL compiler path specified - building ACPI tables using it, if not - building them from existing AMLs
Wrapping functions with callbacks let us choose at runtime how the tables should be built: using precompiled AMLs or using ASL compiler. ASL-compiling method is gonna be updated, it doesn't work properly now
The bhyve acpi MADT table was given a static space of 256 (0x100) bytes, this is enough space to allow VM_MAXCPU to be 21, this patch changes that so VM_MAXCPU can be of arbitrary value and not overflow the space by actually calculating the space needed for the table. Based on freebsd/freebsd-src@5822161
So, I decided to try this out, and got in way deeper than intended, and have some findings. This seems like a good addition, although I'm unclear when it would be needed and how to fully make use of it. Does this let you add new ACPI tables or modify the built-in ones without recompiling? If so, please add an explanation to the man page. Speaking of which, the man page should be updated to list this option. I'll point out that Some minor issues:
I have no idea what this means, but it appears to be a problem with the DSDT table supplied by xhyve.
|
Closes #198
There's no pre-installed iasl compiler under macOS (unlike freebsd). This series of changes adds iasl compiler support. I've found that ACPICA tools can be built under macOS, so its iasl compiler can be given to xhyve to build ACPI Tables. Backward compatibility is saved.
Changes overview:
-a <iasl/compiler/path>
option xhyve uses an old method with copying precompiled ACPI to guest mem-a <iasl/compiler/path>
option xhyve uses given asl compiler to build tables