Commit graph

980 commits

Author SHA1 Message Date
Myles Watson
966cb29c69 This patch clarifies/adds comments and changes names in device/pci_device.c
It also changes %p debug statements in various places.  I think they get in
the way of diffs when you have log files to compare.  I don't want to see the
allocation differences most of the time.  I turned most of them into NULL
checks.  If they were supposed to be "Where are we in device allocation?"
checks, we could make them into that too.

It's a work-in-progress. Comments welcome.

I think most of the changes are self explanatory, but this one might not be:

If you are reading all the BARs from a device, and you come to a 64-bit BAR.
No matter why you skip it, you should skip it as a 64-bit BAR, and not try to
read the upper half as the next 32-bit BAR.

Because of that, set the 64-bit flag IORESOURCE_PCI64 early, and don't clear
it on return.

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@980 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-04 21:32:59 +00:00
Marc Jones
f77a0a29b1 Update K8 FID/VID setup to match coreboot v2. Add support for 100MHz FIDs
(revG).

Signed-off-by: Marc Jones <marc.jones@amd.com>
Acked-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/coreboot-v3@979 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-04 17:00:07 +00:00
Carl-Daniel Hailfinger
4213668ab5 Once we touch the MTRRs in VIA disable_car(), the CPU resets. Since
workarounds are better than instant reboots, mangle the code so that it
only switches stacks and flushes the cache.

There are two genuine fix in there as well:
We have to switch %esp before CAR is disabled. That way, the stack is
always valid.
And one of the nastier bugs easily happening in C: We had a pointer to a
const struct, but we wanted a const pointer to a struct. This kills the
(correct) warning about that code.

Many thanks to Corey for testing countless iterations of that code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested and
Acked-by: Corey Osgood <corey.osgood@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@978 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-02 14:47:21 +00:00
Corey Osgood
7f959345e8 Minor patch to fix a Kconfig warning (trivial)
Signed-off-by: Corey Osgood <corey.osgood@gmail.com>
Acked-by: Corey Osgood <corey.osgood@gmail.com>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@977 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-01 04:33:36 +00:00
Ronald G. Minnich
4964e25101 Get via to use standard mtrr init functions. Start to document them.
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@976 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-01 00:53:01 +00:00
Ronald G. Minnich
4f2df501f9 no PIRQ table
Make cmos.layout work with incomprehensible tool -- just turn off checksums.
Add static.c to list of files covered by kscope

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@975 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 22:43:02 +00:00
Peter Stuge
64fd88fced Add file that provides enable_smbus()
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@974 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 22:04:29 +00:00
Ronald G. Minnich
cd5569e28e new files
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@973 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 18:57:37 +00:00
Ronald G. Minnich
cc82832d3a All of these CPUS have 32 address bits in all cases. Move this to the cpu.h
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@972 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 18:56:53 +00:00
Peter Stuge
a0c86bd24e v3: superio/via/vt1211 with serial port init but nothing else
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@971 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 18:44:57 +00:00
Ronald G. Minnich
2e15399b56 Yank out splashscreen support -- that is for seabios.
Signed-off-by: Ronald G. Minnich <rminnich@gmai.com>
Acked-by: Ronald G. Minnich <rminnich@gmai.com>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@970 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 18:39:46 +00:00
Ronald G. Minnich
214db13159 j7f2 builds.
mainboard.h -- we need a better way to do this. We should not have to specify address bits in
this way. But it is not as easy a problem as it seems.

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@969 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 18:34:02 +00:00
Ronald G. Minnich
2635961a1c I have no idea why the patches applied twice. fix it.
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@968 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 18:30:24 +00:00
Ronald G. Minnich
07e50cd554 via vt8237, cn700 and jetway j7f2.
Does not yet build

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



git-svn-id: svn://coreboot.org/repository/coreboot-v3@967 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 18:13:20 +00:00
Myles Watson
7741b2273c This patch clarifies comments and changes a little whitespace in device/device.c
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@966 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 17:57:42 +00:00
Ronald G. Minnich
cfa4c50225 This is the beginning of support for saving base registers that already have a v
alue. There 
is a known bug in v2/v3 wherein a BAR that is set is ignored. This change will c
ome in very
slowly as it is a bit tricky to get right as we redesign the dev code.

Also make the vm86 stuff use the SRC instead of OBJ names so we can see it in ks
cope. 

Finally, beginnings of documentation changes, not finished yet. 

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@965 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-31 17:40:01 +00:00
Myles Watson
eece345b2c This patch makes the vm86 call succeed. It
1. moves the run_bios function down so it can call setup_realmode_idt
2. adds the __attribute__((regnum(0))) to biosint because it is called from assembly

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@964 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-29 20:39:32 +00:00
Ronald G. Minnich
86a45fd25a Make it so that read_resources only reads resources.
dev_phase4 will call compute_allocate. This is an early pass at 
making the device tree code a little more readable. We have done a 
pass on the stage2 code and are comfortable with phases 1-3 and 5-6; 
phase 4 is the phase that is really tough to follow. We are working
on cleaning that up today. 

