Commit Graph

884 Commits

Author SHA1 Message Date
Andreas Färber
cb897515cc ppc64: Don't disable SF bit
Don't clear the MSR for the pure ppc64 version since it would disable
Sixty Four bit mode as well.

The MMU is supposed to be disabled by default.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@943 f158a5a8-5612-0410-a976-696ce0be7e32
2010-11-02 22:09:31 +00:00
Andreas Färber
f85cd4220b ppc: Use vector-local version of exception_return
On ppc64 the high 32 address bits are clear, so ba's sign extension
cannot be used to branch to the ROM version of exception_return.
Use a relative branch to the relocated version instead.

This fixes relocation linker errors for ppc64.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@942 f158a5a8-5612-0410-a976-696ce0be7e32
2010-11-02 22:07:27 +00:00
Andreas Färber
513b9da74b ppc: Label illegal vectors
Improve GDB backtrace by making the vector source less ambiguous.
A 0x700 program exception was shown as originating from vector__0x400.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@941 f158a5a8-5612-0410-a976-696ce0be7e32
2010-11-01 17:31:11 +00:00
Andreas Färber
595b99dc36 Consolidate cell format defines
When cross-compiling ppc64 from ppc (native larger than host),
%llx cell format leads to warnings.

The cell format depends solely on the cell type definition,
not on pointer sizes. Under the present assumption that native
smaller than host bitwidth occurs when cross-compiling a 32-bit
target from 64-bit host, we can reuse the definitions from the
equality path for all bitwidths.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@940 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-31 16:54:58 +00:00
Andreas Färber
52d7516592 Partially revert r917: Leave bootstrap functionality in kernel/cross.h
The base_address for native bitwidth smaller than host bitwidth
is available only in kernel/bootstrap.c and thus cannot be used
elsewhere.

The bitwidth equality code path will have to be enhanced
for different cell sizes instead.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@939 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-31 16:37:33 +00:00
Andreas Färber
ce371d6307 ofmem: CIF release preparations
Add an ofmem_release() function and stub out the implementation.

Hook it up for ppc and sparc64.

Cc: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@938 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-31 15:12:01 +00:00
Andreas Färber
b0158732da ppc: Add RTAS rtas-version property
The CHRP 1.0 spec defines it as 1, which matches the IBM JS20.
Macs appear to have it as 0x41 though.

v2:
* Authentically set it to 0x41 for Apple machines.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@937 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-31 10:30:22 +00:00
Andreas Färber
8d8e29fce6 ppc: Don't set up RTAS for OldWorld Macs
According to historical device trees, pre-iMac Macs do not seem to
have the /rtas node.

Make /rtas conditional to NewWorld Macs for now, while allowing to
extend this to future CHRP machines.

This means that the ppc-softmmu would by default not have it,
except when using -M mac99. ppc64-softmmu would get it by default.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@936 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-31 10:21:50 +00:00
Andreas Färber
b544062187 ppc: Typo fix
It's Old World vs. New World Macs.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@935 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-31 09:59:12 +00:00
Andreas Färber
d1c94b88f4 ppc: Add support for -cpu 970
The 970fx is supported, which happens to be the default CPU for -M mac99.
The IBM JS20 had a dual 970 though, and -cpu 970 leads to a busy loop:

>> Unknown cpu (pvr 390000), freezing!

Add a definition for the 970.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@934 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 22:49:20 +00:00
Andreas Färber
8356ea4eb9 Don't make assumptions about device address size
Prefer phys_addr_t for physical addresses.

Resort to uintptr_t where a conversion to pointer occurs,
since the physical address may be larger (e.g., sparc32).

v2:
* Use phys_addr_t.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@933 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 16:26:02 +00:00
Andreas Färber
70bbfcf6ce Introduce physical address type
Define phys_addr_t type for all architectures.

v2:
* Add comment on PAE for x86, pointed out by Blue.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@932 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 16:18:08 +00:00
Andreas Färber
e9b37f6048 ppc64: Quickfix for pointer2cell() and cell2pointer()
Add a uintptr_t cast as an interim solution to resolve errors for ppc64,
where pointer size is larger than cell size.

