diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-10-17 16:10:53 +0100 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-10-17 19:07:35 +0100 |
commit | 5999dba5f71f1c05040a551d2420ab8c7f3a9da4 (patch) | |
tree | 7313b1996a247bf938417d5cf2496f5f6625c0db /resources/libreboot/patch/kgpe-d16/0112-arch-x86-acpi-Add-IVRS-table-generation-routines.patch | |
parent | 4d909153e79661e54999e51693668f6d1ecc1cca (diff) | |
download | librebootfr-5999dba5f71f1c05040a551d2420ab8c7f3a9da4.tar.gz librebootfr-5999dba5f71f1c05040a551d2420ab8c7f3a9da4.zip |
New board: ASUS KGPE-D16
coreboot build errors:
In file included from src/northbridge/amd/amdfam10/misc_control.c:35:0:
src/include/option.h:13:27: error: static declaration of 'get_option' follows non-static declaration
static inline enum cb_err get_option(void *dest, const char *name)
^
In file included from src/northbridge/amd/amdfam10/misc_control.c:34:0:
src/include/pc80/mc146818rtc.h:176:13: note: previous declaration of 'get_option' was here
enum cb_err get_option(void *dest, const char *name);
Ping tpearson about this.
Also ping him about the fact that there isn't actually an option to
enable or disable native graphics initialization, but that the option
MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG is in fact available and set to Y in the
Kconfig file. I think this is probably since there isn't even an option
ROM available for the machine, so it's pointless to offer the setting.
Diffstat (limited to 'resources/libreboot/patch/kgpe-d16/0112-arch-x86-acpi-Add-IVRS-table-generation-routines.patch')
-rw-r--r-- | resources/libreboot/patch/kgpe-d16/0112-arch-x86-acpi-Add-IVRS-table-generation-routines.patch | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/resources/libreboot/patch/kgpe-d16/0112-arch-x86-acpi-Add-IVRS-table-generation-routines.patch b/resources/libreboot/patch/kgpe-d16/0112-arch-x86-acpi-Add-IVRS-table-generation-routines.patch new file mode 100644 index 00000000..92e241cc --- /dev/null +++ b/resources/libreboot/patch/kgpe-d16/0112-arch-x86-acpi-Add-IVRS-table-generation-routines.patch @@ -0,0 +1,119 @@ +From e8145c0398d63b35ac486bacd181ef26cc7b8707 Mon Sep 17 00:00:00 2001 +From: Timothy Pearson <kb9vqf@pearsoncomputing.net> +Date: Tue, 11 Aug 2015 17:48:32 -0500 +Subject: [PATCH 112/146] arch/x86/acpi: Add IVRS table generation routines + +--- + src/arch/x86/acpi.c | 25 +++++++++++++++++++++++++ + src/arch/x86/include/arch/acpi.h | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 56 insertions(+) + +diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c +index 417a322..e73e5f2 100644 +--- a/src/arch/x86/acpi.c ++++ b/src/arch/x86/acpi.c +@@ -6,6 +6,7 @@ + * + * Copyright (C) 2004 SUSE LINUX AG + * Copyright (C) 2005-2009 coresystems GmbH ++ * Copyright (C) 2015 Timothy Pearson <tpearson@raptorengineeringinc.com>, Raptor Engineering + * + * ACPI FADT, FACS, and DSDT table support added by + * Nick Barker <nick.barker9@btinternet.com>, and those portions +@@ -506,6 +507,30 @@ void acpi_create_hpet(acpi_hpet_t *hpet) + header->checksum = acpi_checksum((void *)hpet, sizeof(acpi_hpet_t)); + } + ++void acpi_create_ivrs(acpi_ivrs_t *ivrs, ++ unsigned long (*acpi_fill_ivrs)(acpi_ivrs_t* ivrs_struct, unsigned long current)) ++{ ++ acpi_header_t *header = &(ivrs->header); ++ unsigned long current = (unsigned long)ivrs + sizeof(acpi_ivrs_t); ++ ++ memset((void *)ivrs, 0, sizeof(acpi_ivrs_t)); ++ ++ /* Fill out header fields. */ ++ memcpy(header->signature, "IVRS", 4); ++ memcpy(header->oem_id, OEM_ID, 6); ++ memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); ++ memcpy(header->asl_compiler_id, ASLC, 4); ++ ++ header->length = sizeof(acpi_ivrs_t); ++ header->revision = 1; /* ACPI 1.0: N/A, ACPI 2.0/3.0/4.0: 1 */ ++ ++ current = acpi_fill_ivrs(ivrs, current); ++ ++ /* (Re)calculate length and checksum. */ ++ header->length = current - (unsigned long)ivrs; ++ header->checksum = acpi_checksum((void *)ivrs, header->length); ++} ++ + unsigned long acpi_write_hpet(device_t device, unsigned long current, acpi_rsdp_t *rsdp) + { + acpi_hpet_t *hpet; +diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h +index 28f650c..47bb253 100644 +--- a/src/arch/x86/include/arch/acpi.h ++++ b/src/arch/x86/include/arch/acpi.h +@@ -4,6 +4,7 @@ + * Copyright (C) 2004 SUSE LINUX AG + * Copyright (C) 2004 Nick Barker + * Copyright (C) 2008-2009 coresystems GmbH ++ * Copyright (C) 2015 Timothy Pearson <tpearson@raptorengineeringinc.com>, Raptor Engineering + * (Written by Stefan Reinauer <stepan@coresystems.de>) + * + * This program is free software; you can redistribute it and/or modify +@@ -194,6 +195,32 @@ typedef struct acpi_madt { + u32 flags; /* Multiple APIC flags */ + } __attribute__ ((packed)) acpi_madt_t; + ++typedef struct acpi_ivrs_info { ++} __attribute__ ((packed)) acpi_ivrs_info_t; ++ ++/* IVRS IVHD (I/O Virtualization Hardware Definition Block) */ ++typedef struct acpi_ivrs_ivhd { ++ uint8_t type; ++ uint8_t flags; ++ uint16_t length; ++ uint16_t device_id; ++ uint16_t capability_offset; ++ uint32_t iommu_base_low; ++ uint32_t iommu_base_high; ++ uint16_t pci_segment_group; ++ uint16_t iommu_info; ++ uint32_t efr; ++ uint8_t entry[0]; ++} __attribute__ ((packed)) acpi_ivrs_ivhd_t; ++ ++/* IVRS (I/O Virtualization Reporting Structure) */ ++typedef struct acpi_ivrs { ++ struct acpi_table_header header; ++ uint32_t iv_info; ++ uint32_t reserved[2]; ++ struct acpi_ivrs_ivhd ivhd; ++} __attribute__ ((packed)) acpi_ivrs_t; ++ + enum dev_scope_type { + SCOPE_PCI_ENDPOINT = 1, + SCOPE_PCI_SUB = 2, +@@ -497,6 +524,7 @@ unsigned long fw_cfg_acpi_tables(unsigned long start); + unsigned long write_acpi_tables(unsigned long addr); + unsigned long acpi_fill_madt(unsigned long current); + unsigned long acpi_fill_mcfg(unsigned long current); ++unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t* ivrs, unsigned long current); + void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id); + void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt); + #if IS_ENABLED(CONFIG_COMMON_FADT) +@@ -535,6 +563,9 @@ void acpi_create_srat(acpi_srat_t *srat, + void acpi_create_slit(acpi_slit_t *slit, + unsigned long (*acpi_fill_slit)(unsigned long current)); + ++void acpi_create_ivrs(acpi_ivrs_t *ivrs, ++ unsigned long (*acpi_fill_ivrs)(acpi_ivrs_t* ivrs_struct, unsigned long current)); ++ + #if ENV_RAMSTAGE + void acpi_create_hpet(acpi_hpet_t *hpet); + unsigned long acpi_write_hpet(device_t device, unsigned long start, acpi_rsdp_t *rsdp); +-- +1.7.9.5 + |