18 #include <soc/iomap.h>
21 #define DPTC_TOTAL_UPDATE_PARAMS 4
28 #define DPTC_INPUTS(_thermctllmit, _sustained, _fast, _slow) \
30 .size = sizeof(struct dptc_input), \
33 .id = ALIB_DPTC_THERMAL_CONTROL_LIMIT_ID, \
34 .value = _thermctllmit, \
37 .id = ALIB_DPTC_SUSTAINED_POWER_LIMIT_ID, \
38 .value = _sustained, \
41 .id = ALIB_DPTC_FAST_PPT_LIMIT_ID, \
45 .id = ALIB_DPTC_SLOW_PPT_LIMIT_ID, \
106 unsigned int idx = 0;
111 uintptr_t early_reserved_dram_start, early_reserved_dram_end;
114 early_reserved_dram_start = e->
base;
115 early_reserved_dram_end = e->
base + e->
size;
131 (early_reserved_dram_start - (1 *
MiB)) /
KiB);
135 (early_reserved_dram_end - early_reserved_dram_start) /
KiB);
140 (mem_usable - early_reserved_dram_end) /
KiB);
157 if (res->
type == EFI_RESOURCE_SYSTEM_MEMORY && res->
addr < mem_usable)
159 if (res->
type == EFI_RESOURCE_MEMORY_MAPPED_IO)
162 if (res->
type == EFI_RESOURCE_SYSTEM_MEMORY)
164 else if (res->
type == EFI_RESOURCE_MEMORY_RESERVED)
173 gnb_apic->
base = GNB_IO_APIC_ADDR;
174 gnb_apic->
size = 0x00001000;
191 config->sustained_power_limit_mW,
192 config->fast_ppt_limit_mW,
193 config->slow_ppt_limit_mW);
195 config->thermctl_limit_tablet_mode_degreeC,
196 config->sustained_power_limit_tablet_mode_mW,
197 config->fast_ppt_limit_tablet_mode_mW,
198 config->slow_ppt_limit_tablet_mode_mW);
201 (
uint8_t *)&tablet_mode_input,
sizeof(tablet_mode_input));
224 static const struct pci_driver family17_root_complex
__pci_driver = {
void acpigen_write_alib_dptc(uint8_t *default_param, size_t default_param_len, uint8_t *tablet_param, size_t tablet_param_len)
void setup_ioapic(void *ioapic_base, u8 ioapic_id)
struct dptc_input __packed
#define printk(level,...)
struct resource * new_resource(struct device *dev, unsigned int index)
See if a resource structure already exists for a given index and if not allocate one.
void mmconf_resource(struct device *dev, unsigned long index)
@ HOB_TYPE_RESOURCE_DESCRIPTOR
@ HOB_TYPE_END_OF_HOB_LIST
void * fsp_get_hob_list(void)
const struct hob_resource * fsp_hob_header_to_resource(const struct hob_header *hob)
const struct hob_header * fsp_next_hob(const struct hob_header *parent)
static void noop_set_resources(struct device *dev)
#define ram_resource(dev, idx, basek, sizek)
#define mmio_resource(dev, idx, basek, sizek)
#define reserved_ram_resource(dev, idx, basek, sizek)
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
void pci_dev_enable_resources(struct device *dev)
#define PCI_DID_AMD_17H_MODEL_101F_NB
static void root_complex_init(struct device *dev)
static const char * gnb_acpi_name(const struct device *dev)
static void acipgen_dptci(void)
static struct device_operations root_complex_operations
static void root_complex_fill_ssdt(const struct device *device)
#define DPTC_TOTAL_UPDATE_PARAMS
static const struct pci_driver family17_root_complex __pci_driver
static void read_resources(struct device *dev)
#define DPTC_INPUTS(_thermctllmit, _sustained, _fast, _slow)
#define IORESOURCE_ASSIGNED
void acpi_fill_root_complex_tom(const struct device *device)
const struct memmap_early_dram * memmap_get_early_dram_usage(void)
void(* read_resources)(struct device *dev)