iPXE
Data Structures | Macros | Functions | Variables
ucode.h File Reference

Microcode updates. More...

#include <stdint.h>
#include <ipxe/mp.h>

Go to the source code of this file.

Data Structures

struct  ucode_control
 A microcode update control. More...
 
struct  ucode_descriptor
 A microcode update descriptor. More...
 
struct  ucode_status
 A microcode update status report. More...
 
struct  ucode_date
 A microcode date. More...
 
struct  intel_ucode_header
 An Intel microcode update file header. More...
 
struct  intel_ucode_ext_header
 An Intel microcode update file extended header. More...
 
struct  intel_ucode_ext
 An Intel microcode extended signature. More...
 
struct  amd_ucode_header
 An AMD microcode update file header. More...
 
struct  amd_ucode_equivalence
 An AMD microcode equivalence table entry. More...
 
struct  amd_ucode_patch_header
 An AMD microcode patch header. More...
 
struct  amd_ucode_patch
 An AMD microcode patch. More...
 

Macros

#define MSR_PLATFORM_ID   0x00000017UL
 Platform ID MSR. More...
 
#define MSR_PLATFORM_ID_VALUE(value)   ( ( (value) >> 50 ) & 0x7 )
 Extract platform ID from MSR value. More...
 
#define MSR_UCODE_TRIGGER_INTEL   0x00000079UL
 Intel microcode load trigger MSR. More...
 
#define MSR_UCODE_TRIGGER_AMD   0xc0010020UL
 AMD microcode load trigger MSR. More...
 
#define UCODE_SIGNATURE_MASK   0xfffffff0UL
 CPUID signature applicability mask. More...
 
#define UCODE_VERSION_MIN   -0x80000000L
 Minimum possible microcode version. More...
 
#define UCODE_VERSION_MAX   0x7fffffffL
 Maximum possible microcode version. More...
 
#define INTEL_UCODE_HVER   0x00000001UL
 Intel microcode header version number. More...
 
#define INTEL_UCODE_LVER   0x00000001UL
 Intel microcode loader version number. More...
 
#define INTEL_UCODE_DATA_LEN   2000
 Intel microcode default data length. More...
 
#define INTEL_UCODE_ALIGN   1024
 Intel microcode file alignment. More...
 
#define AMD_UCODE_MAGIC   ( ( 'A' << 16 ) | ( 'M' << 8 ) | ( 'D' << 0 ) )
 AMD microcode magic signature. More...
 
#define AMD_UCODE_EQUIV_TYPE   0x00000000UL
 AMD microcode equivalence table type. More...
 
#define AMD_UCODE_PATCH_TYPE   0x00000001UL
 AMD patch type. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
struct ucode_control __attribute__ ((packed))
 

Variables

uint64_t desc
 Microcode descriptor list physical address. More...
 
uint64_t status
 Microcode status array physical address. More...
 
uint32_t trigger_msr
 Microcode load trigger MSR. More...
 
uint32_t apic_max
 Maximum expected APIC ID. More...
 
uint32_t apic_unexpected
 Unexpected APIC ID. More...
 
uint32_t apic_mask
 APIC ID eligibility mask bits. More...
 
uint32_t apic_test
 APIC ID eligibility test bits. More...
 
uint8_t ver_clear
 Microcode version requires manual clear. More...
 
uint8_t ver_high
 Microcode version is reported via high dword. More...
 
uint32_t signature
 CPUID signature (or 0 to terminate list) More...
 
int32_t version
 Microcode version. More...
 
uint64_t address
 Microcode physical address. More...
 
uint32_t id
 APIC ID (for sanity checking) More...
 
int32_t before
 Initial microcode version. More...
 
int32_t after
 Final microcode version. More...
 
uint8_t year
 Year (BCD) More...
 
uint8_t century
 Century (BCD) More...
 
uint8_t day
 Day (BCD) More...
 
uint8_t month
 Month (BCD) More...
 
uint32_t hver
 Header version number. More...
 
struct ucode_date date
 Date. More...
 
uint32_t checksum
 Checksum. More...
 
uint32_t lver
 Loader version. More...
 
uint32_t platforms
 Supported platforms. More...
 
uint32_t data_len
 Microcode data size (or 0 to indicate 2000 bytes) More...
 
uint32_t len
 Total size (or 0 to indicate 2048 bytes) More...
 
uint8_t reserved [12]
 Reserved. More...
 
uint32_t count
 Extended signature count. More...
 
uint32_t magic
 Magic signature. More...
 
uint32_t type
 Equivalence table type. More...
 
uint8_t reserved_a [8]
 Reserved. More...
 
uint8_t reserved_b [2]
 Reserved. More...
 
mp_func_t ucode_update
 

Detailed Description

Microcode updates.

Definition in file ucode.h.

Macro Definition Documentation

◆ MSR_PLATFORM_ID

#define MSR_PLATFORM_ID   0x00000017UL

