Add CONFIG_GENERATE_* for tables so that the user can select which tables not

to build, but by default all the tables that are available are built.

Make PIRQ table build for qemu.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4778 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Myles Watson
2009-10-15 13:35:47 +00:00
parent 45b811b135
commit b8e2027be8
424 changed files with 1215 additions and 1148 deletions

View File

@@ -1,5 +1,5 @@
uses CONFIG_HAVE_PIRQ_TABLE
uses CONFIG_HAVE_ACPI_TABLES
uses CONFIG_GENERATE_PIRQ_TABLE
uses CONFIG_GENERATE_ACPI_TABLES
uses CONFIG_MULTIBOOT
uses CONFIG_HAVE_ACPI_RESUME
@@ -9,10 +9,10 @@ if CONFIG_MULTIBOOT
object multiboot.o
end
object tables.o
if CONFIG_HAVE_PIRQ_TABLE
if CONFIG_GENERATE_PIRQ_TABLE
object pirq_routing.o
end
if CONFIG_HAVE_ACPI_TABLES
if CONFIG_GENERATE_ACPI_TABLES
object acpi.o
object acpigen.o
if CONFIG_HAVE_ACPI_RESUME

View File

@@ -2,8 +2,8 @@ obj-y += boot.o
obj-y += coreboot_table.o
obj-$(CONFIG_MULTIBOOT) += multiboot.o
obj-y += tables.o
obj-$(CONFIG_HAVE_PIRQ_TABLE) += pirq_routing.o
obj-$(CONFIG_HAVE_ACPI_TABLES) += acpi.o
obj-$(CONFIG_HAVE_ACPI_TABLES) += acpigen.o
obj-$(CONFIG_GENERATE_PIRQ_TABLE) += pirq_routing.o
obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi.o
obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpigen.o
obj-$(CONFIG_HAVE_ACPI_RESUME) += wakeup.S

View File

