3 #define __SIMPLE_DEVICE__
12 #include <soc/pci_devs.h>
13 #include <soc/ramstage.h>
22 ASSERT(gpe0_base_address >= 0x80000000);
26 return (
uint16_t)(gpe0_base_address + reg_address);
36 ASSERT(gpio_base_address != 0x00000000);
39 return (
uint32_t *)(gpio_base_address + reg_address);
49 ASSERT(gpio_base_address != 0x00000000);
52 return (
void *)gpio_base_address;
61 ASSERT(gpio_base_address >= 0x80000000);
65 return (
uint16_t)(gpio_base_address + reg_address);
90 die(
"Invalid MTRR index specified!\n");
139 switch (reg_address) {
146 die(
"ERROR - Unsupported CPU register!\n");
152 switch (reg_address) {
154 die(
"ERROR - Unsupported CPU register!\n");
298 "ERROR - Unknown register set (0x%08x)!\n",
358 "ERROR - Unknown register set (0x%08x)!\n",
#define QNC_MCR_BYTE_ENABLES
#define QNC_ACCESS_PORT_MCR
#define QUARK_NC_HOST_BRIDGE_IA32_MTRR_DEF_TYPE
#define QUARK_OPCODE_WRITE
#define QNC_ACCESS_PORT_MEA
#define QUARK_OPCODE_IO_READ
#define B_QNC_LPC_GPE0BLK_MASK
#define QUARK_NC_HOST_BRIDGE_IA32_MTRR_CAP
#define QUARK_SC_USB_AFE_SB_PORT_ID
#define QUARK_OPCODE_READ
#define QUARK_NC_HOST_BRIDGE_IA32_MTRR_PHYSBASE0
#define QUARK_NC_HOST_BRIDGE_SB_PORT_ID
#define QUARK_NC_HOST_BRIDGE_MTRR_FIX64K_00000
#define QNC_MCR_OP_OFFSET
#define QUARK_OPCODE_IO_WRITE
#define QNC_MCR_PORT_OFFSET
#define QUARK_NC_RMU_SB_PORT_ID
#define QNC_MCR_REG_OFFSET
#define QUARK_ALT_OPCODE_READ
#define QNC_ACCESS_PORT_MDR
#define R_QNC_LPC_GPE0BLK
#define QUARK_SC_PCIE_AFE_SB_PORT_ID
#define QUARK_NC_HOST_BRIDGE_MTRR_FIX16K_80000
#define B_QNC_LPC_GPA_BASE_MASK
#define R_QNC_LPC_GBA_BASE
#define QUARK_ALT_OPCODE_WRITE
#define QUARK_NC_HOST_BRIDGE_MTRR_FIX4K_F8000
#define QUARK_SCSS_SOC_UNIT_SB_PORT_ID
#define printk(level,...)
void __noreturn die(const char *fmt,...)
static __always_inline void write_cr4(CRx_TYPE data)
static __always_inline CRx_TYPE read_cr4(void)
static __always_inline void write_cr0(CRx_TYPE data)
static __always_inline CRx_TYPE read_cr0(void)
void outl(u32 val, u16 port)
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
void mainboard_gpio_pcie_reset(uint32_t pin_value)
REG_SCRIPT_BUS_ENTRY(mainboard_reg_script_bus_table)
#define PCI_BASE_ADDRESS_MEM_ATTR_MASK
#define PCI_BASE_ADDRESS_0
#define PCI_BASE_ADDRESS_1
#define REG_SCRIPT_DISPLAY_REGISTER
#define REG_SCRIPT_DISPLAY_NOTHING
static void reg_gpe0_write(uint32_t reg_address, uint32_t value)
static uint64_t reg_read(struct reg_script_context *ctx)
static void reg_pcie_afe_write(uint32_t reg_address, uint32_t value)
static uint32_t reg_gpio_read(uint32_t reg_address)
uint32_t reg_host_bridge_unit_read(uint32_t reg_address)
void mea_write(uint32_t reg_address)
static uint32_t reg_pcie_afe_read(uint32_t reg_address)
static void reg_gpio_write(uint32_t reg_address, uint32_t value)
void mcr_write(uint8_t opcode, uint8_t port, uint32_t reg_address)
static uint32_t reg_gpe0_read(uint32_t reg_address)
static uint16_t get_legacy_gpio_address(uint32_t reg_address)
uint32_t reg_legacy_gpio_read(uint32_t reg_address)
msr_t soc_msr_read(unsigned int index)
uint32_t port_reg_read(uint8_t port, uint32_t offset)
static void reg_cpu_cr_write(uint32_t reg_address, CRx_TYPE value)
static void reg_soc_unit_write(uint32_t reg_address, uint32_t value)
static uint32_t * get_gpio_address(uint32_t reg_address)
void reg_legacy_gpio_write(uint32_t reg_address, uint32_t value)
void mdr_write(uint32_t value)
void soc_msr_write(unsigned int index, msr_t msr)
static uint32_t reg_usb_read(uint32_t reg_address)
const struct reg_script_bus_entry soc_reg_script_bus_table
static uint16_t get_gpe0_address(uint32_t reg_address)
static void reg_write(struct reg_script_context *ctx)
static void reg_rmu_temp_write(uint32_t reg_address, uint32_t value)
void * get_i2c_address(void)
static CRx_TYPE reg_cpu_cr_read(uint32_t reg_address)
static uint32_t mtrr_index_to_host_bridge_register_offset(unsigned long index)
uint32_t reg_rmu_temp_read(uint32_t reg_address)
static void reg_host_bridge_unit_write(uint32_t reg_address, uint32_t value)
static void reg_usb_write(uint32_t reg_address, uint32_t value)
void port_reg_write(uint8_t port, uint32_t offset, uint32_t value)
static uint32_t reg_soc_unit_read(uint32_t reg_address)
unsigned long long uint64_t
const struct reg_script * step
const char * display_prefix
#define MTRR_FIX_64K_00000
#define MTRR_PHYS_BASE(reg)
#define MTRR_PHYS_MASK(reg)
#define MTRR_FIX_16K_A0000
#define MTRR_FIX_4K_C0000
#define MTRR_FIX_16K_80000
#define MTRR_FIX_4K_F8000
#define MTRR_DEF_TYPE_MSR