PoroCYon/BC250-DXEv3-ACPI-Driver

DXE Driver to install acpi fixes on the BC250. Made it a separate v3 because of the change in how it's configured from v2.

★ 0Forks 0CGitHub ↗Compare

README

BC250-DXEv3-ACPI-Driver

A DXE driver for the BC250 that automatically injects ACPI SSDTs for the active physical-core count.

Behavior

This package builds the DXE module MeiMeiDXEv3_ACPI_AutoInject.

Driver logic:

  1. Read the shared MeiMeiDXEv3AcpiVar configuration variable owned by the BC250-DXEv3-Menu-Driver.
  2. If the AcpiPatch field (byte offset 0) is zero, or the variable is absent/malformed, do not inject tables (fail-closed).
  3. Read SMN 0x0115A870 via PCI 00:00.0 offsets 0xB8/0xBC.
  4. Popcount the low byte to determine the enabled physical-core count (1–8).
  5. Firmware compacts the enabled SMT threads into P000 through P(2*count-1).
  6. Install one pair of SSDTs for each compacted core pair.

Configuration

The driver consumes the MeiMeiDXEv3AcpiVar variable defined by the BC250-DXEv3-Menu-Driver:

Item Value
Variable name MeiMeiDXEv3AcpiVar
Vendor GUID 49CC168D-E8B0-4613-A807-16969986726F
Attributes BOOTSERVICE_ACCESS | RUNTIME_ACCESS | NON_VOLATILE

The injection is gated by the AcpiPatch byte at offset 0 of the 1-byte ACPI_CONFIG structure. If the variable does not exist (the menu driver's "all zeros" default), the tables are not injected.

Injected ACPI tables

Injected table groups

  • One shared P-state table containing _PCT, _PSS, and _PSD data.
  • One shared two-state C-state table for partial-core configurations.
  • One shared three-state C-state table when all eight cores are enabled.
  • One P-state and one C-state table per compacted SMT pair (P000/P001 through P00E/P00F).
  • SSDT-PTSWAK for partial-core configurations.

The driver installs these tables through EFI_ACPI_TABLE_PROTOCOL during DXE when the AcpiPatch option is enabled. The ASL pair sources are generated by prepare_acpi_blobs.py and compiled independently, so the DefinitionBlocks stack in the ACPI namespace without requiring a precompiled table for every possible mask.

Build

The build helper compiles the DSL files into AML using iasl, generates an embedded C header, then builds the DXE driver and emits both .efi and .ffs artifacts.

Container build

./build_ffs.sh

Host build

Requirements:

  • an existing EDK II workspace
  • iasl on PATH
  • built BaseTools
NO_CONTAINER=1 EDK2_DIR=/path/to/edk2 ./build_ffs.sh

Output

Artifacts are written to:

  • Build/Output/MeiMeiDXEv3_ACPI_AutoInject.efi
  • Build/Output/MeiMeiDXEv3_ACPI_AutoInject.ffs

The .ffs can be inserted into an AMI DXE firmware volume with UEFITool.

Contributors

RescueMeiPoroCYon

Issues