This change tested and working on dbe62. 

We are well aware that as more complex targets appear this code
may break on them. At the same time, we are determined to untangle the 
thicket of code in phase 4, since this code has been a source of 
confusion for several years now. 

There used to be a recursion: compute_allocate_resource would ALWAYS
call read_resources, which would in turn call compute_allocate_resource. 

We are attempting to resolve this in a clearer manner. 

boots to linux on dbe62
boots to etherboot on qemu

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@963 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-29 18:29:19 +00:00
Myles Watson
b04f94ae37 White space cleanup in vm86.c so that the next patch is more readable.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@962 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-29 18:12:22 +00:00
Ronald G. Minnich
3eec9e7790 General cleanup and comments for things that should be fixed in future.
Most substantive change is getting rid of 'initialized', which was only
ever needed in v2 due to an implementation mistake.

With Uwe's comments taken into account, 

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



git-svn-id: svn://coreboot.org/repository/coreboot-v3@961 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-29 04:25:32 +00:00
Myles Watson
32139165ec This patch documents the unreadable function in northbridge/amd/k8/pci.c and
cleans up the NULL pointer protection.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Marc Jones <marc.jones@amd.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@960 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-29 02:22:38 +00:00
Myles Watson
81b32098c1 This patch clears up a few warnings in stage1 code. It removes an unused variable, moves a declaration into an ifdef, and adds a cast.
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@959 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-29 02:19:42 +00:00
Myles Watson
e7ea68860d Trivial fixes of printk \r\n and white space.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@958 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-28 17:29:07 +00:00
Myles Watson
345f5ac818 Trivial fixes of printk_debug and a comment from v2.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@957 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-28 16:06:28 +00:00
Myles Watson
12f47ecf89 This fixes the 8132 so that it can be included in the build for serengeti.
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@956 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-28 02:06:15 +00:00
Marc Jones
ea883f4ad2 Whitespace cleanup on AMD southbridge device_operations structs. (trivial)
Signed-off-by: Marc Jones <marc.jones@amd.com>
Acked-by: Marc Jones <marc.jones@amd.com>

git-svn-id: svn://coreboot.org/repository/coreboot-v3@955 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-27 23:16:17 +00:00
Ronald G. Minnich
cedf16ca69 Marc reviewed the v3 device tree code and we developed the set of
cleanups/fixes.

