Commit graph

158 commits

Author SHA1 Message Date
Carl-Daniel Hailfinger
2c580fab85 Emergency fixup for the missing is_coldboot().
Note that the weak is_coldboot() returns always 1.
The i945 is_coldboot() returns 1 for a warm boot?

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1161 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-03-20 16:05:56 +00:00
Carl-Daniel Hailfinger
c1ebcbb8eb Fix evil typo resulting in a compile failure.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1160 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-03-19 23:29:20 +00:00
Peter Stuge
37077bfe36 v3 vtxprintf(): Stop looking for non-ASCII characters after one has been found.
And update the string length. Many thanks to Mathias Krause for spotting this!

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1159 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-03-19 13:34:53 +00:00
Carl-Daniel Hailfinger
10ae1a84d0 This patch tries to make printk more readable and reliable.
Base 16 number printing used digits[33] instead of the more readable 'x'
for the "0x" prefix. That means you have to look up an array just to
find out what the code does. Change it.

We already write "<NULL>" if printk gets a NULL pointer as string
argument. Introduce "<near NULL>" for string arguments with addresses
below 0x400. This error happened in the past when dereferencing a struct
member with a string and the struct had the address NULL.

Check if all to-be-printed characters in the string are indeed
printable. The idea is to catch garbage strings from stray pointers and
print "<non-ASCII characters>" instead.
If a string contains characters outside classic ASCII printable stuff,
this will trigger. An example would be characters with diacritic marks
like äöüéăçőč.
Then again, I don't see localized versions of coreboot on the horizon.
Maybe for payloads, but not for coreboot itself.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1158 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-03-19 12:53:57 +00:00
Ronald G. Minnich
5a90884bd4 last kontron commit.
This is a potentially good pointer to where someone can take this. 

While startup was working, BSP now explodes once the AP stops, while
BSP is doing startup IPI loop send #2. The code needs to be hardened; I 
think use of the shared variables would really make it much more solid. 
This would be a good undergrad student project if someone is looking for one.

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1145 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-03-11 16:17:37 +00:00
Myles Watson
9d6d811dd1 This patch converts __FUNCTION__ to __func__, since __func__ is standard.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1131 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-02-12 21:15:34 +00:00
Mart Raudsepp
69d6613be1 Be silent in ram_check in non-debug loglevels
As DBE61 support now runs ram_check for non-debug purposes and has expected failures
on DBE61A, downgrade the per-address looped fail notification printk and other messages
from BIOS_ERR to BIOS_DEBUG.
Document that if something is wanted to be reported in non-debug loglevels, one should
do so in the caller based on the return value.
Tweak a debug string in ram_verify to be more descriptive.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Peter Stuge <peter@stuge.se>

git-svn-id: svn://coreboot.org/repository/coreboot-v3@1047 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-20 12:20:35 +00:00
Carl-Daniel Hailfinger
0153293887 Not a single file is being rebuilt in v3 if build.h changes. That means
the console banner and the option table will never be updated with more
recent build.h strings.

Thanks to Mart Raudsepp for spotting this oddness.

x86emu doesn't care about the contents of build.h, it just uses build.h
to check whether it is compiled in conjunction with coreboot.

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@1036 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-16 22:59:52 +00:00
Myles Watson
981c3652a1 This patch adds some debug functions, cleans up whitespace (per indent), and adds const in a few places.
include/device/path.h
	Make path_eq take const path*.
	
include/device/device.h
	Use const with dev_path, dev_id_string, bus_path, find_dev_path,
	andalloc_find.

device/device.c
	Add functions for tree printing of devs and resources.
	Change %p to more useful info.

device/device_util.c
	Use const changes from device.h.

lib/stage2.c
	Use updated printing functions.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1024 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-14 16:15:33 +00:00
Mart Raudsepp
6cc92990ce Return the count of failures from ram_check.
Will be necessary for DBE61 automatic memory size selection.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

git-svn-id: svn://coreboot.org/repository/coreboot-v3@1014 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-13 17:04:11 +00:00
Carl-Daniel Hailfinger
cb9db3b6d0 We are woefully unaware about how much stack v3 really uses.
This is a complete rewrite of my earlier stack checker proposal.
It works for CAR and RAM, has better abstraction and actually gives us
nice results.
The stack checker is default off due to its rather measurable impact on
boot speed.
Diagnostic messages are printed on first initialization, directly after
RAM init and directly before passing control to the payload. Sample qemu
log is attached. Extract from that log follows:

