Make acpi_fill_dmar into parameter
Change-Id: I5e237cb7acbf47b2c8a4cd725ee8e16e422e3b17 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7371 Tested-by: build bot (Jenkins) Reviewed-by: Nicolas Reinecke <nr@das-labor.org> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
8be82e1017
commit
8d70e94ae1
|
@ -349,12 +349,8 @@ void acpi_create_srat(acpi_srat_t *srat)
|
||||||
header->checksum = acpi_checksum((void *)srat, header->length);
|
header->checksum = acpi_checksum((void *)srat, header->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long __attribute__((weak)) acpi_fill_dmar(unsigned long current)
|
void acpi_create_dmar(acpi_dmar_t *dmar,
|
||||||
{
|
unsigned long (*acpi_fill_dmar) (unsigned long))
|
||||||
return current;
|
|
||||||
}
|
|
||||||
|
|
||||||
void acpi_create_dmar(acpi_dmar_t *dmar)
|
|
||||||
{
|
{
|
||||||
acpi_header_t *header = &(dmar->header);
|
acpi_header_t *header = &(dmar->header);
|
||||||
unsigned long current = (unsigned long)dmar + sizeof(acpi_dmar_t);
|
unsigned long current = (unsigned long)dmar + sizeof(acpi_dmar_t);
|
||||||
|
|
|
@ -535,15 +535,14 @@ void acpi_create_mcfg(acpi_mcfg_t *mcfg);
|
||||||
|
|
||||||
void acpi_create_facs(acpi_facs_t *facs);
|
void acpi_create_facs(acpi_facs_t *facs);
|
||||||
|
|
||||||
void acpi_create_dmar(acpi_dmar_t *dmar);
|
void acpi_create_dmar(acpi_dmar_t *dmar,
|
||||||
|
unsigned long (*acpi_fill_dmar) (unsigned long));
|
||||||
unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
|
unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
|
||||||
u16 segment, u32 bar);
|
u16 segment, u32 bar);
|
||||||
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);
|
||||||
|
|
||||||
unsigned long acpi_fill_dmar(unsigned long);
|
|
||||||
|
|
||||||
#if CONFIG_HAVE_ACPI_SLIC
|
#if CONFIG_HAVE_ACPI_SLIC
|
||||||
unsigned long acpi_create_slic(unsigned long current);
|
unsigned long acpi_create_slic(unsigned long current);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -75,7 +75,7 @@ unsigned long acpi_fill_mcfg(unsigned long current)
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long acpi_fill_dmar(unsigned long current)
|
static unsigned long acpi_fill_dmar(unsigned long current)
|
||||||
{
|
{
|
||||||
int me_active = (dev_find_slot(0, PCI_DEVFN(3, 0)) != NULL);
|
int me_active = (dev_find_slot(0, PCI_DEVFN(3, 0)) != NULL);
|
||||||
int stepping = pci_read_config8(dev_find_slot(0, PCI_DEVFN(0, 0)), PCI_CLASS_REVISION);
|
int stepping = pci_read_config8(dev_find_slot(0, PCI_DEVFN(0, 0)), PCI_CLASS_REVISION);
|
||||||
|
@ -122,7 +122,7 @@ unsigned long northbridge_write_acpi_tables(unsigned long start, struct acpi_rsd
|
||||||
#if CONFIG_IOMMU
|
#if CONFIG_IOMMU
|
||||||
printk(BIOS_DEBUG, "ACPI: * DMAR\n");
|
printk(BIOS_DEBUG, "ACPI: * DMAR\n");
|
||||||
dmar = (acpi_dmar_t *) current;
|
dmar = (acpi_dmar_t *) current;
|
||||||
acpi_create_dmar(dmar);
|
acpi_create_dmar(dmar, acpi_fill_dmar);
|
||||||
current += dmar->header.length;
|
current += dmar->header.length;
|
||||||
ALIGN_CURRENT;
|
ALIGN_CURRENT;
|
||||||
acpi_add_table(rsdp, dmar);
|
acpi_add_table(rsdp, dmar);
|
||||||
|
|
Loading…
Reference in New Issue