Commit graph

522 commits

Author SHA1 Message Date
Carl-Daniel Hailfinger
d3a96b3f67 Make the lar more informative about loadaddress and entry point.
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/LinuxBIOSv3@522 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-27 01:12:48 +00:00
Uwe Hermann
9d16f2066e Initial support for the PC Engines ALIX1.C board.
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@521 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-26 22:12:12 +00:00
Uwe Hermann
d26d82a4a6 Various cleanups and cosmetic fixes.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Corey Osgood <corey.osgood@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@520 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-26 20:28:21 +00:00
Uwe Hermann
497cdb7484 Constify structs which can be const.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@519 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-26 13:28:52 +00:00
Uwe Hermann
5ff0fdb354 Move the code from strings.h to a C file. We should really avoid
to have code in header files.

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



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@518 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-24 22:17:26 +00:00
Stefan Reinauer
e04ac72e78 Create a global rule for compiling raminit code to keep the mainboard
Makefiles clean and simple.

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



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@517 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-22 23:43:06 +00:00
Uwe Hermann
daea2e08b0 The introduction of the _SHARED macros had one flaw: If multiple files
had _SHARED defined during compilation, each of them would contain an
assignment of stage0_printk to *printk. During linking, this caused
errors as multiple definitions of printk existed.
Make sure _SHARED alone gives you only the printk prototype, and iff
_MAINOBJECT is defined as well, include the assignment.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@516 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-22 22:54:11 +00:00
Uwe Hermann
7ffd614f3f Add mkdir calls to create the necessary directories. This should
probably be factored out together with the rest of the lines in
mainboard/* later, but for now it'll do.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@515 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-21 20:12:56 +00:00
Uwe Hermann
441145f9fe Add comment, small style fixes (trivial).
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@514 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-21 18:25:20 +00:00
Uwe Hermann
e28f0155f6 Only post_code.h should have the prototype for post_code() from
post_code.c (thus drop it from console.h).

Instead, have console.h #include post_code.h and drop other
explicit #includes of post_code.h in the code; console.h is already
included in pretty much every file.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@513 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-20 19:06:03 +00:00
Carl-Daniel Hailfinger
fe31d1970c Cleanup printk usage and documentation. Drop the second banner as it was
an artifact from the time when we needed stage2 phase 1 code to make
printk work.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@512 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-20 18:20:53 +00:00
Carl-Daniel Hailfinger
3de758e98a Update the design doc to match a mixture of wishful thinking and
reality.
* We use LAR and not CPIO
* printk() can be called from stage 1 without ill effects
* stage 2 phase 1 is without purpose

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


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@511 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-17 15:28:02 +00:00
Carl-Daniel Hailfinger
09f99f998d Improve printk documentation to match code realities.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@510 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-16 11:17:57 +00:00
Uwe Hermann
f05e9a7d8a Various coding style and cosmetic fixes (trivial).
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@509 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-31 02:40:17 +00:00
Stefan Reinauer
467102748f I know there is still an ongoing discussion on the list about this patch, and
how support for superios might look in the future. This code (like all the
rest, too) will certainly change and evolve in the future, as v3 evolves.

-----

Add support for the Fintek F71805f to LinuxBIOSv3. It hasn't been tested yet
because something's failing to build elsewhere, but the stage1 does build, and
for the moment that's what matters. It's based on working v2 code so it should
work fine.

Signed-off-by: Corey Osgood <corey.osgood@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@508 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-30 02:03:43 +00:00
Carl-Daniel Hailfinger
97722c6e7d Add resource size and resource granularity reporting to device_util.c.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@507 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-16 19:29:34 +00:00
Carl-Daniel Hailfinger
b9c8454adf Fix a corner case access to uninitialized memory (NULL pointer
dereference or worse) in case the archive length is exactly
sizeof(struct lar_header). Such an archive is invalid because the
filename directly after the LAR header is always dereferenced and has to
be at least 1 byte in the "empty filename" case (only terminating \0).
Improve LAR code documentation and reorder variables in one assignment
to make the code more obvious and readable. This will help people
understand what the code does when they look at it half a year from now.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@506 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-16 18:59:36 +00:00
Stefan Reinauer
a15933d861 Create shared symbols for stage0 functions.
This fixes for example printk calls from initram code.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@505 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-11 16:13:12 +00:00
Stefan Reinauer
9e4a632f6e minor changes to remove a warning here. (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@504 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-10 16:55:03 +00:00
Stefan Reinauer
a2b318b2c4 Fix the config process so that pre-parsing of elf works again. It was broken
(I think) when the PAYLOAD_NONE change was put in.                                                                                        

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



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@503 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-04 05:37:24 +00:00
Ronald G. Minnich
573c0d783e Use symbolic names instead of hard-codes; use them from the .h file.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>




git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@502 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-26 19:49:38 +00:00
Ward Vandewege
7bf3fdd871 Correct typo, fix stage2 code documentation, add dtsname printing to
differentiate between identically named objects during boot.

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



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@501 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-26 14:24:52 +00:00
Uwe Hermann
d2d637c4ac Add a pointer to the root device to the LinuxBIOS table. Used for
example to access the device list from Open Firmware.

Signed-off-by: Jens Freimann <jens@freimann.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@500 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-25 00:22:18 +00:00
Uwe Hermann
d3f1396e9b Add more information to the device structure, so an Open Firmware
device tree can be created from data in struct device.

Signed-off-by: Jens Freimann <jens@freimann.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@499 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-25 00:16:31 +00:00
Uwe Hermann
c8ea006269 When outputting ELF segments in LAR, the utility will use the segment
number from ELF as segment number in the file. This works nicely when
there are no skips (e.g. not PT_LOAD segments, which are discarded).

If one segment is skipped, we get a bump:

normal/payload0/segment0 (27288 bytes, lzma compressed to 14506 bytes @0x64c0)
normal/payload0/segment2 (211136 bytes, lzma compressed to 70905 bytes @0x9dc0)

The LAR loader wont load segment2, and in this particular case, grub2-lb
will only boot into rescue mode (segment0 contains it).

Attached patch adds a counter for segment number in the LAR utility to
solve this bug:

normal/payload0/segment0 (27288 bytes, lzma compressed to 14506 bytes @0x64c0)
normal/payload0/segment1 (211136 bytes, lzma compressed to 70905 bytes @0x9dc0)

Also the eagle eyed can see that I merged in Uwe's multiple-payload
patch into current stage1, which includes the segment support. And this
means that grub2-lb without any hacks works when loaded from LAR segments.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@498 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-16 14:37:59 +00:00
Uwe Hermann
b21bb44f50 Create a file-local process_file() function which has
the common parts of copy_file() and run_file().

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@497 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-16 14:32:26 +00:00
Uwe Hermann
872be1d31b Add a simple strncmp() implementation in include/string.h.
Change lib/lar.c to use strncmp() for magic check. Current code
depends on that the len field will never hold a value bigger than
0xffffff, which is a working assumption given current flash sizes, but
my next patch might affect this.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@496 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-08 19:36:35 +00:00
Uwe Hermann
b200a2927c Get superiotool via svn:externals into v3.
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@495 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-07 17:53:47 +00:00
Ronald G. Minnich
94864de286 These are type cleanups and a genuine bug fix.
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@494 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 15:17:20 +00:00
Stefan Reinauer
7d944735be minor patch: use run_address() instead duplicating in lib/lar.c
Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@493 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 02:10:45 +00:00
Stefan Reinauer
0416d548c5 this patch returns if someone tries to execute in place a compressed
entry.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@492 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 02:05:55 +00:00
Stefan Reinauer
bf7873fb20 run_address gets called with entry=0. This patch fixes it.
Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@491 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 01:59:27 +00:00
Stefan Reinauer
da78aab7d6 properzero.diff changes the memset to only clean up the area which is
not memcopied to.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@490 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 01:54:28 +00:00
Stefan Reinauer
efff00256e cleanupmsg.diff changes the "(cleaned up) New segment.." message to be
displayed only when the condition happens.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@489 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 01:53:37 +00:00
Stefan Reinauer
9816be9a2c the new multi-segment lar handling has an off-by-one error in the
printk. 

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>                                                             
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@488 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 01:47:21 +00:00
Stefan Reinauer
dde116bd69 this patch changes vm86.c:do_bios to run_bios(dev, addr).
While doing this, we can remove lot of code duplication about searching
the device, which is already done in the parent pci_device.c.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@487 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-05 01:41:52 +00:00
Uwe Hermann
0c9455284d This switches the only remaining non-userspace code from uint*_t to u*.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@486 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-30 10:25:43 +00:00
Ronald G. Minnich
ca1953808e Make the load address and entry 64 bits.
Remove a broken proto from a c file.
Fix protos etc. per uwe's request for const where it made 
sense. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>

Acked-by: Peter Stuge <peter@stuge.se>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@485 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-29 22:27:31 +00:00
Ronald G. Minnich
be93a3b4e5 This patch is for two things that are too hard to seperate, as they affect
one common file.

The first is the noelf option, which is a simple
modification to look for payloads in the form
payload/segmentX where X is a number.
The segments are assumed to be contiguously numbered and the code
steps when the first search fails (i.e. if 0 and 1 are there, and 2 
is not, the code stops and will not try to find 3). 
The lar code will use the loadaddress to load the segment. Currently,
the lar code will not run each loaded segment, but we need to consider
this for uwe's lbmenu work. Consider this implementation somewhat 
preliminary until we integrate lbmenu. There is the complex issue of 
interdependent segments, as in the kernel, where no single segment
can run until all are loaded. 

The second is the fix for improperly wrapping to 0 when
searching the LAR.

This has been tested with filo and BOCHS.

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/LinuxBIOSv3@484 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-29 16:42:58 +00:00
Ronald G. Minnich
ac4a06d6dd Continuing the 'remove ELF' patch series.
These changes extend the larchive structure, and 
add a Kconfig EXPERT option to enable the 'no elf' mode.

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/LinuxBIOSv3@483 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-29 15:26:54 +00:00
Ronald G. Minnich
3d4b4784e5 This patch is revised based on comments. This is the "remove elf and
replace with LAR" series; this set is for arch/x86.


note that the payload is now payload/segment0, payload/segment1, etc. I've extended
linuxbios to look for these. Note that you can now see all the things
that get loaded ;they're no longer hidden in an ELF header somewhere.
Elf failures are gone!

Note that I've left legacy elf support in, for now, but recommend we
get rid of it as soon as possible.

patch attached. This is a first pass. lar.c needs some refactoring but
I want to get the cmdline going. You can now have a linux payload and
it will uncompress with no problems.

This has been tested with filo and BOCHS.

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/LinuxBIOSv3@482 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-29 15:05:01 +00:00
Ronald G. Minnich
c664a6953a This patch also includes an EXPERT option for enabling no-ELF mode.
The system will default to old behaviour. See Kconfig in the root. 

I still wish to kill ELF mode very soon, however. 

LAR is a very capable format. With two simple extensions, we can use
LAR to replace all that we are using ELF for now. This change can
really make life better:
1. we can use streaming decompress instead of the current "uncompress
elf to memory and then copy segments" approach. So we can get rid of
THIS hardcode:
#define UNCOMPRESS_AREA (0x400000)
2. A simple lar l can show ALL segments, including payload segments
3. It's really easy to see where things will go in memory, and catch problems
4. We can figure out an ELF input file is bogus BEFORE we flash, not
AFTER we flash and try to boot it
5. did I mention streaming decompress?
6. We no longer have to worry about where we decompress the elf in
memory (this problem was causing trouble when the payload was a linux
kernel -- it was so big)
7. Since we have a load address, we can create this lar entry:
normal/cmdline
and specify that it be loaded at a place where linux will find it as
the cmdline.
8. The decision on whether to XIP can be made in the LAR entry, not in
hardcode. For example, if initram needs to be XIP, set the load
address to 0xffffffff. Done.

The change is simple. Add a load address and entry point to the lar
header. Extend the lar tool to parse the elf file and create multiple
lar segments. It looks like this:
 normal/payload0 (33192 bytes, lzma compressed to 18088 bytes @0x38
load @0x100000, entry 0x105258)
 normal/payload1 (72 bytes, lzma compressed to 47 bytes @0x4718 load
@0x1225a0, entry 0x105258)
 normal/option_table (932 bytes @0x4798 load @0, entry 0)
 normal/stage2 (33308 bytes, lzma compressed to 15474 bytes @0x4b78
load @0, entry 0)
 normal/initram (4208 bytes @0x8828 load @0, entry 0)
 linuxbios.bootblock (16384 bytes @0xfc000 load @0, entry 0)

note that the payload is now payload/segment0, payload/segment1, etc. I've extended
linuxbios to look for these. Note that you can now see all the things
that get loaded ;they're no longer hidden in an ELF header somewhere.
Elf failures are gone!

Note that I've left legacy elf support in, for now, but recommend we
get rid of it as soon as possible.

patch attached. This is a first pass. lar.c needs some refactoring but
I want to get the cmdline going. You can now have a linux payload and
it will uncompress with no problems.

This has been tested with filo and BOCHS.

This patch includes ONLY the lar changes, the other changes are next. 

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/LinuxBIOSv3@481 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-29 14:59:25 +00:00
Uwe Hermann
eb1a12cf8d The checksum creation in lar starts somewhere in the lar image,
and ends at the end of a temporary buffer, which doesn't look
right to me (and segfaults if between those two there's an unmapped
region, as happened here).

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@480 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-26 12:12:22 +00:00
Uwe Hermann
d73c7038ba This patch changes all occurences of (working) %Lx to (standards
conformant, working) %llx in printk/printf.
While I'm at it, affected lines with 271 characters can be broken into
smaller chunks.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@479 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-26 12:06:51 +00:00
Stefan Reinauer
9cf00d18d4 small typo
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@478 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-20 18:21:52 +00:00
Stefan Reinauer
7fb3e5a9c5 Fixes nocompress:-handling in lar
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@477 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-20 17:55:32 +00:00
Stefan Reinauer
dd35e9c402 fix mkdirp_below calls like I think Peter intended them
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@476 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-20 00:48:06 +00:00
Stefan Reinauer
e825daf11e fix building LinuxBIOS with new lar. lar fails now if the target file
already exists.

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



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@475 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-20 00:36:20 +00:00
Stefan Reinauer
55c50f085b Add another field to the filename specified for create and add
operations to specify the intended pathname for the blob.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@474 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-20 00:08:18 +00:00
Stefan Reinauer
fa71bfb180 Provide the ability to add arbitrary files to an existing LAR. Also
fleshed out the "usage" screen.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@473 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-19 23:53:16 +00:00