coreboot-3.0.986 Fri Nov  7 04:04:37 CET 2008 starting...
(console_loglevel=8)
Initial lowest stack is 0x0008fe98
Choosing fallback boot.
[...]
Done RAM init code
After RAM init, lowest stack is 0x0008fe30
Done printk() buffer move
[...]
LAR: load_file_segments: Failed for normal/payload
Before handoff to payload, lowest stack is 0x0008bf50
FATAL: No usable payload found.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1012 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-13 01:28:32 +00:00
Uwe Hermann
9b90a6f22b Fix a bunch of Doxygen warnings in v3 (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/coreboot-v3@951 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 18:55:01 +00:00
Myles Watson
5056b10174 This patch fixes the fix! Sorry again.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>

Thanks,
Myles


git-svn-id: svn://coreboot.org/repository/coreboot-v3@944 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-22 19:18:04 +00:00
Myles Watson
6f2eff6807 This patch fixes 921 so that the log_level works again. Sorry about that.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>

Thanks,
Myles


git-svn-id: svn://coreboot.org/repository/coreboot-v3@942 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-22 18:31:42 +00:00
Jordan Crouse
5d37f8595c the multiboot map is generated too early in
arch_write_tables(), before a number of routines that write/reserve
stuff are executed (in my test this only affects the 0x0-0x500 region
but I notice there's other stuff too).

Attached patch moves it down, solving the problem.  Because stage1 can no
longer assume the MBI is at 0xf0000, I had to add a return path for stage2
to give it a pointer, using its exit status value.

Signed-off-by: Robert Millan <rmh@aybabtu.com>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@936 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-17 22:49:43 +00:00
Myles Watson
745f75457c Add log levels to the output. In order to use this enable EXPERT and CONSOLE_LOG_LEVEL.
EXPERT seemed like the best fit.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Peter Stuge <peter@stuge.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@921 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-13 20:15:56 +00:00
Uwe Hermann
8e6d45e059 Minor fixes and improvements for v3, mostly for Kconfig files (trivial).
- Coding style and whitespace fixes.
 - Remove obsolete comments, fix incorrect ones.
 - Use the full/canonical name of mainboards/vendors everywhere.
 - Update the list of USB Debug capable chipsets from
   http://www.coreboot.org/EHCI_Debug_Port.
 - s/LB/CB/ for the CONSOLE_PREFIX kconfig option.

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



git-svn-id: svn://coreboot.org/repository/coreboot-v3@879 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-01 18:29:22 +00:00
Carl-Daniel Hailfinger
49e1879723 Fix initial printk buffer address initialization. This was broken in
r785 (move from explicit asm to implicit C) and unfortunately qemu never
triggered the bug, only real hardware did. That's because qemu will not
spew an error on access to RAM before RAM is enabled.

Thanks to Ron for bisecting this.

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/coreboot-v3@857 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-09-04 15:35:49 +00:00
Carl-Daniel Hailfinger
f9b114054c Improve debugging printks for LAR and PCI access.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@856 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-09-04 00:38:54 +00:00
Ronald G. Minnich
3b384ce2a2 log2 is now log2f (floor) and log2c (ceiling) and users MUST pick one or
the other. It really matters for non-power-of-2 numbers. 

This breaks k8 builds; fix is coming. 
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@852 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-31 20:28:21 +00:00
Ronald G. Minnich
ff2ddcb313 This gets us back to a compiling k8 target.
This code has been tested on dbe62, and builds for qemu as well. 

the next step is testing on simnow. 

k8.h: add more prototypes and some required inline functions. 
cpu.h: same
serengeti: expand defines in mainboard.h, though we need a better 
mechanism; continue to fix initram.c, add new support files to Makefile
lib/console.c: include globalvars.h
lib/lar.c: Provide more informative print as the lar is scanned.
k8 north: needed reset_test.c from v2, fixes to raminit.c
arch/x86
Kconfig: new CONFIG variable CBMEMK, meaning coreboot mem k, memory
	used for coreboot. 
init_cpus.c: functions to start up CPUs
stage1_mtrr.c: bring over early mtrr support from v2.

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



git-svn-id: svn://coreboot.org/repository/coreboot-v3@847 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-30 03:35:40 +00:00
Carl-Daniel Hailfinger
0aa3dcb0a2 Emergency fixup for r828 to at least get it to compile for one target
(DBE62).

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@832 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-28 01:21:18 +00:00
Carl-Daniel Hailfinger
e5fcf247f2 gcc -fwhole-program needs to mark any function which is used outside the
current compilation unit to be marked as externally_visible. We have
EXPORT_SYMBOL exactly for that purpose.

This applies to the following symbols used by x86emu and/or vm86:
- pci_read_config8
- pci_read_config16
- pci_read_config32
- pci_write_config8
- pci_write_config16
- pci_write_config32
- dev_find_pci_device
- dev_find_slot
It also applies to the main entry point of stage2:
- stage2

With this patch, I can use -fwhole-program for stage2 without any
problems. For standard compilation, this is a noop.

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/coreboot-v3@827 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-27 22:29:38 +00:00
Stefan Reinauer
9fc4de30d2 needs to be const, or the segment checker will bail out. (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@813 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-24 11:29:11 +00:00
Ronald G. Minnich
784450567f This now compiles and has a simple error on build to stage2.
Geode still builds fine. 

include/lib.h includes a new function, cycles(), which is a u64 and 
architecture-defined. (Thanks, Plan 9, for a sensible idea). 

All rdtsc removed in favor of cycles()

All other changes are k8 specific. None of these changes adversely 
impact existing platforms AFAICT. 

Goal is that by 31/8/8, we're testing on simnow. 

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@807 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-23 16:51:00 +00:00
Carl-Daniel Hailfinger
07dbacb578 Fix unexplained magic value and make it future-proof.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@789 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-18 21:11:05 +00:00
Carl-Daniel Hailfinger
0c255e108b Move console log level management to global variable infrastructure. The
existing code does not work due to the characteristics of stage1. This
has been broken since r729.

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/coreboot-v3@786 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-18 20:13:11 +00:00
Carl-Daniel Hailfinger
1b22622323 Change v3 makefile rules to be source-based, part I.
The individual makefiles in lib/ mainboard/ southbridge/ and superio/
have been changed accordingly and the big glue layer in
arch/x86Makefile has been modified to wrap the new rules correctly.

This pepares the way for additional optimizations during compile and
link time.

Build tested and boot tested on Qemu.

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/coreboot-v3@782 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-18 11:15:43 +00:00
Carl-Daniel Hailfinger
4c19fcbd44 Fixed typo in r778.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@779 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-17 16:56:21 +00:00
Carl-Daniel Hailfinger
3392900db9 The decompressors linked into stage0 end up in the variable
DECOMPRESSORS in arch/x86/Makefile. They absolutely do no belong there
because they're not arch specific.
lib/Makefile has a variable COMPRESSORS with identical content, but that
variable is completely unused. Move DECOMPRESSORS to lib/Makefile and
kill the unused one.

Build and boot tested on qemu.

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@778 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-17 14:21:50 +00:00
Carl-Daniel Hailfinger
07f3009f43 Introduce a generic global variable storage mechanism and switch the
printk buffer management to it.

Build tested and boot tested and result tested on Qemu.

Adding a new global variable is not as easy as it looks, but the
comments in the code should be good enough to tell you how.

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/coreboot-v3@760 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-14 09:25:58 +00:00
Uwe Hermann
9eb8578b75 Minor cosmetic and/or license header fixes (trivial).
This includes using consistent (C) lines, adding email addresses,
and so on. The file southbridge/nvidia/mcp55/dts was never edited
by Yinghai Lu (thus removing his (C) line) and would be too trivial
anyway...

The changes (though trivial) were also informally acked by Ron on IRC.

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




git-svn-id: svn://coreboot.org/repository/coreboot-v3@744 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-11 21:01:54 +00:00
Ronald G. Minnich
649c9f99ff Console:
(1)we now compile in all printks, which is good: we can print any message provided we can change
the console log level at any time. 
(2) The console log level is compiled in and unchangeable, which is bad, as it defeats the purpose of (1).

Add a BIOS_ALWAYS log level. Make console log level a variable. Make functions that set it and get it
visible everywhere. Always print out the version message; this is really *not* noise!

PCI: Simplify pci functions so that they can be used in stage1 or anywhere for that matter. Add
a find function which is needed for many stage1 functions. Note that we copy but also clean up
the libpayload stuff just a bit. 

Get rid of config space type 2. If there was ever a platform that used it, I don't know what it was, 
and the presence is a needless distraction. 

tested and working on DBE62 (which means the console and the pci functions work :-).

There is a remaining problem with dumplxmsrs which nobody understands. It prints out garbage if we use the 
%s for the msr names. 

Formatting is an issue; if somebody wants to fix formatting they can assume I will ack it. Sorry, 
my emacs has gone just nuts. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@729 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-09 21:03:57 +00:00
Carl-Daniel Hailfinger
9700b1e3b6 Fix a typo in r684 which caused compilation to fail. Trivial.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@685 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-05-23 19:59:43 +00:00
Carl-Daniel Hailfinger
6198dc8271 Print current and wanted LZMA scratchpad size in the decompression
routine. That allows people to either adjust compression parameters
or scratchpad size.
Having a similar check during build time would be nice.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@684 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-05-23 19:56:50 +00:00
Carl-Daniel Hailfinger
2db0a5aea7 Clarify LZMA code license.
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@644 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-03-17 01:40:56 +00:00
Uwe Hermann
d3799020d5 Small fixes for lib/ramtest.c:
- Don't make write_phys/read_phys static, they can be useful elsewhere.

 - Rename write_phys/read_phys to ram_write_phys/ram_read_phys for
   consistency with the other RAM-related functions.

 - Simplify some parts of the code a bit.

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



git-svn-id: svn://coreboot.org/repository/coreboot-v3@635 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-03-06 23:18:13 +00:00
Uwe Hermann
29dd0b58e3 Various cosmetic fixes, added Doxygen comments (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/coreboot-v3@634 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-03-06 18:26:45 +00:00
Ronald G. Minnich
163716a8bb Add ramtest for development.
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@633 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-03-06 16:35:44 +00:00
Carl-Daniel Hailfinger
24d743968a Print name of compression algorithm in addition to the corresponding
number during boot.
Convert process_file() to use enum compalgo instead of hardcoded 
"1","2","3" and change the control structure from a series of if() 
statements to a switch() statement.

Uppercasing enum compalgo also found a name clash between NONE as 
compression algo and NONE as operation mode of util/lar.

Compile and boot tested on Qemu.

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@606 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-18 00:48:25 +00:00
Carl-Daniel Hailfinger
9f07a52934 On 16.02.2008 07:41, ron minnich wrote:
> Alix1c won't boot with the zero decompress code.
> I think the code is using the wrong address on decompress.

Indeed, r601 broke all targets, you were just lucky that qemu didn't
explode as well.
It's the seemingly easy patches which break booting. With your hint, I
found the bug. Myles made a small, but important mistake with the memset
for the "zeroes" decompression.
The memset zeroed the archive instead of the destination. No wonder it
did explode.
This patch fixes it and also reverts the emergency commit r604 because
that one is no longer necessary.

Ron tested on the Alix1c, boots fine, ethernet and IDE working.

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@605 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-16 19:18:32 +00:00
Myles Watson
2f5c48d0b2 This patch adds zero compression for bss segments. One of the reasons
for this is that currently, if you select no compression, the bss
segment of filo takes up 153K with just zeroes.  With this patch, it
always takes up a lar header + 1 byte.  I left the one byte so that
the checksum wouldn't be broken.

This patch could have taken out the calloc in the compression area,
but since it only uses compile-time memory, I decided to keep this
simple.

Myles

Signed-off-by: Myles Watson <myles@pel.cs.byu.edu>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@601 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-15 19:27:13 +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
5d11489d74 Make printk() log to a buffer.
Tested on Qemu and Geode LX.
Benefits of this patch:
- printk() now works directly after printk_buffer_init(), even before
the serial port is set up.
- If all you want is a log, you don't have to bother with serial output.
- A payload can read and analyze the log.
- You can build on this and buffer log until serial is available, then
flush the messages buffered so far.

The printk buffer is configurable with a default-on Kconfig variable.

If you want to dump the buffer from the Qemu monitor after CAR has been
disabled, use this command:
memsave 0x90000 65536 memdump.bin

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Marc Jones <marc.jones@amd.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@590 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-13 15:48:37 +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
Ronald G. Minnich
5de5570bac This change will support stage2 running LAR files. The initial example
is running the VSA in the geode lx northbridge.

It builds but is not tested.

lar.h: make LAR functions SHARED
lar.c: make process_file non-static (i.e. global)
vsmsetup.c: modify to use LAR functions.
stage1.c: new function, init_archive, which is SHARED and will set up
the initial archive struct.

Note that some work remains. The use of unsigned longs and unsigned
shorts should be changed to u32/u16 as Carl-Daniel has pointed out,
Because this change requires changes elsewhere I am not including them
in this patch. 

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@561 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-26 03:40:00 +00:00
Marc Jones
ac309da3d9 Add hlt() back into the die() function and update the comments.
Signed-off-by: Marc Jones <marc.jones@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@550 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-09 18:27:49 +00:00
Carl-Daniel Hailfinger
29d69787ea The current parameter situation of post_code() is rather mixed between
numeric constants and #defines for such constants. Since grepping the
tree shouldn't be necessary to find a POST code and we already have
too many duplicated POST codes, gather almost all of them in a common
header file.

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@549 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-07 16:34:34 +00:00
Carl-Daniel Hailfinger
5638456d16 Change die() to make it JTAG friendly.
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@545 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-04 23:14:10 +00:00
Carl-Daniel Hailfinger
af52a3c6d5 Add a banner function to lib/console.c that is SHARED so all code can
use it.

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@544 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-04 23:12:22 +00:00