3 #include <baseboard/variants.h>
13 #include <soc/ramstage.h>
18 #define MAX_PATH_DEPTH 12
19 #define MAX_NUM_MAPPINGS 10
29 if (mac[i] != 0x00 && mac[i] != 0xff)
46 uint8_t buf[16], mapping[16], i = 0, chain_len = 0;
49 memset(mapping, 0,
sizeof(mapping));
69 mapping[1] = chain_len;
70 for (i = 0; i < chain_len; i++)
71 mapping[i + 4] =
buf[chain_len - i - 1];
74 if (hwilib_find_blocks(
"hwinfo.hex") !=
CB_SUCCESS)
78 if (hwilib_get_field(XMac1Mapping + i,
buf, 16) != 16)
95 uint32_t legacy_delay, us_since_boot;
99 if (hwilib_find_blocks(
"hwinfo.hex") !=
CB_SUCCESS)
103 if (hwilib_get_field(LegacyDelay, (
uint8_t *) &legacy_delay,
104 sizeof(legacy_delay)) !=
sizeof(legacy_delay))
109 if (us_since_boot > legacy_delay)
113 legacy_delay - us_since_boot, legacy_delay);
124 params->PkgCStateLimit = 0;
130 params->PmcLpmS0ixSubStateEnableMask = 0;
131 params->PmcV1p05PhyExtFetControlEn = 0;
132 params->PmcV1p05IsExtFetControlEn = 0;
151 if (
CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE)) {
void mainboard_silicon_init_params(FSP_SIL_UPD *params)
struct chip_operations mainboard_ops
void * memset(void *dstpp, int c, size_t len)
static struct sdram_info params
cb_err
coreboot error codes
@ CB_ERR
Generic error code.
@ CB_SUCCESS
Call completed successfully.
#define printk(level,...)
BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_EXIT, sch5545_ec_hwm_init, NULL)
struct device * dev_find_device(u16 vendor, u16 device, struct device *from)
Find a device of a given vendor and type.
const char * dev_path(const struct device *dev)
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
static void stopwatch_wait_until_expired(struct stopwatch *sw)
static void stopwatch_init_msecs_expire(struct stopwatch *sw, long ms)
uint32_t get_us_since_boot(void)
#define BIOS_NOTICE
BIOS_NOTICE - Unexpected but relatively insignificant.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
const struct pad_config *__weak variant_gpio_table(size_t *num)
#define PCI_COMMAND_MASTER
const struct smm_save_state_ops *legacy_ops __weak
enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_LEN])
This function will search for a MAC address which can be assigned to a MACPHY.
void __weak variant_mainboard_final(void)
static void wait_for_legacy_dev(void *unused)
static void mainboard_init(void *chip_info)
static void mainboard_final(void *chip_info)
static uint8_t is_mac_adr_valid(uint8_t mac[MAC_ADDR_LEN])
This function can decide if a given MAC address is valid or not.
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
int memcmp(const void *s1, const void *s2, size_t n)
DEVTREE_CONST struct device * dev
void(* init)(void *chip_info)
DEVTREE_CONST struct bus * bus