16 #include <soc/iomap.h>
20 #define DPTC_TOTAL_UPDATE_PARAMS 4
27 #define DPTC_INPUTS(_thermctllmit, _sustained, _fast, _slow) \
29 .size = sizeof(struct dptc_input), \
32 .id = ALIB_DPTC_THERMAL_CONTROL_LIMIT_ID, \
33 .value = _thermctllmit, \
36 .id = ALIB_DPTC_SUSTAINED_POWER_LIMIT_ID, \
37 .value = _sustained, \
40 .id = ALIB_DPTC_FAST_PPT_LIMIT_ID, \
44 .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);
142 (mem_usable - early_reserved_dram_end) /
KiB);
159 if (res->
type == EFI_RESOURCE_SYSTEM_MEMORY && res->
addr < mem_usable)
161 if (res->
type == EFI_RESOURCE_MEMORY_MAPPED_IO)
164 if (res->
type == EFI_RESOURCE_SYSTEM_MEMORY)
166 else if (res->
type == EFI_RESOURCE_MEMORY_RESERVED)
175 gnb_apic->
base = GNB_IO_APIC_ADDR;
176 gnb_apic->
size = 0x00001000;
193 config->sustained_power_limit_mW,
194 config->fast_ppt_limit_mW,
195 config->slow_ppt_limit_mW);
197 config->thermctl_limit_tablet_mode_degreeC,
198 config->sustained_power_limit_tablet_mode_mW,
199 config->fast_ppt_limit_tablet_mode_mW,
200 config->slow_ppt_limit_tablet_mode_mW);
203 (
uint8_t *)&tablet_mode_input,
sizeof(tablet_mode_input));
226 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)
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)
struct dptc_input __packed
#define DPTC_INPUTS(_thermctllmit, _sustained, _fast, _slow)
#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_606F_NB
#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)