Fixup device tree code. Add/change methods as needed. 
This should help serengeti.
Signed-off-by: Ronald G. Minnich<rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
Acked-by: Marc Jones <marc.jones@amd.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@954 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-27 20:05:38 +00:00
Myles Watson
7bc7f67bfb This patch fixes whitespace so that a future patch is easier to read.
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@953 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-24 19:26:34 +00:00
Myles Watson
7e654ac7a0 This patch fixes whitespace so that my next patch is easier to read.
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@952 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-24 17:53:03 +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
Uwe Hermann
aea512d5dc Coding-style, whitespace, and Doxygen-fixes for util.c (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@950 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 18:52:27 +00:00
Myles Watson
84b3e13596 This patch adds explicit casts to remove some compiler warnings.
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@949 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 16:47:42 +00:00
Uwe Hermann
2174dd2c78 Simplify the PM/PM2 related functions and make them more readable.
Self-acked, as this was acked/committed in v2 already (r3680).

Build-tested with the AMD dbm690t target.

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@948 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 13:09:31 +00:00
Patrick Georgi
e0ab3a5564 Read actual memory size in qemu-i386
Signed-Off-By: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

git-svn-id: svn://coreboot.org/repository/coreboot-v3@947 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 12:56:34 +00:00
Carl-Daniel Hailfinger
932667384b First parts of VIA EPIA-CN support.
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@946 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 01:18:30 +00:00
Carl-Daniel Hailfinger
f4037eff82 This is the patch which will let VIA C7 continue in v3 during/after a
CAR disabling operation. Untested, but it should work.

Please note that the code is incomplete, but that should at least not
affect stage2.

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@945 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 00:28:28 +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
81b79f9052 This patch cleans up the showallroutes utility:
1. fix if->in in comments
2. change width of output for different types
3. make all masks 0x so that it's easy to tell a mask

It also changes the invocations to do function 1 instead of 0.

I think we should consider a name that makes it clear that this is only good
for AMD K8+ processors function 1.  We might need a similar utility for other
functions later. 

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@943 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-22 18:55:55 +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
Ronald G. Minnich
979bdb5ed0 Add functions to print routes.
I am totally convinced these are right. I am going on travel for a week 
and want these in your hands. 

Carl-Daniel as acked these, but for lack of time to get firefox going 
right now, 

Current serengeti output
DRAM(40)01000000-00ffffff, ->(1), R, W, 2 nodes, 1
DRAM(48)01000000-00ffffff, ->(1), R, W, 2 nodes, 1
DRAM(50)01000000-00ffffff, ->(1), R, W, 2 nodes, 1
DRAM(58)01000000-00ffffff, ->(1), R, W, 2 nodes, 1
DRAM(60)00000000-00ffffff, ->(4), , , No interleave, 0
DRAM(68)00000000-00ffffff, ->(0), R, W, 8 nodes, 0
DRAM(70)00000000-00ffffff, ->(0), , , No interleave, 0
DRAM(78)00000000-00ffffff, ->(0), , , No interleave, 0
MMIO(80)01a00000-1100ffff, ->(0,2), , , CPU disable 0, Lock 0, Non 
posted 0
MMIO(88)75060000-0000ffff, ->(2,0), , , CPU disable 0, Lock 0, Non 
posted 0
MMIO(90)51040000-3f00ffff, ->(0,0), , , CPU disable 1, Lock 0, Non 
posted 0
MMIO(98)00000000-0000ffff, ->(0,0), R, W, CPU disable 0, Lock 0, Non 
posted 0
MMIO(a0)01c00000-1100ffff, ->(0,1), , , CPU disable 0, Lock 0, Non 
posted 1
MMIO(a8)75000000-0000ffff, ->(2,0), , , CPU disable 0, Lock 0, Non 
posted 0
MMIO(b0)51040000-0000ffff, ->(0,0), , , CPU disable 1, Lock 0, Non 
posted 0
MMIO(b8)00000000-0000ffff, ->(0,0), , , CPU disable 0, Lock 0, Non 
posted 0
PCIIO(c0)00001010-00003110, ->(0,1), , ,VGA 0 ISA 0
PCIIO(c8)00000750-00000000, ->(2,0), , ,VGA 0 ISA 1
PCIIO(d0)00002510-00000000, ->(0,0), , ,VGA 1 ISA 0
PCIIO(d8)00000000-00000000, ->(0,0), , ,VGA 0 ISA 0
CONFIG(e0)00000000-00000000 ->(0,0),  CE 0
CONFIG(e4)00000000-00000000 ->(0,0),  CE 0
CONFIG(e8)00000000-00000000 ->(0,0),  CE 0
CONFIG(ec)00000000-00000000 ->(0,0),  CE 0

Either the DRAM output is wrong or there is a real problem with our 
DRAM programming. 

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@941 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-21 03:20:05 +00:00
Ronald G. Minnich
ff5c45493d Unshared pci functions, since these can not be used when broken PCI
expansion ROMs are active.

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

Acked-by: Marc Jones <marc.jones@amd.com>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@940 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-20 23:48:30 +00:00
Ronald G. Minnich
f755f31964 Take out the notional pcio device on link 2, as it may be interfering
with testing of real serengeti

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@939 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-20 15:24:00 +00:00
Ronald G. Minnich
36d976d16c Allow setting of rom_address where needed.
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@938 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-20 15:21:19 +00:00
Jordan Crouse
20621bdadb I noticed that free regions provided by search_global_resources() don't have
the reserved regions substracted from them.  This patch introduces a check
to weed them out, splitting when necessary

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@937 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-17 22:49:50 +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
Carl-Daniel Hailfinger
4c275b0435 The option table C file is a generated file and lives inside the build
directory. Look for it there.
Introduce the STAGE0_DYNAMIC_SRC makefile variable to handle this and
other generated stage1 code.
Thanks to Ron for spotting this bug.

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@935 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-16 17:50:08 +00:00
Ronald G. Minnich
6dc3ebfb5c Having received no comments on this pro or con, and knowing we have to
have this code, I'm comitting it.

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@934 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-16 16:02:12 +00:00
Carl-Daniel Hailfinger
8b1b420e6b We need a way to find out where our stack and our global variables are
at any given moment. The code is generic enough to handle this in a
processor-specific way behind the scenes if needed.

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@933 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-16 03:03:33 +00:00
Carl-Daniel Hailfinger
33de3b2fb5 Right now we face the problem that we can't support processors which
have a CAR area outside the usual RAM area. For those processors, we
have to implement a stack copying and switching mechanism. Since gcc
can't be told that the stack just moved, split stage1_main() into
stage1_phase1() and stage1_phase2() and stage1_phase3().
stage1_phase1() is the new entry point in stage1 and will handle
everything up to the point where we want to disable CAR.
Switching the stack, disabling CAR and handling other tasks related to
the stack switch (printk buffer move) is all wrapped in the
stage1_phase2() function.
stage1_phase2() calls disable_car() which then calls stage1_phase3().
stage1_phase3() is the former second half of stage1_main().

Notes about this patch:
- Code flow is almost unchanged for Qemu, K8 and Geode. No extensive new
testing required.
- We can support stack-keeping and stack-relocating architectures at the
same time, so C7 is definitely supportable
- The comment in stage1_phase2 says "some of this is not yet done". That
refers to the nonexisting code for stack switching on C7.
- "Minimal changes, maximum benefit".

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@932 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-16 03:00:28 +00:00
Myles Watson
8b2f6c4c4a Change statictree emit function to emit path correctly for cpus.
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@931 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-15 17:46:52 +00:00