v2:
* Add comment on potential better fix.
  Postpone potential conversion to inline function until investigated.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@931 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 16:15:17 +00:00
Andreas Färber
ead25906f6 Don't assume that pointer and cell size are identical, part 2
Do the double-dereference in two cell2pointer steps
to avoid garbage in the high 32 address bits on ppc64.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@930 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 15:44:08 +00:00
Andreas Färber
545998848f ppc: Don't hardcode "ppc" arch for openbios-qemu.elf
Use $(ARCH) to allow using a different linker script for ppc64.

v2:
* Add ppc64/qemu/ldscript, derived from ppc/qemu/ldscript.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@929 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 15:33:11 +00:00
Andreas Färber
fe0ba35811 switch-arch: Whitelist targets that need int128_t
ppc64 doesn't use int128_t and thus fails to build when NEED_FAKE_INT128_T
gets defined, due to its use in include/kernel/stack.h.

Continue to use it for all other targets for which "$targetlongbits" = "64".

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@928 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 15:19:58 +00:00
Andreas Färber
7df85c1458 switch-arch: Prepare ppc64 support
Detect ppc64 as Big Endian and 64-bit.
Reuse arch/ppc/ wherever possible.

v3:
* Split off int128_t fix.
* Rebase to HEAD, add support for qemu-ppc64 target.
* Rename $INCLUDEARCH to $BASEARCH and initialize it earlier.
* Set both CONFIG_$BASEARCH and CONFIG_$ARCH if they differ.
* Use -fno-builtin.
* Add ppc64 config, copied from ppc.

v2:
* Use powerpc64 prefix.
* Disable fake int128_t for everything but sparc64.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@927 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 15:17:37 +00:00
Andreas Färber
74e8d516b5 switch-arch: Force cross-compilation on Mac OS X host
r879 broke ppc cross-compilation from Darwin/ppc host.
Symptom is that the assembler chokes on arch/ppc/qemu/start.S.

Always use a cross-compiler on Darwin host
since *-apple-darwin*-{gcc,ld} would produce Mach-O binaries.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@926 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 13:35:07 +00:00
Mark Cave-Ayland
e47c3e71ed Alter SPARC32 memory routines so that they also update the relevant /memory and /virtual-memory properties.
The existing routines hard-coded the initial values into the device tree at startup, and then didn't update them which could 
allow the romvec memory lists and the device tree memory properties to become out of sync.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@925 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 13:18:31 +00:00
Andreas Färber
412b9e663b adb: Don't assume that pointers fit in 32 bits
The adb_dev_t state field is used to store a adb_kbd_t pointer.
It is unused in the mouse driver.

v2:
* Change field type from uint32_t to void* to avoid uintptr_t casts
  in keyboard driver.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@924 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 12:22:06 +00:00
Mark Cave-Ayland
36d943f6d3 Change SPARC32 memory allocator to allocate memory starting from just below the OpenBIOS image downwards.
The existing code appeared to be allocating memory from the wrong property (map rather than avail) and so rather than allocating 
memory starting from just below the OpenBIOS image downwards, it was simply reducing the reported size of the OpenBIOS image.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@923 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-28 20:53:58 +00:00
Andreas Färber
380cd335cc Don't assume that pointer and cell size are identical, part 1
On ppc64, cell size is 32 bits but pointers are 64-bit.
Thus, direct casts result in warnings, treated as errors.

Use [u]intptr_t cast or cell2pointer and pointer2cell macros as necessary.

v2:
* Drop changes related to physical addresses since physical addresses may be
  wider than pointers (e.g., 36 bits on sparc32, as pointed out by Blue).
* Drop changes to cell2pointer() and pointer2cell() for now.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@922 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-25 20:48:45 +00:00
Andreas Färber
28516584d1 CIF: Fix trace output for claim and release
A misplaced digit 8 made it look as if some signedness issue was present
somewhere between libopenbios/client.c:of_client_interface() and
arch/ppc/qemu/methods.c:ciface_claim(). This is not the case;
despite unsigned long -> ucell -> cell -> ucell conversions,
PUSH'ing 0x81234567 and POP'ing works as expected.

