Make acpi_fill_hest into parameter
This avoids the need to supply weak function and avoids associated risks of forgetting to link in relevant files. Change-Id: Ie96475babb4aa4ea8db49023af5b31bfa63b21dc Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7373 Tested-by: build bot (Jenkins) Reviewed-by: Rudolf Marek <r.marek@assembler.cz>
This commit is contained in:
parent
9bb5c5c402
commit
807127f8cc
|
@ -554,11 +554,6 @@ static void acpi_write_rsdp(acpi_rsdp_t *rsdp, acpi_rsdt_t *rsdt,
|
||||||
rsdp->ext_checksum = acpi_checksum((void *)rsdp, sizeof(acpi_rsdp_t));
|
rsdp->ext_checksum = acpi_checksum((void *)rsdp, sizeof(acpi_rsdp_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long __attribute__((weak)) acpi_fill_hest(acpi_hest_t *hest)
|
|
||||||
{
|
|
||||||
return (unsigned long)hest;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, acpi_hest_esd_t *esd, u16 type, void *data, u16 data_len)
|
unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, acpi_hest_esd_t *esd, u16 type, void *data, u16 data_len)
|
||||||
{
|
{
|
||||||
acpi_header_t *header = &(hest->header);
|
acpi_header_t *header = &(hest->header);
|
||||||
|
@ -618,7 +613,8 @@ unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, acpi_hest_esd_t *
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ACPI 4.0 */
|
/* ACPI 4.0 */
|
||||||
void acpi_write_hest(acpi_hest_t *hest)
|
void acpi_write_hest(acpi_hest_t *hest,
|
||||||
|
unsigned long (*acpi_fill_hest)(acpi_hest_t *hest))
|
||||||
{
|
{
|
||||||
acpi_header_t *header = &(hest->header);
|
acpi_header_t *header = &(hest->header);
|
||||||
|
|
||||||
|
|
|
@ -546,10 +546,10 @@ unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
|
||||||
void acpi_dmar_drhd_fixup(unsigned long base, unsigned long current);
|
void acpi_dmar_drhd_fixup(unsigned long base, unsigned long current);
|
||||||
unsigned long acpi_create_dmar_drhd_ds_pci(unsigned long current, u8 segment,
|
unsigned long acpi_create_dmar_drhd_ds_pci(unsigned long current, u8 segment,
|
||||||
u8 dev, u8 fn);
|
u8 dev, u8 fn);
|
||||||
|
void acpi_write_hest(acpi_hest_t *hest,
|
||||||
|
unsigned long (*acpi_fill_hest)(acpi_hest_t *hest));
|
||||||
|
|
||||||
void acpi_write_hest(acpi_hest_t *hest);
|
|
||||||
unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, acpi_hest_esd_t *esd, u16 type, void *data, u16 len);
|
unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, acpi_hest_esd_t *esd, u16 type, void *data, u16 len);
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest);
|
|
||||||
|
|
||||||
void acpi_save_gnvs(u32 gnvs_address);
|
void acpi_save_gnvs(u32 gnvs_address);
|
||||||
|
|
||||||
|
|
|
@ -793,7 +793,7 @@ static void cpu_bus_init(device_t dev)
|
||||||
/* North Bridge Structures */
|
/* North Bridge Structures */
|
||||||
|
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -843,7 +843,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
|
@ -815,7 +815,7 @@ static void northbridge_fill_ssdt_generator(void)
|
||||||
acpigen_pop_len();
|
acpigen_pop_len();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -845,7 +845,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,7 @@ static unsigned scan_chains(device_t dev, unsigned max)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
|
@ -459,7 +459,7 @@ static void set_resources(struct device *dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
|
@ -458,7 +458,8 @@ static void nb_set_resources(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
|
||||||
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -510,7 +511,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
|
@ -459,7 +459,7 @@ static void set_resources(device_t dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
|
@ -453,7 +453,7 @@ static void set_resources(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
|
@ -447,7 +447,7 @@ static void northbridge_init(struct device *dev)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
|
||||||
{
|
{
|
||||||
void *addr, *current;
|
void *addr, *current;
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ static unsigned long agesa_write_acpi_tables(unsigned long current,
|
||||||
/* HEST */
|
/* HEST */
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
hest = (acpi_hest_t *)current;
|
hest = (acpi_hest_t *)current;
|
||||||
acpi_write_hest((void *)current);
|
acpi_write_hest((void *)current, acpi_fill_hest);
|
||||||
acpi_add_table(rsdp, (void *)current);
|
acpi_add_table(rsdp, (void *)current);
|
||||||
current += ((acpi_header_t *)current)->length;
|
current += ((acpi_header_t *)current)->length;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue