/** * Initialize the coherent fabric. * * Perform discovery and initialization of the coherent fabric, for builds including * support for multiple coherent nodes. * * @param[in] State global state */ VOID STATIC CoherentInit ( IN OUT STATE_DATA *State ) { UINT8 i; UINT8 j; UINT8 ModuleType; UINT8 Module; UINT8 HardwareSocket; COHERENT_FABRIC Fabric; // Because Node 0, the BSP, is not discovered, initialize info about it specially here. // Allocate Socket Die Map. // While the BSP is always capable of being the only processor in the system, call the // IsExceededCapable method to make sure the BSP's capability is included in the aggregate system // capability. We don't care to check the return value. // State->Fabric = &Fabric; State->NodesDiscovered = 0; State->TotalLinks = 0; State->SysMpCap = MAX_NODES; State->Nb->IsExceededCapable (0, State, State->Nb); HardwareSocket = State->Nb->GetSocket (0, 0, State->Nb); ModuleType = 0; Module = 0; State->Nb->GetModuleInfo (0, &ModuleType, &Module, State->Nb); // No predecessor info for BSP, so pass 0xFF for those parameters. State->HtInterface->SetNodeToSocketMap (0xFF, 0xFF, 0xFF, 0, HardwareSocket, Module, State); // Initialize system state data structures for (i = 0; i < MAX_NODES; i++) { State->Fabric->SysDegree[i] = 0; for (j = 0; j < MAX_NODES; j++) { State->Fabric->SysMatrix[i][j] = 0; } } // // Call the coherent init features // // Discovery State->HtFeatures->CoherentDiscovery (State); State->HtInterface->PostMapToAp (State); // Topology matching and Routing AGESA_TESTPOINT (TpProcHtTopology, State->ConfigHandle); State->HtFeatures->LookupComputeAndLoadRoutingTables (State); State->HtFeatures->MakeHopCountTable (State); // UpdateCoreRanges requires the other maps to be initialized, and the node count set. FinalizeCoherentInit (State); UpdateCoreRanges (State); State->Fabric = NULL; }
/** * Initialize the coherent fabric. * * Create the topology map of the coherent fabric. * * @param[in,out] State global state */ VOID STATIC CoherentInit ( IN OUT STATE_DATA *State ) { // Because Node 0, the BSP, is not discovered, initialize info about it specially here. // Set Socket Die Map for the BSP. // There is no option to not have socket - node maps, if they aren't allocated that is a fatal bug. ASSERT (State->SocketDieToNodeMap != NULL); ASSERT (State->NodeToSocketDieMap != NULL); (*State->SocketDieToNodeMap)[0][0].Node = 0; (*State->NodeToSocketDieMap)[0].Socket = 0; (*State->NodeToSocketDieMap)[0].Die = 0; // UpdateCoreRanges requires the other maps to be initialized, and the node count set. FinalizeCoherentInit (State); UpdateCoreRanges (State); }