AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September...

35
AMD Common Silicon Firmware Module Satish Rai, Changhwa Lee September 27, 2007

Transcript of AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September...

Page 1: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module

Satish Rai, Changhwa Lee

September 27, 2007

Page 2: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module2 September 27, 2007

Purpose of this presentation

To help understand how the firmware for silicon components (Processor, Northbridge and Southbridge) delivered to support PI and UEFI

Provide a mechanism to support Independent BIOS Vendors with a better interoperability for future silicon components

Page 3: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module3 September 27, 2007

Why common firmware is important

• Time to market– IBV and OEM/ODM can get the code at the same time to continue their

development and hence expedite the product completion

• Ease of Porting– The standardizing the interface reduces or eliminates porting time– Hide the complexities associated with any new silicon features

• Code Quality and Maintainability– Every silicon may bring newer method for initializing feature set– Common module hides the complexities behind standardized interface.– Fully validated code on AMD reference platform– Easy for debugging and post production support

Page 4: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module4 September 27, 2007

AMD Silicon Components

The Silicon components indicated here consists of

• Processor Core Subsystem

• Chipset

Page 5: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module5 September 27, 2007

Common Firmware Interface (Processor)

Platform Initialization Phase

PEI

Processor PEIM

(PPI)

UEFI Phase

Driver Binding and Boot Manager

DXE

Processor Core Subsystem

SMM

Processor DXE Driver

(PROTOCOL)

Page 6: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module6 September 27, 2007

AMD Processor Core Subsystem

AMD Processor core subsystem consist of following components

-CPU Core

-Hyper Transport

-Memory Controller

Page 7: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module7 September 27, 2007

Functionality of Processor Core Subsystem

• CPU Initialization – Sets up the Cache As RAM– Initializes CPU Core i.e. initializing BSP and APs. – APs remain in Halt State through out the POST unless it requires

any initialization– Create Processor specific information i.e.. AMD PowerNow™

information

• Hyper Transport Initialization– Initializes the Coherent Links between Processors– Initializes the Non Coherent Links between Processor and

Chipsets

(Cont.)

Page 8: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module8 September 27, 2007

Functionality of Processor Core Subsystem

• Memory Controller Initialization – Performs Memory Controller Init

– Performs DRAM Controller Init

– Creates System Memory Map

– Sets up the cacheability for system memory

Page 9: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module9 September 27, 2007

Calling Interface (Processor Core)

• PEIM and DXE drivers call out to Agesa Ppi and AgesaProtocol depending on phase of execution to access the services for Processor Subsystem

UEFI

PEIM

/DXE d

rivers

AMDProcessor

Corecode

Page 10: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module10 September 27, 2007

Example of Calling Interface

typedef struct _AGESA_PPI_PPI {

CPU_INITIALIZE_RESET CpuInitializeReset;

CPU_LOAD_UCODE CpuLoadUcode;

CPU_VALIDATE_UCODE CpuValidateUcode;

CPU_HT_INITIALIZE CpuHtInitialize;

..

..

} AGESA_PPI;

Page 11: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module11 September 27, 2007

Example of Calling InterfaceEFI STATUS Status

AGESA_PPI *AgesaPpi;

(*PeiServcies).LocatePpi (PeServices,

..

&AgesaPpiGuid,

AgesaPpi

);

AgesaPpi->InitializeReset()

Page 12: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module12 September 27, 2007

Example of Calling Interface

typedef struct _AGESA_DXE_PROTOCOL {

CPU_PSTATE_CREATE_ACPITABLES CpuPstateCreateAcpitables;

CPU_PSTATE_GATHER_DATA CpuPstateGatherData;

CPU_ACPI_SRAT CpuAcpiSrat;

CPU_INITIALIZE_LATE CpuInitializeLate;

..

} AGESA_PROTOCOL;

Page 13: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module13 September 27, 2007

Example of Calling Interface

EFI STATUS Status

AGESA_PROTOCOL *AgesaProtocol;

Status = gBS->LocateProtocol (&gAgesaDxeProtocolGuid, NULL, &AgesaDxeProtocolPtr);

AgesaProtocol->CpuPstateCreateAcpitables ();

