A bunch of small cosmetic improvement of the printk() calls (trivial).

Add "(LB) " to all log messages to differentiate them visually
from the rest of the boot messages. This is similar to what
Xen does when booting (it prefixes all log messages with "(XEN) ").

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@209 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Uwe Hermann 2007-03-07 21:07:13 +00:00
parent a8c461ba91
commit aa01c41f42
14 changed files with 34 additions and 32 deletions

View file

@ -55,7 +55,7 @@ void move_gdt(unsigned long newgdt)
gdtarg.base = newgdt;
gdtarg.limit = num_gdt_bytes - 1;
__asm__ __volatile__ ("lgdt %0\n\t" : : "m" (gdtarg));
printk(BIOS_DEBUG,"ok\n");
printk(BIOS_DEBUG,"OK\n");
}
#endif
struct lb_memory *arch_write_tables(void)
@ -105,7 +105,7 @@ struct lb_memory *arch_write_tables(void)
/* We can not put mptable here, we need to copy them to somewhere else*/
if((rom_table_end+mptable_size)<0x100000) {
/* We can copy mptable on rom_table, and leave low space for lbtable */
printk(BIOS_DEBUG,"move mptable to 0x%0x\n", rom_table_end);
printk(BIOS_DEBUG,"Move mptable to 0x%0x\n", rom_table_end);
memcpy((unsigned char *)rom_table_end, (unsigned char *)(low_table_end+SMP_FLOATING_TABLE_LEN), mptable_size);
memset((unsigned char *)low_table_end, '\0', mptable_size + SMP_FLOATING_TABLE_LEN);
smp_write_floating_table_physaddr(low_table_end, rom_table_end);
@ -114,7 +114,7 @@ struct lb_memory *arch_write_tables(void)
rom_table_end = (rom_table_end+1023) & ~1023;
} else {
/* We can need to put mptable low and from 0x500 */
printk(BIOS_DEBUG,"move mptable to 0x%0x\n", 0x500);
printk(BIOS_DEBUG,"Move mptable to 0x%0x\n", 0x500);
memcpy((unsigned char *)0x500, (unsigned char *)(low_table_end+SMP_FLOATING_TABLE_LEN), mptable_size);
memset((unsigned char *)low_table_end, '\0', 0x500-low_table_end);
smp_write_floating_table_physaddr(low_table_end, 0x500);

View file

@ -123,9 +123,9 @@ printk(BIOS_INFO, "Start search at 0x%x, size %d\n", archive.start, archive.len)
ret = run_file(&archive, "normal/initram", (void *)(512*1024)); //CONFIG_CARBASE;
if (ret)
die("Failed ram init code\n");
die("Failed RAM init code\n");
printk(BIOS_INFO, "Done ram init code\n");
printk(BIOS_INFO, "Done RAM init code\n");
/* this is nasty. And, it has to be done this way. Sorry! */
/* we have to turn off CAR, and do some other things, and it has to be done
* inline -- you can't call a function
@ -225,7 +225,7 @@ printk(BIOS_INFO, "Start search at 0x%x, size %d\n", archive.start, archive.len)
ret = find_file(&archive, "normal/payload", &result);
if (ret) {
printk(BIOS_INFO, "no such name %s\n", "payload");
printk(BIOS_INFO, "No such name %s\n", "payload");
die("cachemain finding payload");
}

View file

@ -29,6 +29,8 @@ int printk(int msg_level, const char *fmt, ...)
return 0;
}
i = vtxprintf(console_tx_byte, (void *)0, "(LB) ", args);
va_start(args, fmt);
i = vtxprintf(console_tx_byte, (void *)0, fmt, args);
va_end(args);

View file

@ -232,7 +232,7 @@ unsigned long lb_table_fini(struct lb_header *head)
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(BIOS_DEBUG,"Wrote linuxbios table at: %p - %p checksum %lx\n",
printk(BIOS_DEBUG,"Wrote LinuxBIOS table at: %p - %p checksum %lx\n",
head, rec, head->table_checksum);
return (unsigned long)rec;
}

View file

@ -851,7 +851,7 @@ void show_all_devs(void) {
struct device *dev;
printk(BIOS_INFO, "show all devs..\n");
printk(BIOS_INFO, "Show all devs.\n");
for(dev = all_devices; dev; dev = dev->next) {
printk(BIOS_SPEW, "%s(%s): enabled %d have_resources %d initialized %d\n",
dev->dtsname, dev_path(dev), dev->enabled, dev->have_resources, dev->initialized);

View file

@ -262,7 +262,7 @@ static unsigned ht_lookup_slave_capability(struct device *dev)
if (pos) {
unsigned flags;
flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
printk_spew("flags: 0x%04x\n", flags);
printk_spew("Flags: 0x%04x\n", flags);
if ((flags >> 13) == 0) {
/* Entry is a Slave secondary, success... */
break;
@ -551,7 +551,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
for(left = old_devices; left; left = left->sibling) {
printk_debug("%s\n", dev_path(left));
}
printk_err("HT: Left over static devices. Check your Config.lb\n");
printk_err("HT: Left over static devices. Check your Config.lb\n");
if(last_func && !last_func->sibling) // put back the left over static device, and let pci_scan_bus disable it
last_func->sibling = old_devices;
}

