9 #include <soc/ramstage.h>
10 #include <soc/soc_util.h>
17 #include <hob_iiouds.h>
18 #include <hob_memmap.h>
37 uint8_t bmc_major_revision, bmc_minor_revision;
40 *ec_major_revision = bmc_major_revision & 0x7f;
41 *ec_minor_revision = ((bmc_minor_revision / 16) * 10) + (bmc_minor_revision % 16);
107 #define SPD_REGVID_LEN 6
117 const struct SystemMemoryMapHob *hob;
120 char *oem_str7 = empty;
130 for (
int ch = 0;
ch < MAX_CH;
ch++) {
131 for (
int dimm = 0; dimm < MAX_IMC; dimm++) {
134 oem_str7 =
strconcat(oem_str7, spd_reg_vid);
141 switch (pcie_config) {
169 .external_reference_designator =
"",
174 .internal_reference_designator =
"JCN32 - TPM_CONN",
176 .external_reference_designator =
"",
181 .internal_reference_designator =
"JCN7 - USB type C",
183 .external_reference_designator =
"",
198 uint8_t stack_busnos[MAX_IIO_STACK];
206 for (index = 0; index <
ARRAY_SIZE(stack_busnos); index++)
214 if (index == 0 || index == 1 || index == 2)
259 if (sec_bus == 0xFF) {
265 if (vendor_device_id == 0xFFFFFFFF)
286 slotinfo[index].slot_data_bus_width,
292 stack_busnos[
slotinfo[index].stack],
361 static bool fetched_vpd = 0;
365 return (
bool)skip_txt;
376 return (
bool)skip_txt;
int smbios_add_string(u8 *start, const char *str)
int smbios_write_type9(unsigned long *current, int *handle, const char *name, const enum misc_slot_type type, const enum slot_data_bus_bandwidth bandwidth, const enum misc_slot_usage usage, const enum misc_slot_length length, const u16 id, u8 slot_char1, u8 slot_char2, u8 bus, u8 dev_func)
int smbios_write_type8(unsigned long *current, int *handle, const struct port_information *port, size_t num_ports)
#define assert(statement)
static struct sdram_info params
@ CB_SUCCESS
Call completed successfully.
#define printk(level,...)
enum cb_err ipmi_get_pcie_config(uint8_t *pcie_config)
enum cb_err ipmi_get_slot_id(uint8_t *slot_id)
__weak void mainboard_silicon_init_params(SILICON_INIT_UPD *params)
@ SlotTypePciExpressGen3X16
@ SlotTypePciExpressGen3X4
#define SMBIOS_FEATURE_FLAGS_HOSTING_BOARD
#define SMBIOS_FEATURE_FLAGS_REPLACEABLE
#define SMBIOS_SLOT_HOTPLUG
const struct SystemMemoryMapHob * get_system_memory_map(void)
void read_fru_areas(const int port, const uint8_t id, uint16_t offset, struct fru_info_str *fru_info_str)
void ipmi_bmc_version(uint8_t *ipmi_bmc_major_revision, uint8_t *ipmi_bmc_minor_revision)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
static const struct pad_config gpio_table[]
struct chip_operations mainboard_ops
void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t)
unsigned int smbios_processor_family(struct cpuid_result res)
void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
static int create_smbios_type9(int *handle, unsigned long *current)
unsigned int smbios_processor_characteristics(void)
static char slot_id_str[SLOT_ID_LEN]
bool skip_intel_txt_lockdown(void)
static const struct port_information smbios_type8_info[]
static void write_oem_word(uint16_t val, char *str)
u8 smbios_mainboard_feature_flags(void)
const char * smbios_mainboard_location_in_chassis(void)
static int mainboard_smbios_data(struct device *dev, int *handle, unsigned long *current)
static void dl_oem_smbios_strings(struct device *dev, struct smbios_type11 *t)
struct fru_info_str fru_strings
unsigned int smbios_cpu_get_voltage(void)
static void mainboard_final(void *chip_info)
static void mainboard_enable(struct device *dev)
#define SKIP_INTEL_TXT_LOCKDOWN
#define SKIP_INTEL_TXT_LOCKDOWN_DEFAULT
static struct dramc_channel const ch[2]
void ocp_oem_smbios_strings(struct device *dev, struct smbios_type11 *t)
int smbios_add_oem_string(u8 *start, const char *str)
#define PCI_SECONDARY_BUS
#define PCI_EXP_SLTCAP_HPC
static __always_inline uint32_t pci_s_read_config32(pci_devfn_t dev, uint16_t reg)
static __always_inline uint16_t pci_s_read_config16(pci_devfn_t dev, uint16_t reg)
static __always_inline uint8_t pci_s_read_config8(pci_devfn_t dev, uint16_t reg)
u16 pci_s_find_capability(pci_devfn_t dev, u16 cap)
Given a device, and a capability type, return the next matching capability.
#define PCI_DEV(SEGBUS, DEV, FN)
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
uint8_t get_stack_busno(const uint8_t stack)
char * strconcat(const char *s1, const char *s2)
void(* enable_dev)(struct device *dev)
struct device_operations * ops
If this table is filled and put in CBMEM, then these info in CBMEM will be used to generate smbios ty...
const char * slot_designator
bool vpd_get_bool(const char *key, enum vpd_region region, uint8_t *val)
int snprintf(char *buf, size_t size, const char *fmt,...)
Note: This file is only for POSIX compatibility, and is meant to be chain-included via string....