summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-03-22 11:42:32 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-22 11:42:32 +0000
commitc02b4fc9db3c3c1e263027382697b566127f66bb (patch)
tree11bd18488e360e5c1beeb9ccb852ef4489c3689a /src/arch
parent27852aba6787617ca5656995cbc7e8ef0a3ea22c (diff)
printk_foo -> printk(BIOS_FOO, ...)
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@5266 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/boot/acpi.c24
-rw-r--r--src/arch/i386/boot/boot.c14
-rw-r--r--src/arch/i386/boot/coreboot_table.c24
-rw-r--r--src/arch/i386/boot/gdt.c4
-rw-r--r--src/arch/i386/boot/multiboot.c2
-rw-r--r--src/arch/i386/boot/pirq_routing.c40
-rw-r--r--src/arch/i386/boot/tables.c8
-rw-r--r--src/arch/i386/lib/console_printk.c38
-rw-r--r--src/arch/i386/lib/cpu.c10
-rw-r--r--src/arch/i386/lib/exception.c2
-rw-r--r--src/arch/i386/lib/pci_ops_auto.c8
-rw-r--r--src/arch/i386/smp/ioapic.c26
-rw-r--r--src/arch/i386/smp/mpspec.c6
13 files changed, 103 insertions, 103 deletions
diff --git a/src/arch/i386/boot/acpi.c b/src/arch/i386/boot/acpi.c
index ee9246993e..9bab92831f 100644
--- a/src/arch/i386/boot/acpi.c
+++ b/src/arch/i386/boot/acpi.c
@@ -69,7 +69,7 @@ void acpi_add_table(acpi_rsdp_t *rsdp, void *table)
}
if (i >= entries_num) {
- printk_err("ACPI: Error: Could not add ACPI table, too many tables.\n");
+ printk(BIOS_ERR, "ACPI: Error: Could not add ACPI table, too many tables.\n");
return;
}
@@ -101,7 +101,7 @@ void acpi_add_table(acpi_rsdp_t *rsdp, void *table)
xsdt->header.length);
}
- printk_debug("ACPI: added table %d/%d Length now %d\n",
+ printk(BIOS_DEBUG, "ACPI: added table %d/%d Length now %d\n",
i+1, entries_num, rsdt->header.length);
}
@@ -497,17 +497,17 @@ static acpi_rsdp_t *valid_rsdp(acpi_rsdp_t *rsdp)
if (strncmp((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0)
return NULL;
- printk_debug("Looking on %p for valid checksum\n", rsdp);
+ printk(BIOS_DEBUG, "Looking on %p for valid checksum\n", rsdp);
if (acpi_checksum((void *)rsdp, 20) != 0)
return NULL;
- printk_debug("Checksum 1 passed\n");
+ printk(BIOS_DEBUG, "Checksum 1 passed\n");
if ((rsdp->revision > 1) && (acpi_checksum((void *)rsdp,
rsdp->length) != 0))
return NULL;
- printk_debug("Checksum 2 passed all OK\n");
+ printk(BIOS_DEBUG, "Checksum 2 passed all OK\n");
return rsdp;
}
@@ -534,7 +534,7 @@ void *acpi_find_wakeup_vector(void)
if (!acpi_is_wakeup())
return NULL;
- printk_debug("Trying to find the wakeup vector ...\n");
+ printk(BIOS_DEBUG, "Trying to find the wakeup vector ...\n");
/* find RSDP */
for (p = (char *) 0xe0000; p < (char *) 0xfffff; p+=16) {
@@ -545,11 +545,11 @@ void *acpi_find_wakeup_vector(void)
if (rsdp == NULL)
return NULL;
- printk_debug("RSDP found at %p\n", rsdp);
+ printk(BIOS_DEBUG, "RSDP found at %p\n", rsdp);
rsdt = (acpi_rsdt_t *) rsdp->rsdt_address;
end = (char *) rsdt + rsdt->header.length;
- printk_debug("RSDT found at %p ends at %p\n", rsdt, end);
+ printk(BIOS_DEBUG, "RSDT found at %p ends at %p\n", rsdt, end);
for (i = 0; ((char *) &rsdt->entry[i]) < end; i++) {
fadt = (acpi_fadt_t *) rsdt->entry[i];
@@ -561,17 +561,17 @@ void *acpi_find_wakeup_vector(void)
if (fadt == NULL)
return NULL;
- printk_debug("FADT found at %p\n", fadt);
+ printk(BIOS_DEBUG, "FADT found at %p\n", fadt);
facs = (acpi_facs_t *)fadt->firmware_ctrl;
if (facs == NULL) {
- printk_debug("No FACS found, wake up from S3 not possible.\n");
+ printk(BIOS_DEBUG, "No FACS found, wake up from S3 not possible.\n");
return NULL;
}
- printk_debug("FACS found at %p\n", facs);
+ printk(BIOS_DEBUG, "FACS found at %p\n", facs);
wake_vec = (void *) facs->firmware_waking_vector;
- printk_debug("OS waking vector is %p\n", wake_vec);
+ printk(BIOS_DEBUG, "OS waking vector is %p\n", wake_vec);
return wake_vec;
}
diff --git a/src/arch/i386/boot/boot.c b/src/arch/i386/boot/boot.c
index 8c8980ae99..895065e64a 100644
--- a/src/arch/i386/boot/boot.c
+++ b/src/arch/i386/boot/boot.c
@@ -84,13 +84,13 @@ void jmp_to_elf_entry(void *entry, unsigned long buffer, unsigned long size)
adjusted_boot_notes = (unsigned long)&elf_boot_notes;
adjusted_boot_notes += adjust;
- printk_spew("entry = 0x%08lx\n", (unsigned long)entry);
- printk_spew("lb_start = 0x%08lx\n", lb_start);
- printk_spew("lb_size = 0x%08lx\n", lb_size);
- printk_spew("adjust = 0x%08lx\n", adjust);
- printk_spew("buffer = 0x%08lx\n", buffer);
- printk_spew(" elf_boot_notes = 0x%08lx\n", (unsigned long)&elf_boot_notes);
- printk_spew("adjusted_boot_notes = 0x%08lx\n", adjusted_boot_notes);
+ printk(BIOS_SPEW, "entry = 0x%08lx\n", (unsigned long)entry);
+ printk(BIOS_SPEW, "lb_start = 0x%08lx\n", lb_start);
+ printk(BIOS_SPEW, "lb_size = 0x%08lx\n", lb_size);
+ printk(BIOS_SPEW, "adjust = 0x%08lx\n", adjust);
+ printk(BIOS_SPEW, "buffer = 0x%08lx\n", buffer);
+ printk(BIOS_SPEW, " elf_boot_notes = 0x%08lx\n", (unsigned long)&elf_boot_notes);
+ printk(BIOS_SPEW, "adjusted_boot_notes = 0x%08lx\n", adjusted_boot_notes);
/* Jump to kernel */
__asm__ __volatile__(
diff --git a/src/arch/i386/boot/coreboot_table.c b/src/arch/i386/boot/coreboot_table.c
index 6a45e4bac5..8baaab4f60 100644
--- a/src/arch/i386/boot/coreboot_table.c
+++ b/src/arch/i386/boot/coreboot_table.c
@@ -307,7 +307,7 @@ static unsigned long lb_table_fini(struct lb_header *head, int fixup)
head->table_checksum = compute_ip_checksum(first_rec, head->table_bytes);
head->header_checksum = 0;
head->header_checksum = compute_ip_checksum(head, sizeof(*head));
- printk_debug("Wrote coreboot table at: %p - %p checksum %x\n",
+ printk(BIOS_DEBUG, "Wrote coreboot table at: %p - %p checksum %x\n",
head, rec, head->table_checksum);
return (unsigned long)rec;
}
@@ -428,7 +428,7 @@ static void lb_dump_memory_ranges(struct lb_memory *mem)
int i;
entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]);
- printk_debug("coreboot memory table:\n");
+ printk(BIOS_DEBUG, "coreboot memory table:\n");
for(i = 0; i < entries; i++) {
uint64_t entry_start = unpack_lb64(mem->map[i].start);
uint64_t entry_size = unpack_lb64(mem->map[i].size);
@@ -445,7 +445,7 @@ static void lb_dump_memory_ranges(struct lb_memory *mem)
default: entry_type="UNKNOWN!"; break;
}
- printk_debug("%2d. %016llx-%016llx: %s\n",
+ printk(BIOS_DEBUG, "%2d. %016llx-%016llx: %s\n",
i, entry_start, entry_start+entry_size-1, entry_type);
}
@@ -497,19 +497,19 @@ unsigned long write_coreboot_table(
struct lb_memory *mem;
#if CONFIG_WRITE_HIGH_TABLES == 1
- printk_debug("Writing high table forward entry at 0x%08lx\n",
+ printk(BIOS_DEBUG, "Writing high table forward entry at 0x%08lx\n",
low_table_end);
head = lb_table_init(low_table_end);
lb_forward(head, (struct lb_header*)rom_table_end);
low_table_end = (unsigned long) lb_table_fini(head, 0);
- printk_debug("New low_table_end: 0x%08lx\n", low_table_end);
- printk_debug("Now going to write high coreboot table at 0x%08lx\n",
+ printk(BIOS_DEBUG, "New low_table_end: 0x%08lx\n", low_table_end);
+ printk(BIOS_DEBUG, "Now going to write high coreboot table at 0x%08lx\n",
rom_table_end);
head = lb_table_init(rom_table_end);
rom_table_end = (unsigned long)head;
- printk_debug("rom_table_end = 0x%08lx\n", rom_table_end);
+ printk(BIOS_DEBUG, "rom_table_end = 0x%08lx\n", rom_table_end);
#else
if(low_table_end > (0x1000 - sizeof(struct lb_header))) { /* after 4K */
/* We need to put lbtable on to [0xf0000,0x100000) */
@@ -521,16 +521,16 @@ unsigned long write_coreboot_table(
}
#endif
- printk_debug("Adjust low_table_end from 0x%08lx to ", low_table_end);
+ printk(BIOS_DEBUG, "Adjust low_table_end from 0x%08lx to ", low_table_end);
low_table_end += 0xfff; // 4K aligned
low_table_end &= ~0xfff;
- printk_debug("0x%08lx \n", low_table_end);
+ printk(BIOS_DEBUG, "0x%08lx \n", low_table_end);
/* The Linux kernel assumes this region is reserved */
- printk_debug("Adjust rom_table_end from 0x%08lx to ", rom_table_end);
+ printk(BIOS_DEBUG, "Adjust rom_table_end from 0x%08lx to ", rom_table_end);
rom_table_end += 0xffff; // 64K align
rom_table_end &= ~0xffff;
- printk_debug("0x%08lx \n", rom_table_end);
+ printk(BIOS_DEBUG, "0x%08lx \n", rom_table_end);
#if (CONFIG_HAVE_OPTION_TABLE == 1)
{
@@ -553,7 +553,7 @@ unsigned long write_coreboot_table(
rom_table_start, rom_table_end-rom_table_start);
#if CONFIG_WRITE_HIGH_TABLES == 1
- printk_debug("Adding high table area\n");
+ printk(BIOS_DEBUG, "Adding high table area\n");
// should this be LB_MEM_ACPI?
lb_add_memory_range(mem, LB_MEM_TABLE,
high_tables_base, high_tables_size);
diff --git a/src/arch/i386/boot/gdt.c b/src/arch/i386/boot/gdt.c
index 069d7b3577..b425ade59d 100644
--- a/src/arch/i386/boot/gdt.c
+++ b/src/arch/i386/boot/gdt.c
@@ -47,7 +47,7 @@ void move_gdt(void)
printk(BIOS_ERR, "Error: Could not relocate GDT.\n");
return;
}
- printk_debug("Moving GDT to %p...", newgdt);
+ printk(BIOS_DEBUG, "Moving GDT to %p...", newgdt);
memcpy((void*)newgdt, &gdt, num_gdt_bytes);
}
@@ -55,6 +55,6 @@ void move_gdt(void)
gdtarg.limit = num_gdt_bytes - 1;
__asm__ __volatile__ ("lgdt %0\n\t" : : "m" (gdtarg));
- printk_debug("ok\n");
+ printk(BIOS_DEBUG, "ok\n");
}
diff --git a/src/arch/i386/boot/multiboot.c b/src/arch/i386/boot/multiboot.c
index ba34a2b03c..a47c0b4af4 100644
--- a/src/arch/i386/boot/multiboot.c
+++ b/src/arch/i386/boot/multiboot.c
@@ -112,7 +112,7 @@ unsigned long write_multiboot_info(
mbi->mmap_length = ((u32) mb_mem) - mbi->mmap_addr;
mbi->flags |= MB_INFO_MEM_MAP;
- printk_info("Multiboot Information structure has been written.\n");
+ printk(BIOS_INFO, "Multiboot Information structure has been written.\n");
return (unsigned long)mb_mem;
}
diff --git a/src/arch/i386/boot/pirq_routing.c b/src/arch/i386/boot/pirq_routing.c
index 37097184b6..0c6269da55 100644
--- a/src/arch/i386/boot/pirq_routing.c
+++ b/src/arch/i386/boot/pirq_routing.c
@@ -14,10 +14,10 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
uint8_t sum=0;
int i;
- printk_info("Checking Interrupt Routing Table consistency...\n");
+ printk(BIOS_INFO, "Checking Interrupt Routing Table consistency...\n");
if (sizeof(struct irq_routing_table) != rt->size) {
- printk_warning("Inconsistent Interrupt Routing Table size (0x%x/0x%x).\n",
+ printk(BIOS_WARNING, "Inconsistent Interrupt Routing Table size (0x%x/0x%x).\n",
sizeof(struct irq_routing_table),
rt->size
);
@@ -27,21 +27,21 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
for (i = 0; i < rt->size; i++)
sum += addr[i];
- printk_debug("%s(): Interrupt Routing Table located at %p.\n",
+ printk(BIOS_DEBUG, "%s(): Interrupt Routing Table located at %p.\n",
__func__, addr);
sum = rt->checksum - sum;
if (sum != rt->checksum) {
- printk_warning("Interrupt Routing Table checksum is: 0x%02x but should be: 0x%02x.\n",
+ printk(BIOS_WARNING, "Interrupt Routing Table checksum is: 0x%02x but should be: 0x%02x.\n",
rt->checksum, sum);
rt->checksum = sum;
}
if (rt->signature != PIRQ_SIGNATURE || rt->version != PIRQ_VERSION ||
rt->size % 16 ) {
- printk_warning("Interrupt Routing Table not valid.\n");
+ printk(BIOS_WARNING, "Interrupt Routing Table not valid.\n");
return;
}
@@ -54,11 +54,11 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
* function would have bailed out earlier.
*/
if (sum) {
- printk_warning("Checksum error in Interrupt Routing Table "
+ printk(BIOS_WARNING, "Checksum error in Interrupt Routing Table "
"could not be fixed.\n");
}
- printk_info("done.\n");
+ printk(BIOS_INFO, "done.\n");
}
static int verify_copy_pirq_routing_table(unsigned long addr)
@@ -68,14 +68,14 @@ static int verify_copy_pirq_routing_table(unsigned long addr)
rt_curr = (uint8_t*)addr;
rt_orig = (uint8_t*)&intel_irq_routing_table;
- printk_info("Verifing copy of Interrupt Routing Table at 0x%08x... ", addr);
+ printk(BIOS_INFO, "Verifing copy of Interrupt Routing Table at 0x%08x... ", addr);
for (i = 0; i < intel_irq_routing_table.size; i++) {
if (*(rt_curr + i) != *(rt_orig + i)) {
- printk_info("failed\n");
+ printk(BIOS_INFO, "failed\n");
return -1;
}
}
- printk_info("done\n");
+ printk(BIOS_INFO, "done\n");
check_pirq_routing_table((struct irq_routing_table *)addr);
@@ -90,9 +90,9 @@ unsigned long copy_pirq_routing_table(unsigned long addr)
addr &= ~15;
/* This table must be betweeen 0xf0000 & 0x100000 */
- printk_info("Copying Interrupt Routing Table to 0x%08lx... ", addr);
+ printk(BIOS_INFO, "Copying Interrupt Routing Table to 0x%08lx... ", addr);
memcpy((void *)addr, &intel_irq_routing_table, intel_irq_routing_table.size);
- printk_info("done.\n");
+ printk(BIOS_INFO, "done.\n");
#if CONFIG_DEBUG
verify_copy_pirq_routing_table(addr);
#endif
@@ -114,7 +114,7 @@ void pirq_routing_irqs(unsigned long addr)
/* Set PCI IRQs. */
for (i = 0; i < num_entries; i++) {
- printk_debug("PIRQ Entry %d Dev/Fn: %X Slot: %d\n", i,
+ printk(BIOS_DEBUG, "PIRQ Entry %d Dev/Fn: %X Slot: %d\n", i,
pirq_tbl->slots[i].devfn >> 3, pirq_tbl->slots[i].slot);
for (j = 0; j < 4; j++) {
@@ -123,12 +123,12 @@ void pirq_routing_irqs(unsigned long addr)
int bitmap = pirq_tbl->slots[i].irq[j].bitmap;
int irq = 0;
- printk_debug("INT: %c link: %x bitmap: %x ",
+ printk(BIOS_DEBUG, "INT: %c link: %x bitmap: %x ",
'A' + j, link, bitmap);
if (!bitmap|| !link || link > 4) {
- printk_debug("not routed\n");
+ printk(BIOS_DEBUG, "not routed\n");
irq_slot[j] = irq;
continue;
}
@@ -154,7 +154,7 @@ void pirq_routing_irqs(unsigned long addr)
else
irq = pirq[link - 1];
- printk_debug("IRQ: %d\n", irq);
+ printk(BIOS_DEBUG, "IRQ: %d\n", irq);
irq_slot[j] = irq;
}
@@ -163,10 +163,10 @@ void pirq_routing_irqs(unsigned long addr)
pirq_tbl->slots[i].devfn >> 3, irq_slot);
}
- printk_debug("PIRQ1: %d\n", pirq[0]);
- printk_debug("PIRQ2: %d\n", pirq[1]);
- printk_debug("PIRQ3: %d\n", pirq[2]);
- printk_debug("PIRQ4: %d\n", pirq[3]);
+ printk(BIOS_DEBUG, "PIRQ1: %d\n", pirq[0]);
+ printk(BIOS_DEBUG, "PIRQ2: %d\n", pirq[1]);
+ printk(BIOS_DEBUG, "PIRQ3: %d\n", pirq[2]);
+ printk(BIOS_DEBUG, "PIRQ4: %d\n", pirq[3]);
pirq_assign_irqs(pirq);
}
diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c
index 805fe21121..76a7bb21b1 100644
--- a/src/arch/i386/boot/tables.c
+++ b/src/arch/i386/boot/tables.c
@@ -53,12 +53,12 @@ struct lb_memory *write_tables(void)
unsigned long high_table_pointer;
if (!high_tables_base) {
- printk_err("ERROR: High Tables Base is not set.\n");
+ printk(BIOS_ERR, "ERROR: High Tables Base is not set.\n");
// Are there any boards without?
// Stepan thinks we should die() here!
}
- printk_debug("High Tables Base is %llx.\n", high_tables_base);
+ printk(BIOS_DEBUG, "High Tables Base is %llx.\n", high_tables_base);
rom_table_start = 0xf0000;
rom_table_end = 0xf0000;
@@ -169,7 +169,7 @@ struct lb_memory *write_tables(void)
(acpi_rsdt_t *)(high_rsdp->rsdt_address),
(acpi_xsdt_t *)((unsigned long)high_rsdp->xsdt_address));
} else {
- printk_err("ERROR: Didn't find RSDP in high table.\n");
+ printk(BIOS_ERR, "ERROR: Didn't find RSDP in high table.\n");
}
rom_table_end = ALIGN(rom_table_end + sizeof(acpi_rsdp_t), 16);
} else {
@@ -202,7 +202,7 @@ struct lb_memory *write_tables(void)
if (new_high_table_pointer > (high_table_pointer +
MAX_COREBOOT_TABLE_SIZE))
- printk_err("%s: coreboot table didn't fit (%lx)\n",
+ printk(BIOS_ERR, "%s: coreboot table didn't fit (%lx)\n",
__func__, new_high_table_pointer -
high_table_pointer);
diff --git a/src/arch/i386/lib/console_printk.c b/src/arch/i386/lib/console_printk.c
index e9005796e9..191a4b7fe0 100644
--- a/src/arch/i386/lib/console_printk.c
+++ b/src/arch/i386/lib/console_printk.c
@@ -1,21 +1,21 @@
-#define printk_emerg(fmt, arg...) do_printk(BIOS_EMERG ,fmt, ##arg)
-#define printk_alert(fmt, arg...) do_printk(BIOS_ALERT ,fmt, ##arg)
+#define printk(BIOS_EMERG, fmt, arg...) do_printk(BIOS_EMERG ,fmt, ##arg)
+#define printk(BIOS_ALERT, fmt, arg...) do_printk(BIOS_ALERT ,fmt, ##arg)
#define printk_crit(fmt, arg...) do_printk(BIOS_CRIT ,fmt, ##arg)
-#define printk_err(fmt, arg...) do_printk(BIOS_ERR ,fmt, ##arg)
-#define printk_warning(fmt, arg...) do_printk(BIOS_WARNING ,fmt, ##arg)
+#define printk(BIOS_ERR, fmt, arg...) do_printk(BIOS_ERR ,fmt, ##arg)
+#define printk(BIOS_WARNING, fmt, arg...) do_printk(BIOS_WARNING ,fmt, ##arg)
#define printk_notice(fmt, arg...) do_printk(BIOS_NOTICE ,fmt, ##arg)
-#define printk_info(fmt, arg...) do_printk(BIOS_INFO ,fmt, ##arg)
-#define printk_debug(fmt, arg...) do_printk(BIOS_DEBUG ,fmt, ##arg)
-#define printk_spew(fmt, arg...) do_printk(BIOS_SPEW ,fmt, ##arg)
+#define printk(BIOS_INFO, fmt, arg...) do_printk(BIOS_INFO ,fmt, ##arg)
+#define printk(BIOS_DEBUG, fmt, arg...) do_printk(BIOS_DEBUG ,fmt, ##arg)
+#define printk(BIOS_SPEW, fmt, arg...) do_printk(BIOS_SPEW ,fmt, ##arg)
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_EMERG
#undef printk_emerg
-#define printk_emerg(fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
+#define printk(BIOS_EMERG, fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_ALERT
#undef printk_alert
-#define printk_alert(fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
+#define printk(BIOS_ALERT, fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_CRIT
#undef printk_crit
@@ -23,11 +23,11 @@
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_ERR
#undef printk_err
-#define printk_err(fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
+#define printk(BIOS_ERR, fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_WARNING
#undef printk_warning
-#define printk_warning(fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
+#define printk(BIOS_WARNING, fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_NOTICE
#undef printk_notice
@@ -35,22 +35,22 @@
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_INFO
#undef printk_info
-#define printk_info(fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
+#define printk(BIOS_INFO, fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_DEBUG
#undef printk_debug
-#define printk_debug(fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
+#define printk(BIOS_DEBUG, fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
#endif
#if CONFIG_MAXIMUM_CONSOLE_LOGLEVEL < BIOS_SPEW
#undef printk_spew
-#define printk_spew(fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
+#define printk(BIOS_SPEW, fmt, arg...) do_printk(BIOS_EMERG , "", ##arg)
#endif
#define print_emerg(STR) printk_emerg ("%s", (STR))
#define print_alert(STR) printk_alert ("%s", (STR))
#define print_crit(STR) printk_crit ("%s", (STR))
#define print_err(STR) printk_err ("%s", (STR))
-#define print_warning(STR) printk_warning("%s", (STR))
+#define print_warning(STR) printk(BIOS_WARNING, "%s", (STR))
#define print_notice(STR) printk_notice ("%s", (STR))
#define print_info(STR) printk_info ("%s", (STR))
#define print_debug(STR) printk_debug ("%s", (STR))
@@ -60,7 +60,7 @@
#define print_alert_char(CH) printk_alert ("%c", (CH))
#define print_crit_char(CH) printk_crit ("%c", (CH))
#define print_err_char(CH) printk_err ("%c", (CH))
-#define print_warning_char(CH) printk_warning("%c", (CH))
+#define print_warning_char(CH) printk(BIOS_WARNING, "%c", (CH))
#define print_notice_char(CH) printk_notice ("%c", (CH))
#define print_info_char(CH) printk_info ("%c", (CH))
#define print_debug_char(CH) printk_debug ("%c", (CH))
@@ -70,7 +70,7 @@
#define print_alert_hex8(HEX) printk_alert ("%02x", (HEX))
#define print_crit_hex8(HEX) printk_crit ("%02x", (HEX))
#define print_err_hex8(HEX) printk_err ("%02x", (HEX))
-#define print_warning_hex8(HEX) printk_warning("%02x", (HEX))
+#define print_warning_hex8(HEX) printk(BIOS_WARNING, "%02x", (HEX))
#define print_notice_hex8(HEX) printk_notice ("%02x", (HEX))
#define print_info_hex8(HEX) printk_info ("%02x", (HEX))
#define print_debug_hex8(HEX) printk_debug ("%02x", (HEX))
@@ -80,7 +80,7 @@
#define print_alert_hex16(HEX) printk_alert ("%04x", (HEX))
#define print_crit_hex16(HEX) printk_crit ("%04x", (HEX))
#define print_err_hex16(HEX) printk_err ("%04x", (HEX))
-#define print_warning_hex16(HEX) printk_warning("%04x", (HEX))
+#define print_warning_hex16(HEX) printk(BIOS_WARNING, "%04x", (HEX))
#define print_notice_hex16(HEX) printk_notice ("%04x", (HEX))
#define print_info_hex16(HEX) printk_info ("%04x", (HEX))
#define print_debug_hex16(HEX) printk_debug ("%04x", (HEX))
@@ -90,7 +90,7 @@
#define print_alert_hex32(HEX) printk_alert ("%08x", (HEX))
#define print_crit_hex32(HEX) printk_crit ("%08x", (HEX))
#define print_err_hex32(HEX) printk_err ("%08x", (HEX))
-#define print_warning_hex32(HEX) printk_warning("%08x", (HEX))
+#define print_warning_hex32(HEX) printk(BIOS_WARNING, "%08x", (HEX))
#define print_notice_hex32(HEX) printk_notice ("%08x", (HEX))
#define print_info_hex32(HEX) printk_info ("%08x", (HEX))
#define print_debug_hex32(HEX) printk_debug ("%08x", (HEX))
diff --git a/src/arch/i386/lib/cpu.c b/src/arch/i386/lib/cpu.c
index 0bcd5a674c..9f72789c7c 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_info("Initializing CPU #%ld\n", info->index);
+ printk(BIOS_INFO, "Initializing CPU #%ld\n", info->index);
cpu = info->cpu;
if (!cpu) {
@@ -233,12 +233,12 @@ void cpu_initialize(void)
/* Find what type of cpu we are dealing with */
identify_cpu(cpu);
- printk_debug("CPU: vendor %s device %x\n",
+ printk(BIOS_DEBUG, "CPU: vendor %s device %x\n",
cpu_vendor_name(cpu->vendor), cpu->device);
get_fms(&c, cpu->device);
- printk_debug("CPU: family %02x, model %02x, stepping %02x\n", c.x86, c.x86_model, c.x86_mask);
+ printk(BIOS_DEBUG, "CPU: family %02x, model %02x, stepping %02x\n", c.x86, c.x86_model, c.x86_mask);
/* Lookup the cpu's operations */
set_cpu_ops(cpu);
@@ -249,7 +249,7 @@ void cpu_initialize(void)
set_cpu_ops(cpu);
cpu->device += c.x86_mask;
if(!cpu->ops) die("Unknown cpu");
- printk_debug("Using generic cpu ops (good)\n");
+ printk(BIOS_DEBUG, "Using generic cpu ops (good)\n");
}
@@ -260,7 +260,7 @@ void cpu_initialize(void)
cpu->ops->init(cpu);
}
- printk_info("CPU #%ld initialized\n", info->index);
+ printk(BIOS_INFO, "CPU #%ld initialized\n", info->index);
return;
}
diff --git a/src/arch/i386/lib/exception.c b/src/arch/i386/lib/exception.c
index f720ba8567..eb1df20e26 100644
--- a/src/arch/i386/lib/exception.c
+++ b/src/arch/i386/lib/exception.c
@@ -475,7 +475,7 @@ void x86_exception(struct eregs *info)
put_packet(out_buffer);
}
#else /* !CONFIG_GDB_STUB */
- printk_emerg(
+ printk(BIOS_EMERG,
"Unexpected Exception: %d @ %02x:%08x - Halting\n"
"Code: %d eflags: %08x\n"
"eax: %08x ebx: %08x ecx: %08x edx: %08x\n"
diff --git a/src/arch/i386/lib/pci_ops_auto.c b/src/arch/i386/lib/pci_ops_auto.c
index 1dd2494ba9..1f144381ee 100644
--- a/src/arch/i386/lib/pci_ops_auto.c
+++ b/src/arch/i386/lib/pci_ops_auto.c
@@ -37,7 +37,7 @@ static int pci_sanity_check(const struct pci_bus_operations *o)
return 1;
}
}
- printk_err("PCI: Sanity check failed\n");
+ printk(BIOS_ERR, "PCI: Sanity check failed\n");
return 0;
}
@@ -58,7 +58,7 @@ static const struct pci_bus_operations *pci_check_direct(void)
pci_sanity_check(&pci_cf8_conf1))
{
outl(tmp, 0xCF8);
- printk_debug("PCI: Using configuration type 1\n");
+ printk(BIOS_DEBUG, "PCI: Using configuration type 1\n");
return &pci_cf8_conf1;
}
outl(tmp, 0xCF8);
@@ -74,7 +74,7 @@ static const struct pci_bus_operations *pci_check_direct(void)
if ((inb(0xCF8) == 0x00 && inb(0xCFA) == 0x00) &&
pci_sanity_check(&pci_cf8_conf2))
{
- printk_debug("PCI: Using configuration type 2\n");
+ printk(BIOS_DEBUG, "PCI: Using configuration type 2\n");
return &pci_cf8_conf2;
}
}
@@ -94,7 +94,7 @@ const struct pci_bus_operations *pci_remember_direct(void)
*/
void pci_set_method(device_t dev)
{
- printk_info("Finding PCI configuration type.\n");
+ printk(BIOS_INFO, "Finding PCI configuration type.\n");
dev->ops->ops_pci_bus = pci_remember_direct();
post_code(0x5f);
}
diff --git a/src/arch/i386/smp/ioapic.c b/src/arch/i386/smp/ioapic.c
index 630463e63d..efc2ac52fc 100644
--- a/src/arch/i386/smp/ioapic.c
+++ b/src/arch/i386/smp/ioapic.c
@@ -40,13 +40,13 @@ void clear_ioapic(u32 ioapic_base)
u32 low, high;
u32 i, ioapic_interrupts;
- printk_debug("IOAPIC: Clearing IOAPIC at 0x%08x\n", ioapic_base);
+ printk(BIOS_DEBUG, "IOAPIC: Clearing IOAPIC at 0x%08x\n", ioapic_base);
/* Read the available number of interrupts */
ioapic_interrupts = (io_apic_read(ioapic_base, 1) >> 16) & 0xff;
if (!ioapic_interrupts || ioapic_interrupts == 0xff)
ioapic_interrupts = 24;
- printk_debug("IOAPIC: %d interrupts\n", ioapic_interrupts);
+ printk(BIOS_DEBUG, "IOAPIC: %d interrupts\n", ioapic_interrupts);
low = DISABLED;
high = NONE;
@@ -55,11 +55,11 @@ void clear_ioapic(u32 ioapic_base)
io_apic_write(ioapic_base, i * 2 + 0x10, low);
io_apic_write(ioapic_base, i * 2 + 0x11, high);
- printk_spew("IOAPIC: reg 0x%08x value 0x%08x 0x%08x\n", i, high, low);
+ printk(BIOS_SPEW, "IOAPIC: reg 0x%08x value 0x%08x 0x%08x\n", i, high, low);
}
if (io_apic_read(ioapic_base, 0x10) == 0xffffffff) {
- printk_warning("IO APIC not responding.\n");
+ printk(BIOS_WARNING, "IO APIC not responding.\n");
return;
}
}
@@ -70,12 +70,12 @@ void setup_ioapic(u32 ioapic_base, u8 ioapic_id)
u32 low, high;
u32 i, ioapic_interrupts;
- printk_debug("IOAPIC: Initializing IOAPIC at 0x%08x\n", ioapic_base);
- printk_debug("IOAPIC: Bootstrap Processor Local APIC = %02x\n",
+ printk(BIOS_DEBUG, "IOAPIC: Initializing IOAPIC at 0x%08x\n", ioapic_base);
+ printk(BIOS_DEBUG, "IOAPIC: Bootstrap Processor Local APIC = %02x\n",
bsp_lapicid);
if (ioapic_id) {
- printk_debug("IOAPIC: ID = 0x%02x\n", ioapic_id);
+ printk(BIOS_DEBUG, "IOAPIC: ID = 0x%02x\n", ioapic_id);
/* Set IOAPIC ID if it has been specified */
io_apic_write(ioapic_base, 0x00,
(io_apic_read(ioapic_base, 0x00) & 0xfff0ffff) |
@@ -86,7 +86,7 @@ void setup_ioapic(u32 ioapic_base, u8 ioapic_id)
ioapic_interrupts = (io_apic_read(ioapic_base, 1) >> 16) & 0xff;
if (!ioapic_interrupts || ioapic_interrupts == 0xff)
ioapic_interrupts = 24;
- printk_debug("IOAPIC: %d interrupts\n", ioapic_interrupts);
+ printk(BIOS_DEBUG, "IOAPIC: %d interrupts\n", ioapic_interrupts);
// XXX this decision should probably be made elsewhere, and
@@ -101,11 +101,11 @@ void setup_ioapic(u32 ioapic_base, u8 ioapic_id)
/* For the Pentium 4 and above APICs deliver their interrupts
* on the front side bus, enable that.
*/
- printk_debug("IOAPIC: Enabling interrupts on FSB\n");
+ printk(BIOS_DEBUG, "IOAPIC: Enabling interrupts on FSB\n");
io_apic_write(ioapic_base, 0x03, io_apic_read(ioapic_base, 0x03) | (1 << 0));
#endif
#ifdef IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS
- printk_debug("IOAPIC: Enabling interrupts on APIC serial bus\n");
+ printk(BIOS_DEBUG, "IOAPIC: Enabling interrupts on APIC serial bus\n");
io_apic_write(ioapic_base, 0x03, 0);
#endif
@@ -117,11 +117,11 @@ void setup_ioapic(u32 ioapic_base, u8 ioapic_id)
io_apic_write(ioapic_base, 0x11, high);
if (io_apic_read(ioapic_base, 0x10) == 0xffffffff) {
- printk_warning("IO APIC not responding.\n");
+ printk(BIOS_WARNING, "IO APIC not responding.\n");
return;
}
- printk_spew("IOAPIC: reg 0x%08x value 0x%08x 0x%08x\n", 0, high, low);
+ printk(BIOS_SPEW, "IOAPIC: reg 0x%08x value 0x%08x 0x%08x\n", 0, high, low);
low = DISABLED;
high = NONE;
@@ -130,6 +130,6 @@ void setup_ioapic(u32 ioapic_base, u8 ioapic_id)
io_apic_write(ioapic_base, i * 2 + 0x10, low);
io_apic_write(ioapic_base, i * 2 + 0x11, high);
- printk_spew("IOAPIC: reg 0x%08x value 0x%08x 0x%08x\n", i, high, low);
+ printk(BIOS_SPEW, "IOAPIC: reg 0x%08x value 0x%08x 0x%08x\n", i, high, low);
}
}
diff --git a/src/arch/i386/smp/mpspec.c b/src/arch/i386/smp/mpspec.c
index 302f97ae90..1beba873cc 100644
--- a/src/arch/i386/smp/mpspec.c
+++ b/src/arch/i386/smp/mpspec.c
@@ -177,7 +177,7 @@ void smp_write_intsrc(struct mp_config_table *mc,
mpc->mpc_dstirq = dstirq;
smp_add_mpc_entry(mc, sizeof(*mpc));
#ifdef DEBUG_MPTABLE
- printk_debug("add intsrc srcbus 0x%x srcbusirq 0x%x, dstapic 0x%x, dstirq 0x%x\n",
+ printk(BIOS_DEBUG, "add intsrc srcbus 0x%x srcbusirq 0x%x, dstapic 0x%x, dstirq 0x%x\n",
srcbus, srcbusirq, dstapic, dstirq);
hexdump(__func__, mpc, sizeof(*mpc));
#endif
@@ -215,7 +215,7 @@ void smp_write_intsrc_pci_bridge(struct mp_config_table *mc,
if ((child->class >> 16) != PCI_BASE_CLASS_BRIDGE) {
/* pci device */
- printk_debug("route irq: %s\n", dev_path(child));
+ printk(BIOS_DEBUG, "route irq: %s\n", dev_path(child));
for (i = 0; i < 4; i++)
smp_write_intsrc(mc, irqtype, irqflag, srcbus, (slot<<2)|i, dstapic, dstirq_x[i]);
goto next;
@@ -225,7 +225,7 @@ void smp_write_intsrc_pci_bridge(struct mp_config_table *mc,
case PCI_CLASS_BRIDGE_PCI:
case PCI_CLASS_BRIDGE_PCMCIA:
case PCI_CLASS_BRIDGE_CARDBUS:
- printk_debug("route irq bridge: %s\n", dev_path(child));
+ printk(BIOS_DEBUG, "route irq bridge: %s\n", dev_path(child));
smp_write_intsrc_pci_bridge(mc, irqtype, irqflag, child, dstapic, dstirq_x);
}