bits-1219 released with these changes:
BITS now builds via a Makefile rather than a shell script. This allows the build to run in parallel, significantly speeding up builds.
Note that unlike the build script, which autodetected the number of CPUs
to build on, the Makefile uses the usual
-j option to make. So, if
you're used to
./build autodetecting your CPUs, you'll want to use
make -j$(nproc) (or just directly specify your desired amount of
parallelism, as you do with other makefiles).
make V=1 to let make echo commands before it runs them.
make LOCAL=1 to include
local-files in the build (formerly
BITS now builds within a
build subdirectory of the source rather than
a temporary directory under
/tmp. The build system no longer removes
this directory as part of the build, only via an explicit
to make it easier to investigate the build results.
Note that despite building via Make, BITS does not attempt to support incremental builds. We continue to recommend ccache to speed up rebuilds.
Notable new features:
Add a menu entry to exit back to EFI.
Show on the main menu how BITS was booted: 32-bit BIOS, 32-bit EFI, or 64-bit EFI.
Support reading and writing control registers.
bits.read_cr(apicid, n)reads CRn.
bits.write_cr(apicid, n, value)writes value to CRn.
Both functions return
Various improvements to the pager:
When showing output from Python code via the pager, capture tracebacks and display those via the pager as well, so that they wait for input. Previously, if an exception occurred, it would flash on the screen briefly before returning directly to the menu, requiring a trip to the log to view the traceback.
Also display the output produced before the exception.
Don't suggest going up when at the top of the output.
Mention Up as well as PgUp.
Clean up and simplify logic for EFI file handling and for displaying available options.
Migrate quite a bit of code from C to Python:
efi.calland the underlying
_efimethods supporting it
Now that we can call EFI functions via ctypes, we don't need
bits.memmove, now unused with the move to ctypes
acpi: Use ctypes to call most ACPICA functions from Python, rather than wrapping them via the Python C API.
This allows replacing several C functions with simpler Python equivalents.
Because the 32-bit BIOS port uses a calling convention unsupported by libffi, introduce various trivial C wrappers that re-export ACPICA functions with the standard C calling convention. For
AcpiWalkNamespace, introduce a more detailed wrapper that handles callbacks back into Python-provided functions.
acpica_initto Python as well, and call it before calling the ACPICA functions.
unsafe_iohandling from C to Python.
Directly export the address of the variable and manipulate it using ctypes.
AcpiInstallInterface, for use in the ACPI OS features menu.
acpi: Add an exception mechanism with error code names, and a function to transform an
ACPI_STATUSvalue into an exception. This uses
AcpiFormatExceptionto decode error codes.
acpi: Add docstrings to ACPICA functions
Migrate quite a bit of code from GRUB scripting (and supporting C and Python scaffolding) to Python:
Convert MWAIT latency test to Python, with a minimal C helper for the timing-sensitive portion.
Delete the now-unused
Port mwait menu to Python
Drop code to force specific configuration profiles on Nehalem and Sandy Bridge.
This code remains available in older releases, but drop it from the current version rather than porting it from GRUB configuration language to Python.
configure.cfg: Drop support for CPU-specific GRUB configure menu files, since no more such files remain.
Factor out a
bits.brandstring()function to return the brandstring.
Generate the CPU name on the main menu using Python, and improve title to use CPU brandstring rather than maintaining a table of CPU marketing names in BITS.
Delete CPU family names and marketing names.
Drop GRUB-based CPU detection entirely.
None of the GRUB config files depend on the variables this sets anymore; all CPU-specific code lives in Python now.
Remove the testsuite module and C expression evaluator.
The GRUB CPU detection code was the last user of this.
Remove options to GRUB commands to run on particular CPUs.
The GRUB CPU detection code was the last programmatic user of this, and command-line users can use Python for this.
Remove all GRUB commands and options not used manually.
Nothing uses these commands programmatically anymore, so drop mechanisms to write to environment variables, operate quietly, run tests, format environment variables for display, sleep, or set mwait.
A future version of BITS may remove the remaining commands entirely, in favor of Python functions, as the Python functions become increasingly high-level and convenient. If you still rely on the GRUB commands, please contact us.
Migrating all this code from C and GRUB to Python allowed deleting over 9000 lines of code in BITS relative to the previous release.
Other changes in this release:
runppmcommand to load and run power-management reference code; this is no longer used with current CPUs.
README.Developers.txt: Update for the switch to build with make.
README.Developers.txt: Update reference to GRUB version information.
README.Developers.txt: BITS doesn't need the
acpi: Fix reinitialization after termination. Clear all of the initialization flags, so that reinitialization actually loads tables rather than failing. This fixes the menu items to change what OS features BITS advertises to ACPI.
acpi: Don't retrieve full table data just to check if a table exists.
Nonefor a nonexistent table, but the former returns a string containing the full table data, while the latter just returns the address.
acpi: Drop support for
AcpiGbl_EnableAmlDebugObject. Our current setting for
AcpiDbgLevelleaves the debug object always enabled regardless of this value, so drop it.
assertthat the number of
ACPI_OBJECT_TYPEvalues hasn't changed
boolto return errors from ACPICA initialization
Stop using GRUB error codes, since the error code never gets passed through GRUB.
Also use the proper type to hold ACPICA error codes.
efi: Add network-related protocol GUIDs
EFI_PCI_IO_PROTOCOLand a simple test function
Convert many modules to use
from __future__ import print_function.
testmsr: Remove redundant output in MSR result descriptions
acpica2.hheader; move contents to
Delete unused header file