@@ -436,7 +436,7 @@ static struct lb_memory *build_lb_mem(struct lb_header *head)
return mem;
}
#if CONFIG_HAVE_HIGH_TABLES == 1
#if CONFIG_WRITE_HIGH_TABLES == 1
extern uint64_t high_tables_base, high_tables_size;
#endif
@@ -447,7 +447,7 @@ unsigned long write_coreboot_table(
struct lb_header *head;
struct lb_memory *mem;
#if CONFIG_HAVE_HIGH_TABLES == 1
#if CONFIG_WRITE_HIGH_TABLES == 1
printk_debug("Writing high table forward entry at 0x%08lx\n",
low_table_end);
head = lb_table_init(low_table_end);
@@ -505,7 +505,7 @@ unsigned long write_coreboot_table(
lb_add_memory_range(mem, LB_MEM_TABLE,
rom_table_start, rom_table_end-rom_table_start);
#if CONFIG_HAVE_HIGH_TABLES == 1
#if CONFIG_WRITE_HIGH_TABLES == 1
printk_debug("Adding high table area\n");
// should this be LB_MEM_ACPI?
lb_add_memory_range(mem, LB_MEM_TABLE,

View File

@@ -3,7 +3,7 @@
#include <string.h>
#include <device/pci.h>
#if (CONFIG_DEBUG==1 && CONFIG_HAVE_PIRQ_TABLE==1)
#if (CONFIG_DEBUG==1 && CONFIG_GENERATE_PIRQ_TABLE==1)
static void check_pirq_routing_table(struct irq_routing_table *rt)
{
uint8_t *addr = (uint8_t *)rt;
@@ -83,7 +83,7 @@ static int verify_copy_pirq_routing_table(unsigned long addr)
#define verify_copy_pirq_routing_table(addr)
#endif
#if CONFIG_HAVE_PIRQ_TABLE==1
#if CONFIG_GENERATE_PIRQ_TABLE==1
unsigned long copy_pirq_routing_table(unsigned long addr)
{
/* Align the table to be 16 byte aligned. */
@@ -100,7 +100,7 @@ unsigned long copy_pirq_routing_table(unsigned long addr)
}
#endif
#if (CONFIG_PIRQ_ROUTE==1 && CONFIG_HAVE_PIRQ_TABLE==1)
#if (CONFIG_PIRQ_ROUTE==1 && CONFIG_GENERATE_PIRQ_TABLE==1)
void pirq_routing_irqs(unsigned long addr)
{
int i, j, k, num_entries;

View File

@@ -104,7 +104,7 @@ struct lb_memory *write_tables(void)
post_code(0x9a);
/* Write ACPI tables to F segment and high tables area */
#if CONFIG_HAVE_ACPI_TABLES == 1
#if CONFIG_GENERATE_ACPI_TABLES == 1
if (high_tables_base) {
unsigned long acpi_start = high_table_end;
rom_table_end = ALIGN(rom_table_end, 16);
@@ -134,7 +134,7 @@ struct lb_memory *write_tables(void)
#endif
post_code(0x9b);
#if CONFIG_HAVE_MP_TABLE == 1
#if CONFIG_GENERATE_MP_TABLE == 1
/* The smp table must be in 0-1K, 639K-640K, or 960K-1M */
rom_table_end = write_smp_table(rom_table_end);
rom_table_end = ALIGN(rom_table_end, 1024);
@@ -144,7 +144,7 @@ struct lb_memory *write_tables(void)
high_table_end = write_smp_table(high_table_end);
high_table_end = ALIGN(high_table_end, 1024);
}
#endif /* CONFIG_HAVE_MP_TABLE */
#endif /* CONFIG_GENERATE_MP_TABLE */
post_code(0x9c);

View File

@@ -14,7 +14,7 @@
#ifndef __ASM_ACPI_H
#define __ASM_ACPI_H
#if CONFIG_HAVE_ACPI_TABLES==1
#if CONFIG_GENERATE_ACPI_TABLES==1
#include <stdint.h>
@@ -404,7 +404,7 @@ do { \
#define IO_APIC_ADDR 0xfec00000UL
#else // CONFIG_HAVE_ACPI_TABLES
#else // CONFIG_GENERATE_ACPI_TABLES
#define write_acpi_tables(start) (start)

View File

@@ -39,7 +39,7 @@ struct irq_routing_table {
extern const struct irq_routing_table intel_irq_routing_table;
#if CONFIG_HAVE_PIRQ_TABLE==1
#if CONFIG_GENERATE_PIRQ_TABLE==1
unsigned long copy_pirq_routing_table(unsigned long start);
unsigned long write_pirq_routing_table(unsigned long start);
#if CONFIG_PIRQ_ROUTE==1

View File

@@ -1,6 +1,6 @@
uses CONFIG_HAVE_MP_TABLE
uses CONFIG_GENERATE_MP_TABLE
if CONFIG_HAVE_MP_TABLE
if CONFIG_GENERATE_MP_TABLE
object mpspec.o
end
#object ioapic.o CONFIG_IOAPIC

View File

@@ -1,4 +1,4 @@
obj-$(CONFIG_HAVE_MP_TABLE) += mpspec.o
obj-$(CONFIG_GENERATE_MP_TABLE) += mpspec.o
# what about this: how awkward.
#object ioapic.o CONFIG_IOAPIC

View File

@@ -39,13 +39,13 @@ struct irq_routing_table {
extern const struct irq_routing_table intel_irq_routing_table;
#if defined(CONFIG_DEBUG) && defined(CONFIG_HAVE_PIRQ_TABLE)
#if defined(CONFIG_DEBUG) && defined(CONFIG_GENERATE_PIRQ_TABLE)
void check_pirq_routing_table(void);
#else
#define check_pirq_routing_table() do {} while(0)
#endif
#if defined(CONFIG_HAVE_PIRQ_TABLE)
#if defined(CONFIG_GENERATE_PIRQ_TABLE)
unsigned long copy_pirq_routing_table(unsigned long start);
#else
#define copy_pirq_routing_table(start) (start)