Commit graph

10 commits

Author SHA1 Message Date
Ronald G. Minnich
30c0db46ed We're getting closer. It has been pointed out that this code is not pretty. I agree. Get
it working, then we'll get it pretty. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@717 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-03 22:42:01 +00:00
Carl-Daniel Hailfinger
c764701a53 Remove superfluous checks for boolean CONFIG_* variables where we tested
CONFIG_* == 1. If those variables are set, they will always be 1.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de> 


git-svn-id: svn://coreboot.org/repository/coreboot-v3@599 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-14 22:34:40 +00:00
Carl-Daniel Hailfinger
1f1619dcfd I found another bug in LAR handling of the option table by staring at
the logs. (Yes, I read logs.)
Looking at the log of a qemu x86 boot with a 1024 kB image, I'd say
something is really broken. Excerpts of my log quoted below:
> [...]
> LAR: Attempting to open 'fallback/initram/segment0'.
> LAR: Start 0xfff00000 len 0x100000
> LAR: seen member normal/option_table
> LAR: seen member normal/stage2/segment0
> LAR: seen member normal/stage2/segment1
> LAR: seen member normal/stage2/segment2
> LAR: seen member normal/initram/segment0
> LAR: seen member bootblock
> LAR: File not found!
> [...]
> LAR: Attempting to open 'normal/initram/segment0'.
> LAR: Start 0xfff00000 len 0x100000
> LAR: seen member normal/option_table
> LAR: seen member normal/stage2/segment0
> LAR: seen member normal/stage2/segment1
> LAR: seen member normal/stage2/segment2
> LAR: seen member normal/initram/segment0
> LAR: CHECK normal/initram/segment0 @ 0xfff040d0
> [...]
> LAR: Attempting to open 'normal/option_table'.
> LAR: Start 0xfffc0000 len 0x3c000

WTF?!? This start address is obviously very wrong.

> LAR: seen member bootblock
> LAR: File not found!

Which results in not finding the option table.

> [...]
> LAR: Attempting to open 'normal/payload'.
> LAR: Start 0xfff00000 len 0x100000
> LAR: seen member normal/option_table
> LAR: seen member normal/stage2/segment0
> LAR: seen member normal/stage2/segment1
> LAR: seen member normal/stage2/segment2
> LAR: seen member normal/initram/segment0
> LAR: seen member bootblock
> LAR: File not found!
> [...]

The bug is in arch/x86/mc146818rtc.c:

> struct cmos_option_table *get_option_table(void)
> {
>     struct mem_file result, archive;
>     int ret;
>
>     // FIXME - i want to be dynamic.
>     archive.len=(CONFIG_COREBOOT_ROMSIZE_KB-16)*1024;

We can't calculate len like that. Reasons:
- We can't know at compile time how big the archive is going to be.
- Subtracting 16 kB from the ROM size was needed when the bootblock
  was not part of the LAR.  These times are long gone.

>     archive.start=(void *)(0UL-(CONFIG_COREBOOT_ROMSIZE_KB*1024)); 

Since the len calculation above is invalid, start is wrong as well.

>     ret = find_file(&archive, "normal/option_table", &result);
>     if (ret) {
>             printk(BIOS_ERR, "No such file '%s'.\n",
>                             "normal/option_table");
>             return (struct cmos_option_table *)NULL;
>     }
>     return (struct cmos_option_table *) result.start;
> }

Use the existing init_archive function to find the LAR in memory.
This fixes the case where the option table was not found depending
on a few unrelated parameters.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@584 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-10 16:44:32 +00:00
Stefan Reinauer
6220b632e7 Now version 3: LinuxBIOS -> coreboot rename.
- I left LB_TAG_ intact because they are used by the payloads
- file renames are still missing. see next commit
- some lb_ renames might be missing. feel free to provide patches.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@564 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-27 18:54:57 +00:00
Marc Jones
064cd70619 Stage0 and Stage1 improvements. Gets Geode LX into initram. Use LAR XIP. Add disable_CAR().
Signed-off-by: Marc Jones <marc.jones@amd.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com> 



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@459 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-07-19 15:15:57 +00:00
Marc Jones
396fdc33a7 Clean up do_normal_boot() by adding defines, moving defines to the header file, and add a function header.
Signed-off-by: Marc Jones <marc.jones@amd.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@457 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-07-18 19:19:48 +00:00
Uwe Hermann
71ccb36afc Massive file rename and moving orgy:
- Everything in include/cpu/generic/x86/arch/* goes into
   include/arch/x86 now.

 - include/cpu/generic/x86/div64.h moves into include/arch/x86, too.

 - The former include/cpu/generic/x86/arch/elf.h moved to
   include/arch/x86/archelf.h, as elf.h already exists in include/
   and we must prevent a name clash.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@314 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-05 21:36:52 +00:00
Uwe Hermann
7e752a0631 Move include/console/console.h to include/console.h in order to
get rid of a directory which only contains a single file, and
at the same time simplify the #includes and their hierarchies.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@313 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-05 20:18:28 +00:00
Stefan Reinauer
121c2990e0 small left over from renaming the option table option (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@294 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-04-28 10:55:36 +00:00
Stefan Reinauer
6c83d8c8c5 * update i82371eb code
* add mc146818rtc runtime option code
* drop linuxbios_tables.h - its redundant (tables.h)
* add subsystem id support
* add option_table as a lar file
* fix a typo in xconfig
* clean up x86emu makefile
* add initial support for normal/fallback (incomplete)
* add back LBCHKSUM support in linuxbios table

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




git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@287 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-04-23 23:41:32 +00:00