v2: push NUMA topology to the BIOS
PATCH 2/8 v2: push NUMA topology to the BIOS
Signed-off-by Andre Przywara <[email protected]>
Signature · 9 lines
Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 277-84917 ----to satisfy European Law for business letters: AMD Saxony Limited Liability Company & Co. KG, Wilschdorfer Landstr. 101, 01109 Dresden, Germany Register Court Dresden: HRA 4896, General Partner authorized to represent: AMD Saxony LLC (Wilmington, Delaware, US) General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
# HG changeset patch
# User Andre Przywara <[email protected]> # Date 1229430504 -3600
# Node ID a0a2e3026d4acffdce91b776d8c2d733767693c5 # Parent 6690ab0a34fdedaebbfe1068dfe7351734e8a1d7 push NUMA topology info to the BIOS
hw/fw_cfg.h +3 -0
@@ -8,6 +8,9 @@#define FW_CFG_NOGRAPHIC 0x04#define FW_CFG_NB_CPUS 0x05#define FW_CFG_MACHINE_ID 0x06 +#define FW_CFG_NUMA_NODES 0x07 +#define FW_CFG_NUMA_NODE_CPUS 0x08 +#define FW_CFG_NUMA_NODE_MEM 0x09#define FW_CFG_MAX_ENTRY 0x10#define FW_CFG_WRITE_CHANNEL 0x4000
hw/pc.c +6 -0
@@ -436,6 +436,12 @@ static void bochs_bios_init(void) fw_cfg =fw_cfg_init (BIOS_CFG_IOPORT ,BIOS_CFG_IOPORT +1 ,0 ,0 );fw_cfg_add_i32 (fw_cfg,FW_CFG_ID ,1 );fw_cfg_add_i64 (fw_cfg,FW_CFG_RAM_SIZE , (uint64_t )ram_size); +fw_cfg_add_i16 (fw_cfg,FW_CFG_NUMA_NODES , numnumanodes); + +fw_cfg_add_bytes (fw_cfg,FW_CFG_NUMA_NODE_MEM , (uint8_t *)node_mem, +sizeof (node_mem[0 ]) * numnumanodes); +fw_cfg_add_bytes (fw_cfg,FW_CFG_NUMA_NODE_CPUS , (uint8_t *)node_to_cpus, +sizeof (node_to_cpus[0 ]) * numnumanodes); }/* Generate an initial boot sector which sets state and jump to