Commit Graph

18 Commits

Author SHA1 Message Date
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
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
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
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
Mark Cave-Ayland
1dbe55b8e4 Move the basic OpenBIOS configuration header files from include/openbios to include/.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@695 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 17:19:58 +00:00
Mark Cave-Ayland
da4cc1d0bd Move the driver header files into include/drivers to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@692 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 15:19:41 +00:00
Mark Cave-Ayland
4a2c065e4f Move the libopenbios header files into include/libopenbios to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@691 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 15:05:53 +00:00
Mark Cave-Ayland
259edb2d3b Finish move of architecture-specific header files, with modifications to the header paths as required.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@688 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 13:54:45 +00:00
Mark Cave-Ayland
ba52470cce In the IEEE 1275-1994 specification the parameters for Client Interface calls
are not in forth stack order but in reversed (heh!) order. Our implementation
confused this.

This second patch is fairly straightforward; probably the only unexpected part is
the need to rename the existing /openprom/client-services "claim" and
"release" words to "cif-claim" and "cif-release" respectively. This is
because we need to use the "claim" and "release" words in
forth/system/ciface.fs to reverse the argument order before calling the real
underlying words.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@637 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-02 10:44:35 +00:00
Blue Swirl
5fd89d6537 migrate ppc/qemu ofmem implementation to ucell parameter type (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@521 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:02:32 +00:00
Blue Swirl
6b052af925 Use ucell type to pass ofmem arguments (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@513 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-31 11:10:38 +00:00
Laurent Vivier
e85a0d9bde PowerPC: Fix milliseconds prom call
The current implementation of the milliseconds prom call on PowerPC is
totally buggy:
- The timer frequency returned by get_timer_freq() does not correspond
  to the timer which is read.
- The dividend and the divisor of the division are swapped
- If called very often, this function is not precise
- Depending on the timer frequency and of the frequency of the calls,
  the variable overflow after a few dozen of seconds.

Please find in this patch a totally new implementation. This fixes the
problem observed with the quik when a timeout is defined.

The timer frequency is defined using #define, I wonder if there is a
better place to put it.

It reads both low and high part of the timer to make sure there is no
overflow. It also removes the function that returns 0 on the first call
as this is not needed according to IEEE 1275-1994. Finally it computes
the real value of the timer each time, instead of adding a small value
to a variable at each function calls, in order to get a correct
precision if this method is call very often.

(Aurelien Jarno)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@407 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-14 23:25:41 +00:00
Blue Swirl
432a08e8a1 Store opened "mmu" in "/chosen" (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@370 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:58:33 +00:00
Blue Swirl
b2692171f9 Correct duplicate /cpus and more (Laurent Vivier)
Correct duplicate /cpus
Correct mmu properties in /chosen
Add mmu methods to /cpus/<cpu>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@341 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-02 07:41:40 +00:00
Blue Swirl
e7b906fd86 Fix gcc and Sparse warnings generated by r301
git-svn-id: svn://coreboot.org/openbios/openbios-devel@302 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 09:15:57 +00:00
Laurent Vivier
e11b806d1c qemu better support
This patches copies all needed ppc files to qemu and modifies them.

The generated OpenBIOS image must be loaded at adresse 0xfff00000 by  Qemu.

It is able to load Yaboot from disk and Yaboot is able to load Linux, but Linux hangs somewhere... of course it needs more work (but this cleans up my patch queue).

Thank you to Blue Swirl and Aurelien Jarno for their help.

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@301 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 08:30:42 +00:00
Blue Swirl
7e21fc929d Fix almost all remaining warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@294 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 17:15:47 +00:00
Laurent Vivier
fe82df644b Create arch/ppc/qemu by copying arch/ppc/pearpc.
Signed-off-by: Laurent Vivier <Laurent@lvivier.info> 
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@253 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:16:22 +00:00