Page 14: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module14 September 27, 2007

What does AMD deliver

• AMD delivers the Processor Core Subsystem as AGESA. It also supplies the PEIM and DXE Drivers which produces AGESA Ppi and AGESA Protocol

CPU

UEFI Firmware

Mem

AGESA Ppi/Protocol

HT

AMD Processor

CPU AGESA

Page 15: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module15 September 27, 2007

What is “AGESA”

A – AMD – Make it easy for customers to ship AMD processor based systems;reducing time, cost, training

G – Generic – It works in any customer’s development environment

E – Encapsulated – OOP term meaning all knowledge about the processor is contained in this package

S – Software – applying software development methodologies to be modular and maximize reusable code

A – Architecture – designed for the long term, spanning many processor families and reducing customer changes

Page 16: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module16 September 27, 2007

Components of AGESA

• Hyper Transport Component– HT component initialization gets called out for each link.

– There is a separate call out for Frequency and Width

– Code is generic to support multi node and multi link

– OEM Hooks are called before and after cHT and ncHTinitialization

(Cont.)

Page 17: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module17 September 27, 2007

Components of AGESA

• CPU Components– Provides services to be used by IBV through PPI and Protocols– Supports

Cache As Ram InitializationCPUIDPlatform Type (UMA, non UMA)ACPI objects i.e. _PSS, _XPSS, _PST, _PSDACPI TablesBrandID and MSR InitializationMicrocode Patch Loader

Processor Power State InformationSMM Initialization

.

Page 18: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module18 September 27, 2007

Components of AGESA

• Memory Controller– Handles memory initialization during normal POST and S3

Resume

– Provides single entry point for Memory Controller Init and DRAM Controller Init.

– Callback to supportUser configuration through NVRAM Read/Write

SPD Read

Setting of platform specific timing value.

Page 19: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module19 September 27, 2007

AGESA Packaging

• AGESA Package, currently contains source code for processor core subsystem and associated PPI and PROTOCOLS along with implemented PEIM and DXE Drivers (both DXE as well as SMM phase)

Page 20: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module20 September 27, 2007

Common Firmware Interface (Chipset)

Platform Initialization Phase

PEI

Chipset PEIM

(PPI)

UEFI Phase

Driver Binding and Boot Manager

DXE

Chipset Component

SMM

Chipset DXE

(PROTOCOL)

SMM Handler

Page 21: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module21 September 27, 2007

Chipset Components

• Chipset component is called CIM-x

• The CIM-x components are distributed as – CIM-x NBB1 (Boot Block), NBB2 (Normal Boot)

– CIM-x SBB1 (Boot Block), SBB2 (Normal Boot)

• CIM-x NB and CIM-x SB are distributed independently to support system design based upon customers requirement

Page 22: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module22 September 27, 2007

CIM-x Enabling Model

Legacy BIOSCIM-x CoreIn “C” code

Legac

y W

rapper

CIM-x Module Code

IBV Code

System BIOS

CIM-x PPI/ Protocol

Page 23: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module23 September 27, 2007

CIM-x Feature Summary

• Same architecture for Northbridge and Southbridge

• Most of the code written in C to support both the world i.e.. UEFI and Legacy

• IBVs calls CIM-x modules through Interface and Gate files in legacy BIOS world.

•UEFI BIOS uses PPI or PROTOCOL (UEFI interface) to execute CIM-x C files.

• Interface available to support POST, Runtime, SMM and BootBlock for both the world

•Brings consistency in providing solution to both the world without compromising on quality.

Page 24: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module24 September 27, 2007

CIM-x Model For UEFI

• Core Code for CIM-x in “C”

• PPI and PROTOCOL to access the core code

• CIM-x PEIMs and Drivers provides access to CIM-x core code for any PPI and DXE modules

• Packaging scheme is common to both CIM-x Northbridge and CIM-x Southbridge

Page 25: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module25 September 27, 2007

Example of Calling Interface (CIM-x Northbridge)

typedef struct _PEI_AMD_NB_PPI {

PEI_NB_POWERON_RESET NbPowerOnInit;

PEI_NB_HT_INIT NbHtInit;

PEI_NB_PCIE_BASEADDRESS NbPcieBaseSet;

} PEI_AMD_NB_PPI;