Platform ID MSR.

Definition at line 16 of file ucode.h.

◆ MSR_PLATFORM_ID_VALUE

#define MSR_PLATFORM_ID_VALUE (   value)    ( ( (value) >> 50 ) & 0x7 )

Extract platform ID from MSR value.

Definition at line 19 of file ucode.h.

◆ MSR_UCODE_TRIGGER_INTEL

#define MSR_UCODE_TRIGGER_INTEL   0x00000079UL

Intel microcode load trigger MSR.

Definition at line 22 of file ucode.h.

◆ MSR_UCODE_TRIGGER_AMD

#define MSR_UCODE_TRIGGER_AMD   0xc0010020UL

AMD microcode load trigger MSR.

Definition at line 25 of file ucode.h.

◆ UCODE_SIGNATURE_MASK

#define UCODE_SIGNATURE_MASK   0xfffffff0UL

CPUID signature applicability mask.

We assume that only steppings may vary between the boot CPU and any application processors.

Definition at line 32 of file ucode.h.

◆ UCODE_VERSION_MIN

#define UCODE_VERSION_MIN   -0x80000000L

Minimum possible microcode version.

Definition at line 35 of file ucode.h.

◆ UCODE_VERSION_MAX

#define UCODE_VERSION_MAX   0x7fffffffL

Maximum possible microcode version.

Definition at line 38 of file ucode.h.

◆ INTEL_UCODE_HVER

#define INTEL_UCODE_HVER   0x00000001UL

Intel microcode header version number.

Definition at line 137 of file ucode.h.

◆ INTEL_UCODE_LVER

#define INTEL_UCODE_LVER   0x00000001UL

Intel microcode loader version number.

Definition at line 140 of file ucode.h.

◆ INTEL_UCODE_DATA_LEN

#define INTEL_UCODE_DATA_LEN   2000

Intel microcode default data length.

Definition at line 143 of file ucode.h.

◆ INTEL_UCODE_ALIGN

#define INTEL_UCODE_ALIGN   1024

Intel microcode file alignment.

Definition at line 146 of file ucode.h.

◆ AMD_UCODE_MAGIC

#define AMD_UCODE_MAGIC   ( ( 'A' << 16 ) | ( 'M' << 8 ) | ( 'D' << 0 ) )

AMD microcode magic signature.

Definition at line 179 of file ucode.h.

◆ AMD_UCODE_EQUIV_TYPE

#define AMD_UCODE_EQUIV_TYPE   0x00000000UL

AMD microcode equivalence table type.

Definition at line 182 of file ucode.h.

◆ AMD_UCODE_PATCH_TYPE

#define AMD_UCODE_PATCH_TYPE   0x00000001UL

AMD patch type.

Definition at line 219 of file ucode.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

struct ucode_control __attribute__ ( (packed)  )

Variable Documentation

◆ desc

uint64_t desc

Microcode descriptor list physical address.

Definition at line 12 of file ucode.h.

Referenced by abft_install(), acpi_add(), acpi_del(), acpi_describe(), acpi_init(), ath5k_hw_proc_2word_tx_status(), ath5k_hw_proc_4word_tx_status(), ath5k_hw_proc_5210_rx_status(), ath5k_hw_proc_5212_rx_status(), ath5k_hw_setup_2word_tx_desc(), ath5k_hw_setup_4word_tx_desc(), ath5k_hw_setup_rx_desc(), axge_in_complete(), bnxt_set_rx_desc(), cdc_union_descriptor(), ecm_ethernet_descriptor(), ecm_fetch_mac(), efi_fcp_path(), efi_get_memory_map_wrapper(), efi_usb_get_endpoint_descriptor(), efi_usb_get_interface_descriptor(), efi_usb_mtu(), ehci_dequeue(), ehci_endpoint_poll(), ehci_enqueue(), ehci_poll_companions(), ehci_ring_alloc(), exanic_poll_rx(), fcoe_fip_parse(), fdt_child(), fdt_mac(), fdt_property(), fdt_string(), fdt_traverse(), hub_probe(), ib_sbft_install(), ibft_complete(), ibft_install(), ibft_netdev_is_required(), icplus_create_ring(), icplus_poll_rx(), icplus_poll_tx(), icplus_refill_rx(), icplus_transmit(), imgsingle_exec(), int13_device_path_info(), intf_get_dest_op_no_passthru_untyped(), intf_get_passthru(), intf_init(), myson_create_ring(), natsemi_create_ring(), ncm_in_complete(), netdev_fetch_busid(), netdev_fetch_busloc(), netdev_fetch_bustype(), nii_pci_open(), pci_msix_ioremap(), pciea_offset(), process_init(), process_init_stopped(), rdc_create_ring(), rhine_poll_rx(), rhine_poll_tx(), rhine_refill_rx(), rhine_transmit(), sandev_describe(), sec80211_rsn_get_net80211_crypt(), sis190_alloc_rx_iob(), sis190_give_to_asic(), sis190_make_unusable_by_asic(), sis190_map_to_asic(), sis190_mark_as_last_descriptor(), sis190_process_rx(), sis190_transmit(), step(), tg3_alloc_rx_iob(), tg3_rx_complete(), ucode_describe(), ucode_parse_amd(), ucode_parse_intel(), ucode_status(), uhci_describe(), uhci_endpoint_poll(), uhci_enqueue(), uhci_is_message(), uhci_restart(), undinet_irq_is_broken(), usb_describe(), usb_endpoint_companion_descriptor(), usb_endpoint_described(), usb_endpoint_descriptor(), usb_find_driver(), usb_get_default_language(), usb_get_descriptor(), usb_get_string_descriptor(), usb_hub_get_descriptor(), usb_interface_association_descriptor(), usb_interface_descriptor(), usb_is_within_config(), usb_next_descriptor(), usb_score(), usbblk_probe(), usbhid_describe(), usbio_supported(), usbnet_comms_describe(), usbnet_data_describe(), velocity_poll_rx(), velocity_poll_tx(), velocity_refill_rx(), velocity_transmit(), and w89c840_poll().