View file

@ -129,7 +129,7 @@ unsigned pci_find_next_capability(struct device * dev, unsigned cap, unsigned la
int this_cap;
pos &= ~3;
this_cap = pci_read_config8(dev, pos + PCI_CAP_LIST_ID);
printk(BIOS_SPEW,"Capability: 0x%02x @ 0x%02x\n", cap, pos);
printk(BIOS_SPEW, "Capability: 0x%02x @ 0x%02x\n", cap, pos);
if (this_cap == 0xff) {
break;
}

View file

@ -31,7 +31,7 @@ static struct bus *get_pbus(struct device * dev)
pbus = pbus->dev->bus;
}
if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_pci_bus) {
printk(BIOS_ALERT,"%s: %s(%s) Cannot find pci bus operations", __func__, dev->dtsname, dev_path(dev));
printk(BIOS_ALERT,"%s: %s(%s) Cannot find PCI bus operations", __func__, dev->dtsname, dev_path(dev));
die("");
for(;;);
}

View file

@ -37,7 +37,7 @@ struct rom_header * pci_rom_probe(struct device *dev)
return NULL;
}
printk_debug("rom address for %s = %x\n", dev_path(dev), rom_address);
printk_debug("ROM address for %s = %x\n", dev_path(dev), rom_address);
if(!dev->on_mainboard) {
/* enable expansion ROM address decoding */
@ -64,7 +64,7 @@ struct rom_header * pci_rom_probe(struct device *dev)
return NULL;
}
printk_spew("PCI ROM Image, Class Code %04x%02x, Code Type %02x\n",
printk_spew("PCI ROM Image, Class Code %04x%02x, Code Type %02x\n",
rom_data->class_hi, rom_data->class_lo,
rom_data->type);
if (dev->class != ((rom_data->class_hi << 8) | rom_data->class_lo)) {
@ -109,14 +109,14 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade
#if CONFIG_CONSOLE_VGA_MULTI == 0
if (dev != vga_pri) return NULL; // only one VGA supported
#endif
printk_debug("copying VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
printk_debug("Copying VGA ROM image from 0x%x to 0x%x, 0x%x bytes\n",
rom_header, PCI_VGA_RAM_IMAGE_START, rom_size);
memcpy(PCI_VGA_RAM_IMAGE_START, rom_header, rom_size);
vga_inited = 1;
return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
#endif
} else {
printk_debug("copying non-VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
printk_debug("Copying non-VGA ROM image from 0x%x to 0x%x, 0x%x bytes\n",
rom_header, pci_ram_image_start, rom_size);
memcpy(pci_ram_image_start, rom_header, rom_size);
pci_ram_image_start += rom_size;

View file

@ -184,7 +184,7 @@ void root_dev_init(struct device * root)
void root_dev_reset(struct bus *bus)
{
printk(BIOS_INFO, "Reseting board... NOT! Define hard_reset please\n");
printk(BIOS_INFO, "Reseting board... NOT! Define hard_reset please\n");
// hard_reset();
}

View file

@ -59,9 +59,9 @@ static int valid_area(struct lb_memory *mem,
}
}
if (i == mem_entries) {
printk(BIOS_ERR, "No matching ram area found for range:\n");
printk(BIOS_ERR, "No matching RAM area found for range:\n");
printk(BIOS_ERR, " [0x%016lx, 0x%016lx)\n", start, end);
printk(BIOS_ERR, "Ram areas\n");
printk(BIOS_ERR, "RAM areas\n");
for(i = 0; i < mem_entries; i++) {
u64 mstart, mend;
u32 mtype;
@ -117,7 +117,7 @@ static int load_elf_segments(struct lb_memory *mem,unsigned char *header, int he
* then copy out the data, which may be a subset of the total area.
* the cache, after all, is your friend.
*/
printk(BIOS_INFO, "set %p to 0 for %d bytes\n", (unsigned char *)phdr[i].p_paddr, phdr[i].p_memsz);
printk(BIOS_INFO, "Set %p to 0 for %d bytes\n", (unsigned char *)phdr[i].p_paddr, phdr[i].p_memsz);
memset((unsigned char *)phdr[i].p_paddr, 0, phdr[i].p_memsz);
/* ok, copy it out */
printk(BIOS_INFO, "Copy to %p from %p for %d bytes\n", (unsigned char *)phdr[i].p_paddr, &header[phdr[i].p_offset], size);
@ -145,7 +145,7 @@ int elfload(struct lb_memory *mem, unsigned char *header, unsigned long header_s
printk(BIOS_SPEW, "Loaded segments\n");
printk(BIOS_SPEW, "closed down stream\n");
printk(BIOS_SPEW, "Closed down stream\n");
/* Reset to booting from this image as late as possible */
/* what the hell is boot_successful? */
//boot_successful();
@ -182,7 +182,7 @@ int elfboot_mem(struct lb_memory *mem, void *where, int size)
for(i = 0; i < ELF_HEAD_SIZE - (sizeof(Elf_ehdr) + sizeof(Elf_phdr)); i+=16) {
ehdr = (Elf_ehdr *)(&header[i]);
if (memcmp(ehdr->e_ident, ELFMAG, 4) != 0) {
printk(BIOS_SPEW, "NO header at %d\n", i);
printk(BIOS_SPEW, "No header at %d\n", i);
continue;
}
printk(BIOS_DEBUG, "Found ELF candidate at offset %d\n", i);
@ -211,7 +211,7 @@ int elfboot_mem(struct lb_memory *mem, void *where, int size)
out:
if (!result) {
printk(BIOS_ERR, "Cannot Load ELF Image\n");
printk(BIOS_ERR, "Cannot load ELF image\n");
post_code(0xff);
}

View file

@ -38,8 +38,8 @@ int find_file(struct mem_file *archive, char *filename, struct mem_file *result)
{
char * walk, *fullname;
struct lar_header * header;
printk(BIOS_INFO, "filename is %s\n", filename);
printk(BIOS_SPEW, "start 0x%x len 0x%x\n", archive->start, archive->len);
printk(BIOS_INFO, "LAR: Filename is %s\n", filename);
printk(BIOS_SPEW, "LAR: Start 0x%x len 0x%x\n", archive->start, archive->len);
for (walk = archive->start; walk < (char *)archive->start +
archive->len - 1; walk+=16) {
if(strcmp(walk, MAGIC)!=0)
@ -47,7 +47,7 @@ int find_file(struct mem_file *archive, char *filename, struct mem_file *result)
header=(struct lar_header *)walk;
fullname=walk+sizeof(struct lar_header);
printk(BIOS_INFO, "fullname is %s\n", fullname);
printk(BIOS_INFO, "LAR: Fullname is %s\n", fullname);
// FIXME: check checksum
if(strcmp(fullname, filename)==0) {
@ -62,7 +62,7 @@ printk(BIOS_INFO, "fullname is %s\n", fullname);
*/
walk += 16;
}
printk(BIOS_INFO, "return 1! walk %p archive->start %p start _+ len %p\n", walk, archive->start, (char *)archive->start +
printk(BIOS_INFO, "LAR: Return 1! walk %p archive->start %p start _+ len %p\n", walk, archive->start, (char *)archive->start +
archive->len);
return 1;
}
@ -74,7 +74,7 @@ int copy_file(struct mem_file *archive, char *filename, void *where)
ret = find_file(archive, filename, &result);
if (ret) {
printk(BIOS_INFO, "copy_file: no such name %s\n", filename);
printk(BIOS_INFO, "LAR: copy_file: no such name %s\n", filename);
return 1;
}
@ -89,7 +89,7 @@ int run_file(struct mem_file *archive, char *filename, void *where)
int (*v)(void);
if (copy_file(archive, filename, where)){
printk(BIOS_INFO, "run file %s failed: ENOENT\n", filename);
printk(BIOS_INFO, "LAR: Run file %s failed: ENOENT\n", filename);
return 1;
}

View file

@ -28,9 +28,9 @@ void post_code(u8 value);
int main(void)
{
printk(BIOS_INFO, "RAM init code started\n");
printk(BIOS_INFO, "RAM init code started.\n");
printk(BIOS_INFO, "Nothing to do.");
printk(BIOS_INFO, "Nothing to do.\n");
return 0;
}

View file

@ -68,7 +68,7 @@ static void ram_resource(struct device * dev, unsigned long index,
resource->size = ((resource_t)sizek) << 10;
resource->flags = IORESOURCE_MEM | IORESOURCE_CACHEABLE | \
IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED;
printk(BIOS_INFO, "%s: add ram resoource %d bytes\n", __func__, resource->size);
printk(BIOS_INFO, "%s: add RAM ressource %d bytes\n", __func__, resource->size);
}
static void pci_domain_set_resources(struct device * dev)