Commit Graph

412 Commits

Author SHA1 Message Date
Andreas Färber
cffdefa19e ppc: Use config file to enable RTAS
RTAS had to be enabled via EXTRACFLAGS=-DUSE_RTAS.
Use the config file instead.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@909 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:36:22 +00:00
Andreas Färber
31289f3544 ppc: Fix client stack setup
The client stack was set up 96 * 64 KiB below the hash table.
Should be 96 KiB instead.

v2:
* Initial.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@908 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:36:18 +00:00
Andreas Färber
0c3891e2c9 ppc: Fix stack setup
The exception stack was always set up 64 KiB below the ROM,
ignoring hash table alignment.
Align the stack pointer appropriately.

v2:
* Drop buggy distinction based on PVR value since the previous patch
  unifies alignment. Suggested by Segher Boessenkool.

Cc: Alexander Graf <agraf@suse.de>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@907 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:36:15 +00:00
Andreas Färber
7a86728b19 ppc: Move hash table
To avoid complications with ppc64, always use the ppc64 alignment.

v2:
* Initial. Suggested by Segher Boessenkool.

Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@906 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:36:12 +00:00
Andreas Färber
076573e064 ppc: Move malloc zone
ofmem was fixed at 0x05400000, followed by the malloc zone. The latter was
bounded by the stack (now client stack), relative to the top of RAM.
An increase of RAM would therefore only enlarge the malloc zone.

Move the malloc zone below the client stack, with a fixed size of 2 MiB.
The size is derived from the memory map depicted in ofmem.c;
having a fixed size leaves room for memory claim'ed by clients
and by OpenBIOS.

v2:
* Through the preceding patch the malloc zone goes below the client stack
  rather than below the stack. Adjust and prettify the illustration.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@905 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:36:08 +00:00
Andreas Färber
c469e237e6 ppc: Claim memory used by OpenBIOS
OpenBIOS kept getting overwritten in RAM by clients such as Haiku.

Make sure memory used by OpenBIOS cannot accidentally be claimed
by someone else.
This also sets up the "available" property as expected.

Note that we avoid ofmem_claim() as it would map the pages using a
default mode, followed by a remap with the desired mode.

v2:
* Reordered.
* Added spacing.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@904 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:36:04 +00:00
Andreas Färber
4e3639f8ac ppc: Fix heap top
Don't let the client stack and the heap overlap.

v2:
* Initial.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@903 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:36:00 +00:00
Andreas Färber
ca9e9b0230 ppc: Fix RAM top (2/2)
The hash base is not get_rom_base() - HASH_SIZE. It gets rounded down,
depending on the PVR, so read its true value from SDR1.

v2:
* Split up.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@902 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:35:56 +00:00
Andreas Färber
6f834ad03b ppc: Fix RAM top (1/2)
According to the illustration in start.S,
the stack size is supposed to be 64 KiB.

v2:
* Split up.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@901 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:35:53 +00:00
Andreas Färber
74203e0c7a ppc: Remove bogus return
ofmem_free() has no return value and neither does free().

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@900 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:35:51 +00:00
Andreas Färber
d0ade34117 ppc: Use symbolic OpenBIOS origin address
This will simplify moving OpenBIOS around in memory.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@899 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 17:35:49 +00:00
Mark Cave-Ayland
5b7a80e9e8 When booting from disk, an explicit :a slice is required in order for the Fcode bootloader to execute correctly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@898 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 15:09:18 +00:00
Mark Cave-Ayland
0fcbe4e047 Replace hardcoded value with the correct constant from spitfire.h.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@897 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 14:13:15 +00:00
Andreas Färber
05ec5dd149 ppc: Suppress /hypervisor outside KVM
My New World PowerMac G3 does not have a /hypervisor node.

Move all Forth code to kvm_of_init() to make it match the comment:
Don't expose /hypervisor when not in KVM.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@895 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-13 14:01:51 +00:00
Andreas Färber
1061a98f8d ppc: Fix typos in comment
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@892 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-09 10:16:26 +00:00
Mark Cave-Ayland
a5eb733975 Fix the MMU TLB miss handlers so that they no longer crash when building SPARC64 with -O0.
This patch allocates an extra 192 bytes of stack space required by unoptimised gcc builds for saving arguments to the stack. As 
suggested by Igor previously (see http://lists.openbios.org/pipermail/openbios/2009-July/003762.html and SVN r508).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@887 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-05 08:52:49 +00:00
Mark Cave-Ayland
44af623113 Implement va>tte-data defer word for the MMU TLB miss handlers.
As used by OpenSolaris. This enables OpenSolaris boot to proceed further by allowing the kernel to correctly manage its own TLB 
misses.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@886 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-03 20:28:27 +00:00
Blue Swirl
b00e6c7085 sparc32: fix warnings from GCC 4.6.0
Compiling Sparc32 with GCC 4.6.0 20100925 produced a few warnings:
../arch/sparc32/context.c: In function 'start_main':
../arch/sparc32/context.c:49:9: error: variable 'retval' set but not used [-Werror=unused-but-set-variable]
../arch/sparc32/romvec.c: In function 'obp_devwrite':
../arch/sparc32/romvec.c:326:9: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
../drivers/iommu.c: In function 'iommu_init':
../drivers/iommu.c:102:24: error: variable 'vers' set but not used [-Werror=unused-but-set-variable]
../drivers/iommu.c:102:18: error: variable 'impl' set but not used [-Werror=unused-but-set-variable]

Fix the warnings by avoiding write-only variables.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@883 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-03 19:18:23 +00:00
Blue Swirl
4355018924 Fix warnings from GCC 4.6.0
Compiling Sparc64 with GCC 4.6.0 20100925 produced a few warnings:
../arch/sparc64/context.c: In function 'start_main':
../arch/sparc64/context.c:49:9: error: variable 'retval' set but not used [-Werror=unused-but-set-variable]
../packages/disk-label.c: In function 'dlabel_load':
../packages/disk-label.c:183:8: error: variable 'buf' set but not used [-Werror=unused-but-set-variable]
../drivers/floppy.c: In function 'collect_interrupt':
../drivers/floppy.c:378:13: error: variable 'status' set but not used [-Werror=unused-but-set-variable]

Fix the warnings by avoiding write-only variables.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@882 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-03 16:37:47 +00:00
Mark Cave-Ayland
630c56c162 Implement pgmap@ for SPARC64 since it is required for OpenSolaris.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@877 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-03 09:37:13 +00:00
Mark Cave-Ayland
31fd96f480 Solaris 9 kernel needs more memory during startup.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@875 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-02 13:28:49 +00:00
Mark Cave-Ayland
6d590534bb Allow context-switching within the MMU TLB miss handlers on SPARC64, and use this to implement MMU miss handlers in C rather
than assembler.

In order to allow OpenSolaris to boot under OpenBIOS, it is necessary to be able to invoke Forth words from within the MMU 
I/D-TLB miss handlers, since Solaris 10 kernels hook into the virtual to physical address translation process via va>tte-data at 
boot time. Hence this patch implements two macros: SAVE_CPU_STATE and RESTORE_CPU_STATE which enable a context switch to occur 
from within these trap handlers.

Things are more complicated from within the MMU miss handlers because we can't use flushw to flush the processor registers to 
stack. This is because the memory pointed to by the stack pointer may not be in the TLB either, and so we'd end up in a 
recursive MMU trap. Hence we solve this by creating a static stack within OpenBIOS which is guaranteed to be locked in the TLB 
and storing all of our state there.

Once the ability to switch context has been implemented, it is possible to invoke C functions as per normal from within the MMU 
miss handlers. Hence as a proof of concept I've migrated the MMU miss handling code from ASM to C with a view of making the 
relevant changes to invoke the relevant Forth functions at a later date.

I'd also like to say thank you to Blue Swirl who took the time to answer all my questions and generally point out the 
shortcomings in my first attempts at SPARC assembler.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@874 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-02 12:10:45 +00:00
Mark Cave-Ayland
e9c1365d32 Increase IMAGE_STACK_SIZE to 16K from 8K.
The existing 8K stack used when switching context to run the executable payload was not enough. Increasing the stack to 16K 
solves the issue, preventing the payload from clobbering memory within OpenBIOS as it runs.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@873 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-01 22:29:16 +00:00
Blue Swirl
b60891b683 Avoid a lot of malloc/free traffic
Each console write caused temporary buffer allocation.

Avoid allocations by changing console_draw_str() to use Forth
string parameters, which are usually readily available.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@872 f158a5a8-5612-0410-a976-696ce0be7e32
2010-09-29 20:30:51 +00:00
Blue Swirl
e00c8ab982 Enable GCC warning flag -Wnested-externs, fix warnings
Move nested extern declarations into header files, or use the
already existing declarations.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@861 f158a5a8-5612-0410-a976-696ce0be7e32
2010-09-06 20:56:54 +00:00
Mark Cave-Ayland
28fed458ff Alter the MMU properties as suggested by the UltraSPARC-II device tree prtconf output in the Debian sparc-utils package and
Solaris 9 boot; i.e. remove the /CPU/mmu device, relocate its methods to /virtual-memory, and alter the /chosen mmu property so 
that it now points to /virtual-memory. This helps both Solaris 9 and OpenSolaris boot further along the way.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@859 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-25 16:58:55 +00:00
Mark Cave-Ayland
bb488d3045 Fix bug in SPARC64 CIF claim function - previously we were just allocating virtual memory rather than allocating both virtual
and physical memory and setting up an MMU mapping.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@856 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-22 21:23:19 +00:00
Blue Swirl
eec9e0d61b Drop some unused variables
Found with this Coccinelle script:
@@
type T;
identifier i;
expression E;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = E;
  ...+>
)

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@855 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-22 09:29:28 +00:00
Alexander Graf
736d3849ea Detect KVM hypervisor and set /hypervisor properties accordingly
The ePAPR spec requires us to have a /hypervisor node that tells the guest OS
which hypervisor it's running on and which hypercall to use to call into it.

So let's fetch all that information from Qemu's fw_cfg interface and put it
into place, making everyone happy.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@853 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-17 15:42:10 +00:00
Mark Cave-Ayland
0d2c29f1ef Commit better SPARC32 fix for obp_devclose().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@852 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-11 20:59:18 +00:00
Mark Cave-Ayland
287779605b Revert commit r850 - on reflection, keeping a separate v2 function for obp_devclose() seems a little excessive.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@851 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-11 20:57:53 +00:00
Mark Cave-Ayland
348083a52d Fix up obp_devclose on SPARC32 - Forth's close-dev doesn't actually return a result code, so we fix it as 1 (to indicate success) for the v0
callback as suggested by Google, and simply return nothing for the v2 callback as indicated by the romvec structure. This allows us to remove the 
extra POP() which was causing a stack underflow error which was affecting Solaris 8 installation kernel boot.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@850 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-11 16:41:36 +00:00
Blue Swirl
fd61e4c7a1 sparc32: move last fw_cfg user to openbios.c
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@849 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-10 18:16:46 +00:00
Blue Swirl
42e80be223 sparc32: move machine setup to openbios.c
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@848 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-10 17:51:53 +00:00
Blue Swirl
1042f8af0f sparc: fix partition probe, try two partitions
If the size of the partition currently being probed is zero,
fail the probe. This lets Forth code try the next candidate from
boot-device list.

