summaryrefslogtreecommitdiff
path: root/src/arch/i386/boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/i386/boot')
-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
7 files changed, 58 insertions, 58 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);