extern EFI_GUID gPeiAmdNbPpiGuid;

Page 26: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module26 September 27, 2007

Example of Calling Interface (CIM-x Northbridge)EFI STATUS Status

PEI_AMD_NB_PPI *AmdNbPpi;

(*PeiServcies).LocatePpi (PeServices,

..

& gPeiAmdNbPpiGuid,

&AmdNbPpi

);

AmdNbPpi->NbPowerOnInit()

Page 27: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module27 September 27, 2007

Example of Calling Interface (CIM-x Northbridge)typedef struct _EFI_AMD_NB_CIM_X_PROTOCOL {

NBCFG NbPolicy;

PWMCFG PwmPolicy;

EFI_AMD_NB_INIT NbInitPciEarly;

EFI_AMD_NB_INIT NbInitEarlyPost;

EFI_AMD_NB_INIT NbInitLatePost;

EFI_AMD_NB_INIT NbInitPciELate;

EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;

} EFI_AMD_NB_CIM_X_PROTOCOL;

extern EFI_GUID gEfiAmdNbCimXProtocolGuid;;

Page 28: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module28 September 27, 2007

Example of Calling Interface (CIM-x Northbridge)

EFI STATUS Status

EFI_AMD_NB_CIM_X_PROTOCOL *NbCimXProtocolPtr;

Status = gBS->LocateProtocol (& gEfiAmdNbCimXProtocolGuid, NULL, &NbCimXProtocolPtr);

NbCimXProtocolPtr->PciRoorBridgeIo ();

Page 29: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module29 September 27, 2007

Example of Calling Interface (CIM-x Southbridge)

typedef struct _PEI_AMD_SB_PPI {

PEI_SB_POWERON_RESET SbPowerOnInit;

} PEI_AMD_SB_PPI;

extern EFI_GUID gPeiAmdSbPpiGuid;

Page 30: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module30 September 27, 2007

Example of Calling Interface (CIM-x Southbridge)EFI STATUS Status

PEI_AMD_SB_PPI *AmdSbPpi;

(*PeiServcies).LocatePpi (PeServices,

..

& gPeiAmdSbPpiGuid,

&AmdSbPpi

);

AmdSbPpi->SbPowerOnInit()

Page 31: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module31 September 27, 2007

Example of Calling Interface (CIM-x Southbridge)typedef struct _EFI_AMD_SB_CIM_X_PROTOCOL {

SBCFG SbPolicy;

EFI_AMD_SB_INIT BeforePciInit;

EFI_AMD_SB_INIT AfterPciInit;

EFI_AMD_SB_INIT LatePostInit;

EFI_AMD_SB_INIT BeforePciRestoreInit;

EFI_AMD_SB_INIT AfterPciRestoreInit;

} EFI_AMD_NB_CIM_X_PROTOCOL;

extern EFI_GUID gEfiAmdSbCimXProtocolGuid;;

Page 32: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module32 September 27, 2007

Example of Calling Interface (CIM-x Southbridge)

EFI STATUS Status

EFI_AMD_SB_CIM_X_PROTOCOL *SbCimXProtocolPtr;

Status = gBS->LocateProtocol (& gEfiAmdSbCimXProtocolGuid, NULL, &SbCimXProtocolPtr);

SbCimXProtocolPtr->BeforePciInit ();

Page 33: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module33 September 27, 2007

Summary

• The Processor Core Subsystem code is available as AGESA

• The chipsets (Northbridge and Southbridge) code is available as CIM-x

• AMD Provides all the necessary infrastructure to enable UEFI on AMD Silicon

In a nutshell………..

AMD is committed to support UEFI

Page 34: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module34 September 27, 2007

Questions and Answers

Q&A

Page 35: AMD Common Silicon Firmware Module · 2013-09-26 · 3 AMD Common Silicon Firmware Module September 27, 2007 Why common firmware is important •Tmi e to market – IBV and OEM/ODM

AMD Common Silicon Firmware Module35 September 27, 2007

Trademark Attribution

AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United States and/or other jurisdictions. Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners.

©2006 Advanced Micro Devices, Inc. All rights reserved.