freebsd-dev/sys/x86/acpica
Jayachandran C. a3a6167448 x86/acpica/srat.c: Add API for parsing proximity tables
The SLIT and SRAT ACPI tables needs to be parsed on arm64 as well, on
systems that use UEFI/ACPI firmware and support NUMA. To do this, we
need to move most of the logic of x86/acpica/srat.c to dev/acpica and
provide an API that architectures can use to parse and configure ACPI
NUMA information.

This commit adds the API in srat.c as a first step, without making any
functional changes. We will move the common code to sys/dev/acpica
as the next step.

The functions added are:
  * int acpi_pxm_init(int ncpus, vm_paddr_t maxphys) - to allocate and
    initialize data structures used
  * void acpi_pxm_parse_tables(void) - parse SRAT/SLIT, save the cpu and
    memory proximity information
  * void acpi_pxm_set_mem_locality(void) - use the saved data to set
    memory locality
  * void acpi_pxm_set_cpu_locality(void) - use the saved data to set cpu
    locality
  * void acpi_pxm_free(void) - free data structures allocated by init

On arm64, we do not have an cpu APIC id that can be used as index to
store CPU data, we need to use the Processor Uid. To help with this,
define internal functions cpu_add, cpu_find, cpu_get_info to store
and get CPU proximity information.

Reviewed by:	markj, jhb (previous version)
Differential Revision:	https://reviews.freebsd.org/D17940
2018-12-08 18:34:05 +00:00
..
acpi_apm.c sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
acpi_wakeup.c Implement kernel support for early loading of Intel microcode updates. 2018-08-13 17:13:09 +00:00
madt.c Dynamically allocate IRQ ranges on x86. 2018-08-28 21:09:19 +00:00
OsdEnvironment.c sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
srat.c x86/acpica/srat.c: Add API for parsing proximity tables 2018-12-08 18:34:05 +00:00