Commit Graph

13 Commits

Author SHA1 Message Date
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
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
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
59cbed0d8a ofmem: Fix and enable ofmem_claim() trace output
A printk statement was commented out and there were format string mismatches for ppc target.
Use OFMEM_TRACE to more easily enable/disable it and use FMT_ucellx as in other trace output.
Note that this changes the alignment from decimal to hexidecimal notation.

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@881 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-03 14:28:12 +00:00
Mark Cave-Ayland
12eab86f39 Move creation of MMU translation property entries into architecture-specific files, rather than in ofmem_common.c. This is because different architectures have
different translation entries described within the OF platform bindings. With thanks to Andreas Färber and Igor Kovalenko.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@772 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-21 11:07:53 +00:00
Mark Cave-Ayland
389529217e Move the retained magic block to the top of physical RAM and implement code that should do the right thing. Probably needs more
testing though.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@771 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-03 11:29:38 +00:00
Mark Cave-Ayland
ca0f9c5a03 Commit partial implementation of SUNW,retain for SPARC64 based upon the existing physical allocation routines. I've been unable
to finish the code and test retention after a restart since the OpenBIOS words reset and reset-all don't seem to work at the 
moment. However, it enables OpenSolaris boot to get further in the meantime.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@766 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-02 19:26:29 +00:00
Mark Cave-Ayland
d183b53338 Promote out of memory messages from debug level to standard console messages. This makes it possible to determine that you've
not allocated enough memory in qemu without having to rebuild with CONFIG_DEBUG_OFMEM enabled.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@763 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-30 21:56:29 +00:00
Mark Cave-Ayland
2f18dff299 Revert r739 since the update translations code only updates the OpenBIOS properties and not the real MMU translations.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@740 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-12 10:03:05 +00:00
Mark Cave-Ayland
35a7ef00a2 Don't try and update the MMU mappings when claiming physical memory. This is probably related to r737 and seems to solve an
issue whereby Forth starts doing strange things just after attemping a claim on physical memory resource.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@739 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-10 11:08:57 +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
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
dbf16392cc Refactoring of the OpenBIOS source code, as discussed on the mailing list. The primary aim of this process is to try and arrange
the source files into a structure whereby it is easier to find the relationship between a forth package word and its C 
implementation, while also creating a libopenbios library into which more common code from the arch/ tree can eventually be 
moved.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@685 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-13 10:58:19 +00:00