summaryrefslogtreecommitdiff
path: root/src/arch/i386
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-02-22 06:09:43 +0000
committerStefan Reinauer <stepan@openbios.org>2010-02-22 06:09:43 +0000
commitde3206a7bebce99f11e753164cc4d46357bba96a (patch)
tree9843d883940e372dd357b1357ecd7eaba3e3365f /src/arch/i386
parentd650e9934ff8da9b9cb69e42e642c0ee6d390bf6 (diff)
This is a general cleanup patch
- drop include/part and move files to include/ - get rid lots of warnings - make resource allocator happy with w83627thg - trivial cbmem resume fix - fix payload and log level settings in abuild - fix kontron mptable for virtual wire mode - drop some dead includes and dead code. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5136 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386')
-rw-r--r--src/arch/i386/boot/acpi.c4
-rw-r--r--src/arch/i386/boot/coreboot_table.c2
-rw-r--r--src/arch/i386/boot/pirq_routing.c14
-rw-r--r--src/arch/i386/boot/tables.c4
-rw-r--r--src/arch/i386/include/arch/acpi.h5
-rw-r--r--src/arch/i386/include/arch/coreboot_tables.h (renamed from src/arch/i386/boot/coreboot_table.h)1
-rw-r--r--src/arch/i386/include/arch/smp/mpspec.h2
-rw-r--r--src/arch/i386/lib/console_printk.c2
-rw-r--r--src/arch/i386/lib/cpu.c2
9 files changed, 19 insertions, 17 deletions
diff --git a/src/arch/i386/boot/acpi.c b/src/arch/i386/boot/acpi.c
index 7a6221a2ef..ee9246993e 100644
--- a/src/arch/i386/boot/acpi.c
+++ b/src/arch/i386/boot/acpi.c
@@ -487,7 +487,7 @@ void suspend_resume(void)
/* this is to be filled by SB code - startup value what was found */
u8 acpi_slp_type = 0;
-int acpi_is_wakeup(void)
+static int acpi_is_wakeup(void)
{
return (acpi_slp_type == 3);
}
@@ -600,7 +600,7 @@ void acpi_jump_to_wakeup(void *vector)
memcpy(lowmem_backup_ptr, lowmem_backup, lowmem_backup_size);
/* copy wakeup trampoline in place */
- memcpy(WAKEUP_BASE, &__wakeup, &__wakeup_size);
+ memcpy((void *)WAKEUP_BASE, &__wakeup, (size_t)&__wakeup_size);
acpi_do_wakeup((u32)vector, acpi_backup_memory, CONFIG_RAMBASE, HIGH_MEMORY_SAVE);
}
diff --git a/src/arch/i386/boot/coreboot_table.c b/src/arch/i386/boot/coreboot_table.c
index f3b7f6daca..d956b127a9 100644
--- a/src/arch/i386/boot/coreboot_table.c
+++ b/src/arch/i386/boot/coreboot_table.c
@@ -24,7 +24,7 @@
#include <ip_checksum.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
-#include "coreboot_table.h"
+#include <arch/coreboot_tables.h>
#include <string.h>
#include <version.h>
#include <device/device.h>
diff --git a/src/arch/i386/boot/pirq_routing.c b/src/arch/i386/boot/pirq_routing.c
index 0d852c53b9..78e1dd1806 100644
--- a/src/arch/i386/boot/pirq_routing.c
+++ b/src/arch/i386/boot/pirq_routing.c
@@ -3,7 +3,11 @@
#include <string.h>
#include <device/pci.h>
-#if (CONFIG_DEBUG==1 && CONFIG_GENERATE_PIRQ_TABLE==1)
+#ifndef CONFIG_IRQ_SLOT_COUNT
+#warning "CONFIG_IRQ_SLOT_COUNT is not defined. PIRQ won't work correctly."
+#endif
+
+#if CONFIG_DEBUG
static void check_pirq_routing_table(struct irq_routing_table *rt)
{
uint8_t *addr = (uint8_t *)rt;
@@ -12,7 +16,6 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
printk_info("Checking Interrupt Routing Table consistency...\n");
-#if defined(CONFIG_IRQ_SLOT_COUNT)
if (sizeof(struct irq_routing_table) != rt->size) {
printk_warning("Inconsistent Interrupt Routing Table size (0x%x/0x%x).\n",
sizeof(struct irq_routing_table),
@@ -20,7 +23,6 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
);
rt->size=sizeof(struct irq_routing_table);
}
-#endif
for (i = 0; i < rt->size; i++)
sum += addr[i];
@@ -79,11 +81,8 @@ static int verify_copy_pirq_routing_table(unsigned long addr)
return 0;
}
-#else
-#define verify_copy_pirq_routing_table(addr)
#endif
-#if CONFIG_GENERATE_PIRQ_TABLE==1
unsigned long copy_pirq_routing_table(unsigned long addr)
{
/* Align the table to be 16 byte aligned. */
@@ -98,9 +97,8 @@ unsigned long copy_pirq_routing_table(unsigned long addr)
pirq_routing_irqs(addr);
return addr + intel_irq_routing_table.size;
}
-#endif
-#if (CONFIG_PIRQ_ROUTE==1 && CONFIG_GENERATE_PIRQ_TABLE==1)
+#if CONFIG_PIRQ_ROUTE
void pirq_routing_irqs(unsigned long addr)
{
int i, j, k, num_entries;
diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c
index 8000162573..805fe21121 100644
--- a/src/arch/i386/boot/tables.c
+++ b/src/arch/i386/boot/tables.c
@@ -23,12 +23,12 @@
#include <cpu/cpu.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
+#include <arch/coreboot_tables.h>
#include <arch/pirq_routing.h>
#include <arch/smp/mpspec.h>
#include <arch/acpi.h>
#include <string.h>
#include <cpu/x86/multiboot.h>
-#include "coreboot_table.h"
#include <cbmem.h>
#include <lib.h>
@@ -167,7 +167,7 @@ struct lb_memory *write_tables(void)
acpi_write_rsdp(low_rsdp,
(acpi_rsdt_t *)(high_rsdp->rsdt_address),
- (acpi_xsdt_t *)(high_rsdp->xsdt_address));
+ (acpi_xsdt_t *)((unsigned long)high_rsdp->xsdt_address));
} else {
printk_err("ERROR: Didn't find RSDP in high table.\n");
}
diff --git a/src/arch/i386/include/arch/acpi.h b/src/arch/i386/include/arch/acpi.h
index f28a0e97ea..23e4f0d109 100644
--- a/src/arch/i386/include/arch/acpi.h
+++ b/src/arch/i386/include/arch/acpi.h
@@ -355,7 +355,7 @@ typedef struct acpi_ecdt {
} __attribute__ ((packed)) acpi_ecdt_t;
-/* These are implemented by the target port */
+/* These are implemented by the target port or north/southbridge*/
unsigned long write_acpi_tables(unsigned long addr);
unsigned long acpi_fill_madt(unsigned long current);
unsigned long acpi_fill_mcfg(unsigned long current);
@@ -414,7 +414,10 @@ int acpi_get_sleep_type(void);
#endif
+/* northbridge/amd/amdfam10/amdfam10_acpi.c */
unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current);
+/* cpu/intel/speedstep/acpi.c */
+void generate_cpu_entries(void);
#define ACPI_WRITE_MADT_IOAPIC(dev,id) \
do { \
diff --git a/src/arch/i386/boot/coreboot_table.h b/src/arch/i386/include/arch/coreboot_tables.h
index 13ae9a29cb..91e6d6cbd5 100644
--- a/src/arch/i386/boot/coreboot_table.h
+++ b/src/arch/i386/include/arch/coreboot_tables.h
@@ -20,5 +20,6 @@ extern struct cmos_option_table option_table;
/* defined by mainboard.c if the mainboard requires extra resources */
int add_mainboard_resources(struct lb_memory *mem);
+int add_northbridge_resources(struct lb_memory *mem);
#endif /* COREBOOT_TABLE_H */
diff --git a/src/arch/i386/include/arch/smp/mpspec.h b/src/arch/i386/include/arch/smp/mpspec.h
index 2409071af1..ab29f2a088 100644
--- a/src/arch/i386/include/arch/smp/mpspec.h
+++ b/src/arch/i386/include/arch/smp/mpspec.h
@@ -31,6 +31,8 @@ struct intel_mp_floating
unsigned char mpf_checksum; /* Checksum (makes sum 0) */
unsigned char mpf_feature1; /* Standard or configuration ? */
unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */
+#define MP_FEATURE_VIRTUALWIRE (1 << 7)
+#define MP_FEATURE_PIC (0 << 7)
unsigned char mpf_feature3; /* Unused (0) */
unsigned char mpf_feature4; /* Unused (0) */
unsigned char mpf_feature5; /* Unused (0) */
diff --git a/src/arch/i386/lib/console_printk.c b/src/arch/i386/lib/console_printk.c
index 694ec9d631..e9005796e9 100644
--- a/src/arch/i386/lib/console_printk.c
+++ b/src/arch/i386/lib/console_printk.c
@@ -1,6 +1,4 @@
-extern int do_printk(int msg_level, const char *fmt, ...);
-
#define printk_emerg(fmt, arg...) do_printk(BIOS_EMERG ,fmt, ##arg)
#define printk_alert(fmt, arg...) do_printk(BIOS_ALERT ,fmt, ##arg)
#define printk_crit(fmt, arg...) do_printk(BIOS_CRIT ,fmt, ##arg)
diff --git a/src/arch/i386/lib/cpu.c b/src/arch/i386/lib/cpu.c
index 247ee88c0c..0bcd5a674c 100644
--- a/src/arch/i386/lib/cpu.c
+++ b/src/arch/i386/lib/cpu.c
@@ -224,7 +224,7 @@ void cpu_initialize(void)
info = cpu_info();
- printk_notice("Initializing CPU #%ld\n", info->index);
+ printk_info("Initializing CPU #%ld\n", info->index);
cpu = info->cpu;
if (!cpu) {