Clean out temp hacks which we used in Brussels to get things working.

Cosmetical fixes to the output

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@210 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Stefan Reinauer 2007-03-08 00:55:46 +00:00
parent aa01c41f42
commit 152fcb1949
3 changed files with 11 additions and 26 deletions

View file

@ -108,12 +108,6 @@ void stage1_main(u32 bist)
archive.len=CONFIG_LINUXBIOS_ROMSIZE_KB*1024;
archive.start=(void *)(0UL-archive.len);
/* This won't work; the for loop in lib/lar.c will always
* fail as adding len to start will be 0.
* shave off 0x1000 since we know that is the boot block
*/
archive.len-=0x1000;
printk(BIOS_INFO, "Start search at 0x%x, size %d\n", archive.start, archive.len);
// FIXME check integrity
@ -221,19 +215,19 @@ printk(BIOS_INFO, "Start search at 0x%x, size %d\n", archive.start, archive.len)
if (ret)
die("FATAL: Failed in stage2 code");
printk(BIOS_INFO, "Done stage2 code\n");
printk(BIOS_DEBUG, "Done stage2 code\n");
ret = find_file(&archive, "normal/payload", &result);
if (ret) {
printk(BIOS_INFO, "No such name %s\n", "payload");
die("cachemain finding payload");
printk(BIOS_WARNING, "No such name %s\n", "normal/payload");
die("FATAL: No payload found.");
}
ret = elfboot_mem(mem, result.start, result.len);
printk(BIOS_INFO, "elfboot_mem returns %d\n", ret);
printk(BIOS_DEBUG, "elfboot_mem returns %d\n", ret);
die ("FATAL: This is as far as it goes\n");
die ("FATAL: Last stage returned to LinuxBIOS.\n");
}

View file

@ -145,7 +145,6 @@ 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");
/* Reset to booting from this image as late as possible */
/* what the hell is boot_successful? */
//boot_successful();
@ -173,8 +172,7 @@ int elfboot_mem(struct lb_memory *mem, void *where, int size)
int i, result;
result = 0;
printk(BIOS_INFO, "\n");
printk(BIOS_INFO, "Elfboot\n");
printk(BIOS_INFO, "ELF loader started.\n");
post_code(0xf8);
/* Scan for an elf header */

View file

@ -21,6 +21,7 @@
#include <arch/types.h>
#include <string.h>
#include <lar.h>
#include <console/console.h>
#include <console/loglevel.h>
#ifndef CONFIG_BIG_ENDIAN
@ -30,15 +31,11 @@
#define ntohl(x) (x)
#endif
// FIXME: this should go into a header
int printk(int msg_level, const char *fmt, ...);
int find_file(struct mem_file *archive, char *filename, struct mem_file *result)
{
char * walk, *fullname;
struct lar_header * header;
printk(BIOS_INFO, "LAR: Filename is %s\n", filename);
printk(BIOS_INFO, "LAR: Attempting to open '%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) {
@ -47,7 +44,8 @@ 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, "LAR: Fullname is %s\n", fullname);
printk(BIOS_SPEW, "LAR: current filename is %s\n", fullname);
// FIXME: check checksum
if(strcmp(fullname, filename)==0) {
@ -57,13 +55,8 @@ printk(BIOS_INFO, "LAR: Fullname is %s\n", fullname);
}
// skip file
/* FIXME: This is doing the wrong thing. its skipping too much.
walk += ( ntohl(header->offset) + ntohl(header->len) + 15 ) & 0xfffffff0;
*/
walk += 16;
walk += ( ntohl(header->len) + ntohl(header->offset) -1 ) & 0xfffffff0;
}
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;
}