Fix the format string to avoid such confusion.
Add zero-padding while at it.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@921 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-25 19:26:40 +00:00
Mark Cave-Ayland
e31f031549 Reduce SPARC32 stack space since otherwise compiling with -O0 results in a 'rom: requested regions overlap (rom
/home/build/rel-qemu-git/share/qemu/openbios-sparc32. free=0x0000000070101000, addr=0x0000000070000000)
rom loading failed' error when starting qemu.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@920 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-24 21:34:21 +00:00
Mark Cave-Ayland
d0b1458780 Commit more readable version of obp_fortheval_v2 as posted to the mailing list, plus increase the default client image stack
size on SPARC32 to help Solaris 8 boot.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@919 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-24 20:20:14 +00:00
Mark Cave-Ayland
d92b811c6e Use wrappers around all romvec functions on SPARC32 to flush register window and preserve global registers.
This appears to resolve issues with OpenBIOS crashing when calling OBP functions through the romvec interface due to 
stack/register issues. Note that this patch also implements pv_printf() and pv_putstr() which appears to fix issues with 
displaying error messages during Solaris 8 boot.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@918 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-24 19:55:27 +00:00
Andreas Färber
fbfaaa780f Move cell2pointer and pointer2cell macros
These will be needed elsewhere for ppc64.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@917 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-24 18:55:59 +00:00
Andreas Färber
73d261ad4a Introduce [u]intptr_t type
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@916 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-24 18:48:18 +00:00
Mark Cave-Ayland
3dbab02fc2 Fix the placing of Forth arguments on the stack when calling obp_fortheval_v2() via romvec on SPARC32.
The extra stack arguments are actually placed within %o1-%o5 but unfortunately there doesn't seem to be a way of passing the 
number of parameters using the romvec API. Hence we go through the argument list and start pushing arguments onto the Forth 
stack from the first non-zero argument before executing the Forth string.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@915 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-18 19:32:16 +00:00
Andreas Färber
dd6027703d ppc: Move noreturn attribute
Otherwise GCC 4.2.4 complains that panic() marked noreturn does return.

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@914 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-17 12:15:44 +00:00
Mark Cave-Ayland
380f978e45 Fix comment typo from r896 as pointed out by Andreas.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@913 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-17 09:13:14 +00:00
Mark Cave-Ayland
711e388514 Fix up the new 2>r, 2r> and 2r@ words.
As pointed out by Tarl, since these are called as separate words (and not inline), we need to preserve the top-most R stack item 
as this is return address of the word itself.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@912 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-17 09:10:09 +00:00
Mark Cave-Ayland
238ba3218d Add Forth words 2>r, 2r> and 2r@ as described in the ANSI Forth core extensions as they are 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@911 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 22:37:31 +00:00
Mark Cave-Ayland
417c8b97e2 Force any errors in the CIF interpret word to reset the Forth engine back to the Forth interpret state.
This fixes various errors being caused by previous calls to CIF interpret throwing exceptions whilst in the Forth compile 
state. Without this fix, subsequent calls to CIF interpret could be executed erroneusly in Forth compile state rather than the 
Forth interpret state causing hard-to-detect Forth errors.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@910 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 22:21:51 +00:00
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
Mark Cave-Ayland
a32ba29f8b Change OFMEM so that the generated available, physical and virtual properties are passed by reference into Forth.
The previous code used the standard set_property() function which copies the new property into the dictionary each time the 
property is set. During OpenSolaris boot, this would cause OpenBIOS to run out of memory due to large number of changes to the 
memory regions.

Now for each property we have a static buffer allocated within OpenBIOS which starts from 2K and doubles in size everytime the 
memory region is exhausted, and set the address directly to the relevant buffer. This saves a great deal of memory and prevents 
the dictionary and internal memory regions from being exhausted during OpenSolaris boot.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@896 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 14:02:18 +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
43221313e3 Fix getprop return value
According to IEEE 1275, "Size is either the actual size of the property,
or –1 if name does not exist."

The property might be larger than the client's buffer, so don't dup
the min used for writing into the buffer but the original proplen value.
Insert a comment to show what's going on.

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@894 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-09 10:16:33 +00:00