◆ status

uint64_t status

Microcode status array physical address.

Definition at line 14 of file ucode.h.

◆ trigger_msr

uint32_t trigger_msr

Microcode load trigger MSR.

Definition at line 16 of file ucode.h.

◆ apic_max

uint32_t apic_max

Maximum expected APIC ID.

Definition at line 18 of file ucode.h.

Referenced by ucode_status().

◆ apic_unexpected

uint32_t apic_unexpected

Unexpected APIC ID.

Any application processor may set this to indicate that its APIC ID was higher than the maximum expected APIC ID.

Definition at line 24 of file ucode.h.

◆ apic_mask

uint32_t apic_mask

APIC ID eligibility mask bits.

Definition at line 26 of file ucode.h.

◆ apic_test

uint32_t apic_test

APIC ID eligibility test bits.

Definition at line 28 of file ucode.h.

◆ ver_clear

uint8_t ver_clear

Microcode version requires manual clear.

Definition at line 30 of file ucode.h.

◆ ver_high

uint8_t ver_high

Microcode version is reported via high dword.

Definition at line 32 of file ucode.h.

◆ signature

uint32_t signature

CPUID signature (or 0 to terminate list)

CPUID signature.

CPU signature.

Definition at line 12 of file ucode.h.

◆ version

int32_t version

Microcode version.

Definition at line 14 of file ucode.h.

◆ address

uint64_t address

Microcode physical address.

Definition at line 16 of file ucode.h.

◆ id

APIC ID (for sanity checking)

Equivalence ID.

Definition at line 14 of file ucode.h.

◆ before

int32_t before

◆ after

int32_t after

Final microcode version.

Definition at line 18 of file ucode.h.

Referenced by efi_get_noise(), peerblk_retrieval_rx(), rdtsc_probe(), rtc_get_noise(), and undinet_call().

◆ year

uint8_t year

Year (BCD)

Definition at line 12 of file ucode.h.

Referenced by asn1_generalized_time().

◆ century

uint8_t century

Century (BCD)

Definition at line 14 of file ucode.h.

Referenced by asn1_generalized_time().

◆ day

uint8_t day

Day (BCD)

Definition at line 16 of file ucode.h.

Referenced by asn1_generalized_time().

◆ month

uint8_t month

Month (BCD)

Definition at line 18 of file ucode.h.

Referenced by asn1_generalized_time().

◆ hver

uint32_t hver

Header version number.

Definition at line 12 of file ucode.h.

◆ date

struct ucode_date date

Date.

Definition at line 16 of file ucode.h.

◆ checksum

uint32_t checksum

Checksum.

Extended checksum.

Definition at line 20 of file ucode.h.

◆ lver

uint32_t lver

Loader version.

Definition at line 22 of file ucode.h.

◆ platforms

uint32_t platforms

Supported platforms.

Definition at line 24 of file ucode.h.

Referenced by ucode_describe().

◆ data_len

uint32_t data_len

◆ len

uint32_t len

Total size (or 0 to indicate 2048 bytes)

Patch length.

Equivalence table length.

Definition at line 28 of file ucode.h.

◆ reserved

uint8_t reserved[12]

Reserved.

Definition at line 30 of file ucode.h.

◆ count

uint32_t count

Extended signature count.

Definition at line 12 of file ucode.h.

◆ magic

uint32_t magic

Magic signature.

Definition at line 12 of file ucode.h.

◆ type

uint32_t type

Equivalence table type.

Patch type.

Definition at line 14 of file ucode.h.

◆ reserved_a

uint8_t reserved_a[16]

Reserved.

Definition at line 14 of file ucode.h.

◆ reserved_b

uint8_t reserved_b[14]

Reserved.

Definition at line 18 of file ucode.h.

◆ ucode_update