Add explicit ':d' (Sparc32, 'f' for Sparc64) partition to
CDROM probe list, so we can remove the ugly forced partition logic.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@846 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-09 19:21:22 +00:00
Blue Swirl
96e9cbe4c4 sparc32: move CPU setup to openbios.c
Move initial banner printing, CPU setup and graphic_depth
setup to openbios.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@845 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-08 21:20:15 +00:00
Blue Swirl
09662545a3 sparc32: move stdio setup to openbios.c
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@844 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-08 20:03:38 +00:00
Blue Swirl
a1f0883238 sparc32: move /uuid property setup to openbios.c
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@843 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-08 19:54:06 +00:00
Blue Swirl
84518defd6 linux_load: fix open_io return value checks
open_io() returns -1 on error and 0 is a valid return value.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@841 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-08 18:28:48 +00:00
Mark Cave-Ayland
3fad9a0185 Bind the (go) function into the C equivalent go function arch/x86/boot.c (this should re-enable load/boot with the new unified
loader).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> 


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@837 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-07 12:05:02 +00:00
Mark Cave-Ayland
c62d099b4b Stop openbios-unix from crashing when auto-boot? is enabled.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@836 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-07 12:02:42 +00:00
Blue Swirl
0bad076169 Fix x86 build
CC    target/arch/x86/boot.o
../arch/x86/boot.c: In function 'go':
../arch/x86/boot.c:35: error: 'boot_notes' undeclared (first use in this function)

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@834 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-06 16:35:44 +00:00
Blue Swirl
b11569eb24 sparc32: fix pre-loaded kernel command line
Fix more breakage from r828:

For some reason, QEMU/Sparc32 does not set FW_CFG_CMDLINE_SIZE, so
we have to use FW_CFG_KERNEL_CMDLINE instead.

Setup romvec obp_arg.argv[1] and "boot-file" property.

Remove obsolete command line setup code from obio.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@832 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-03 20:48:23 +00:00
Blue Swirl
6e79d1d9c3 sparc32: fix NetBSD crash
Fix NetBSD crash when printing bootpath. Also fix generation of
compatibility paths when the bootpath includes partition
letter (e.g. 'disk:d'). Consider also 'cd' alias of 'cdrom'.

See also r244.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@831 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-03 18:39:27 +00:00
Blue Swirl
482249e794 Use standard types
Replace uchar, uint, ulong, u_char, u_int, u_long, u_int* with
their standard equivalents.

Fixes warnings like these on OpenBSD:
 CC    target/arch/unix/unix.o
In file included from ../arch/unix/unix.c:29:
../include/config.h:26: warning: redefinition of `ulong'
/usr/include/sys/types.h:56: warning: `ulong' previously declared here
../include/config.h:26: warning: redundant redeclaration of `ulong' in same scope

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@830 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 21:25:08 +00:00
Blue Swirl
626c95da21 Fix Unix target build
Fix build failure:
  LINK  openbios-unix
libopenbios.a(load.o)(.text+0xe0): In function `load':
../libopenbios/load.c:58: undefined reference to `elf_boot_notes'
libopenbios.a(load.o)(.text+0xe8):../libopenbios/load.c:58: undefined reference to `elf_boot_notes'

Move elf_boot_notes variable to load.c to make it also available on
Unix build. Also fix a spurious sys_info variable definition.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@829 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 21:15:14 +00:00
Mark Cave-Ayland
f9bdcf050c Rework the OpenBIOS internals so that boot, load and init-program now all use the unified libopenbios loader code with improved
IEEE-1275 spec compliance.

This patch implements the following:

1) Fix bootpath/bootargs handling so that default values are read from NVRAM, and allow multiple space-separated values to be 
specified.
2) With correct bootargs handling in place, move the ELF loader over to the new libopenbios unified loaders.
3) Remove all the loader code from all architecture directories sine we don't need it anymore.
4) Simplify the boot word so it invokes platform-specific code where required, then calls load and go as per the specification.

Tested on all my available images for SPARC32, SPARC64 and PPC, and compile-tested on x86.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@828 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 15:13:48 +00:00
Blue Swirl
f4564e0dc0 sparc32: fix context switching
Remove old hack to jump to loaded code and use switch_to().

Use FLUSH_ALL_KERNEL_WINDOWS macro from Linux.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@827 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 14:37:04 +00:00
Blue Swirl
9daf539c27 Fix Unix target build
Move sys_info to load.c to make it also available on Unix build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@826 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 11:03:45 +00:00
Mark Cave-Ayland
c0c7231b2d Fix up SPARC32 boot from CDROM.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@806 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-28 17:43:48 +00:00