aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-06-17ppc: add POWER4 cpu descriptionAlexander Graf1-0/+12
So far, we only supported the 970fx CPU type inside guests. Unfortunately, that CPU supports Altivec. Not all KVM capable host CPUs do have altivec though, so they're left out in the rain when running openbios in the guest. This patch adds POWER4 CPU description, allowing users to specify at least one CPU type that does not require Altivec, but is still 64-bit capable. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1042 f158a5a8-5612-0410-a976-696ce0be7e32
2011-05-22ppc64: Don't set Kp bit on SLBAndreas Färber1-1/+3
Since QEMU 81762d6dd0d430d87024f2c83e9c4dcc4329fb7d (Clean up PowerPC SLB handling code) we never got to the ppc64 OpenBIOS banner. According to Alex' debugging this is due to the Kp bit being set. The code was supposed to be a 1:1 translation of the old mtsrin code, which did not set Kp bit. So don't set Kp bit with slbmte. Introduce a define for the shift, suggested by Alex. 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@1041 f158a5a8-5612-0410-a976-696ce0be7e32
2011-05-22switch-arch: remove non-standard "local" keywordKenneth Salerno1-2/+2
Remove the non-standard "local" keyword from within the crosscflags() function. This was not necessary since the variables "host" and "target" were not clobbered anywhere outside of the function, but the real motivation is to support shells such as ksh93 that do not have the "local" builtin like bash. Signed-off-by: Kenneth Salerno <kennethsalerno@yahoo.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1040 f158a5a8-5612-0410-a976-696ce0be7e32
2011-05-08Fix the Forth boot word if the current package is not /chosen under SPARC32.Mark Cave-Ayland1-3/+5
Ensure that we deselect the current package before defining the platform-specific boot words so that they are created in the global dictionary and not the current instance dictionary. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1039 f158a5a8-5612-0410-a976-696ce0be7e32
2011-05-06Disable mixing of DMA and FIFO messages in the Solaris ESP kernel module.Mark Cave-Ayland1-0/+8
QEMU's ESP emulation currently does not support the mixing of DMA and FIFO messages. Setting the scsi-options property prevents the Solaris ESP kernel module from trying to use this feature by default, which otherwise would cause boot to fail. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1038 f158a5a8-5612-0410-a976-696ce0be7e32
2011-04-27Fix up LANCE ethernet DMA mapping under Solaris 8 on SPARC32.Mark Cave-Ayland2-3/+53
It seems that Solaris doesn't set up a DMA mapping for the LANCE DMA buffers and hence must inherit this from OpenBIOS. To make things more complicated, Solaris appears to assume that the buffers are fixed at 0xff000000 rather than detecting this information from the OpenBIOS IOMMU pagetable before switching. Mimicking this behaviour with a fixed location allows Solaris 8 to correctly use the network card under QEMU. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1037 f158a5a8-5612-0410-a976-696ce0be7e32
2011-04-27Set properties to disable carrier detection on the serial ports for SPARC32.Mark Cave-Ayland1-0/+10
This prevents the Solaris 8 kernel from freezing during boot after detecting the serial ports. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1036 f158a5a8-5612-0410-a976-696ce0be7e32
2011-04-22Implement new v3_memalloc romvec interface for allocating aligned memory.Mark Cave-Ayland6-12/+29
When attempting to load kadb from a Solaris 8 CD at boot, it seems that in order for kadb to allocate enough memory to load the kernel (and its modules) the /openprom/aligned-allocator property must be present with length zero. This has the additional side-effect that OpenBIOS memory allocations are redirected to a new romvec offset when this property is detected, which appears to have a similar interface to obp_dumb_memalloc() but with an extra alignment parameter. Hence we include a simple implementation which seems to be enough to be able to get kadb to load and attach to the kernel. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1035 f158a5a8-5612-0410-a976-696ce0be7e32
2011-04-08Enforce physical alignment based upon size for the SPARC32 romvec ↵Mark Cave-Ayland1-1/+20
obp_dumb_memalloc() function. It appears that Solaris assumes that the resulting memory is physically aligned based upon the value of size. Make sure we also respect this alignment, so that memory allocated using this interface can be correctly used for the Solaris IOMMU page tables. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1034 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-18Fix level 14 and level 10 timers under Solaris 8 on SPARC32.Mark Cave-Ayland1-2/+2
During boot, if the level 14 timer limit is not set then the Solaris kernel panics with a division by zero error. Fix this by setting it to the default value as documented in obio.h. Also if the level 10 timer is not set with a limit of 0, the Solaris kernel constantly outputs "spurious interrupt at processor level 10" messages during boot. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1033 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-17ESP : Fix SCSI READ command lengthOlivier Danet1-2/+2
Signed-off-by: Olivier Danet <odanet@caramail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1032 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-13Tidy cell types and format stringsAndreas Färber6-24/+24
Always define [u]cell in terms of fixed-width POSIX types, so that their PRI* macros can be reused. Signed-off-by: Andreas Färber <andreas.faerber@web.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1031 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-13ppc: Use inttypes.hAndreas Färber1-1/+1
It defines the PRI* macros for the host. Cf. r1026. Signed-off-by: Andreas Färber <andreas.faerber@web.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1030 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-13ppc64: Re-enable SF bit after returning from ELF binaryAndreas Färber2-0/+7
When returning from the binary, enable Sixty-Four Bit Mode. Leave it disabled on entry, as enabling it breaks multiple guests. Signed-off-by: Andreas Färber <andreas.faerber@web.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1029 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-13libopenbios: Adapt CIF handling for ppc64Andreas Färber7-132/+207
On ppc64, currently neither long nor pointers can be used for the client interface. Introduce new types prom_[u]arg_t as abstraction and add helpers get_service() and arg2pointer() as well as format strings. Signed-off-by: Andreas Färber <andreas.faerber@web.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1028 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-13Add remaining PRI* macrosAndreas Färber3-0/+16
For sparc32 some format macros had been added already. For symmetry, add PRI{d,u}64, too, and PRI{d,u}{32,64} for the other architectures as well. Add PRIX{32,64} for all. Signed-off-by: Andreas Färber <andreas.faerber@web.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1027 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-12PRI* macros need inttypes.hAndreas Färber5-5/+5
Ever since introducing PRI* macros for FMT_plx, we risked using them during bootstrap. According to POSIX.1-2008 the PRI* macros are defined in inttypes.h, which in turn includes stdint.h. Signed-off-by: Andreas Färber <andreas.faerber@web.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1026 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-12sparc32: fix __context corruption in __switch_context_nosaveArtyom Tarasenko1-4/+8
__switch_context_nosave shall not write to __context, only read it. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1025 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-08OFMEM: Fix bogus tail entry added to the end of the virtual memory available ↵Mark Cave-Ayland1-1/+1
list. Since top_address is 64-bit, the existing code would incorrectly think that the end of virtual memory had not been reached and so add a bogus tail entry. Casting -1 to ucell should ensure that we pass the correct top address for virtual memory. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1024 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-08OFMEM: Fix missing ofmem_update_translations() calls.Mark Cave-Ayland1-0/+5
Otherwise the device tree properties will not always get updated to reflect the current memory ranges. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1023 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-08Fix up /virtual-memory reg property on SPARC32.Mark Cave-Ayland2-19/+25
Make it similar to the OBP output with 2 entries consisting of half the virtual address space. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1022 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-08Explicitly claim physical and virtual memory used by OpenBIOS in OFMEM under ↵Mark Cave-Ayland1-0/+6
SPARC32. This is required to ensure that Solaris doesn't consider the memory used by OpenBIOS as available when interpreting the memory lists. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1021 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-08Switch SPARC32 to use 2 address cells for addresses within the ↵Mark Cave-Ayland1-11/+2
/virtual-memory available property. This matches the format of the /virtual-memory available property generated by OBP under QEMU. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1020 f158a5a8-5612-0410-a976-696ce0be7e32
2011-02-08Delegate construction of memory "available" property to each architecture.Mark Cave-Ayland6-22/+85
This is required because some architectures do not strictly follow the convention of using physical addresses sizes in the /memory node and virtual addresses in the /virtual-memory node. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1019 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-30ppc: avoid runtime relocationsBlue Swirl4-11/+27
Because the sizes of cells and pointers do not match on PPC64, relocations of an ucell array using the address of the array itself can't be computed by the linker. Use a fixed address on PPC64 for the array, so we can use a fixed ucell sized constant for the relocation offset. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1018 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-30x86: avoid runtime relocationsBlue Swirl3-15/+15
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1017 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-30sparc64: avoid runtime relocationsBlue Swirl4-14/+16
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1016 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-30sparc32: avoid runtime relocationsBlue Swirl6-22/+92
The Forth dictionary was relocated at run time, incurring also a copy operation. The source dictionary remained in memory. It was not possible to run forthstrap without any input files besides the base dictionary. Make forthstrap generate a hex dump which can be included in C, but also contains relocations, so that relocations are performed by the linker at compile time. Allow dictionary compilation with no source files. Don't allocate the dictionary dynamically; reduce ofmem supply accordingly. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1015 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-08Fix some memory leaksBlue Swirl2-0/+2
Fix memory leaks reported by cppcheck: [../packages/pc-parts.c:291]: (error) Memory leak: parstr [../libopenbios/bootinfo_load.c:172]: (error) Memory leak: bootscript Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1014 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Generate Makefile dependencies also from Forth filesBlue Swirl3-4/+34
Dependencies between Forth files were not detected, so dictionaries were not regenerated automatically in some cases. Introduce '-M' flag to forthstrap to dump dependency information in Makefile compatible format, based on the Forth 'include' directives. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1013 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Add extra debugging to display the parameters being passed to ↵Mark Cave-Ayland1-1/+1
obp_fortheval_v2() on SPARC32. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1012 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Register SPARC32 auxio device and correctly encode virtual addresses in the ↵Mark Cave-Ayland1-4/+1
OBIO device tree. Once the auxio device is registered, we must also correct the address properties which currently set a 64-bit rather than a 32-bit property. This fixes error messages related to auxio when attempting to boot a Solaris 8 CD. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1011 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Fix the FMT_cell and FMT_ucell definitions for SPARC32.Mark Cave-Ayland1-2/+4
This is required to enable a build with CONFIG_DEBUG_OFMEM set to true to complete successfully. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1010 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Switch remaining SPARC32 code over to OFMEM.Mark Cave-Ayland3-47/+21
This patch removes the SPARC32-specific map_pages() function from the IOMMU driver, plus switches obp_dumb_memalloc() over to use OFMEM. OFMEM property generation is enabled for the /memory and /virtual-memory nodes, and any remaining traces of the old memory variables are removed. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1009 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Switch all SPARC32 devices over from the private map_io() function over to ↵Mark Cave-Ayland9-39/+15
OFMEM's ofmem_map_io() function. The old map_io() function can now be removed. Also fill in ofmem_arch_early_map_pages() on SPARC32 which is required for ofmem_map_io() to work correctly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1008 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Implement ofmem_map_io() within OFMEM as a function to map I/O memory ↵Mark Cave-Ayland5-2/+93
(similar to SPARC32's private map_io() function). As a consequence we need to maintain a separate I/O range within OFMEM, and add management functions similar to those that exist for the virtual and physical ranges. At the same time, we introduce a couple of new OFMEM arch functions called ofmem_arch_get_iomem_base() and ofmem_arch_get_iomem_top() to control the range of allocatable I/O memory which is again similar to the existing method used for the virtual and physical ranges. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1007 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Introduce ofmem_arch_io_translation_mode() to allow an OFMEM arch to specify ↵Mark Cave-Ayland6-18/+23
different MMU modes for I/O memory mapped regions. Once this is in place, we can switch SPARC32's map_pages() over to use the MMU mode directly to bring it in line with the existing OFMEM API. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1006 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Remove the existing map_page() function and instead install a transitional ↵Mark Cave-Ayland3-49/+34
API using map_pages() which is almost identical to the OFMEM API. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1005 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Switch SPARC32 over to use OFMEM's malloc()/free() internally rather than ↵Mark Cave-Ayland3-114/+11
using it's own implementation. Also juggle the memory to take into account that the allocations are coming from OFMEM, and remove posix_memalign2() since it is no longer required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1004 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Add ofmem_init() function to openbios.c taking into account that unlike ↵Mark Cave-Ayland1-0/+4
SPARC64, OFMEM needs to be setup *before* the MMU so that the page table allocation routines can use it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1003 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Switch IOMMU posix_memalign() calls over to ofmem_posix_memalign(), and then ↵Mark Cave-Ayland3-18/+2
remove the private SPARC32 posix_memalign() implementation since it is no longer required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1002 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Switch SPARC32 page tables over to use OFMEM's ofmem_posix_memalign() rather ↵Mark Cave-Ayland2-6/+5
than its internal posix_memalign() function. This requires a corresponding increase in the memory allocated to OFMEM in order to store the page tables. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1001 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Alter the SPARC32 entry.S file to allow extra space for the page tables to ↵Mark Cave-Ayland1-16/+36
handle OpenBIOS images up to 2MB. Currently the page tables only allow enough space for a 1.5MB image; however during testing/development it was useful to temporarily allow larger images for debugging. Note that if larger ROM sizes are required for testing, it is necessary to patch qemu to raise the hardcoded limit there too. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1000 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Reduce memory of the Forth machine to 16k.Mark Cave-Ayland2-3/+3
Since this memory is only being used by alloc-mem and free-mem then the majority of memory allocations will not actually be taken from this pool but from the C malloc()/free() implementations instead. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@999 f158a5a8-5612-0410-a976-696ce0be7e32
2011-01-02Change the SPARC32 build system so that OFMEM is now included within SPARC32 ↵Mark Cave-Ayland4-0/+148
builds. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Tested-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@998 f158a5a8-5612-0410-a976-696ce0be7e32
2010-12-30Fix ofmem_posix_memalign() so that it also enforces physical alignment when ↵Mark Cave-Ayland1-1/+5
re-allocating memory from the freelist. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@997 f158a5a8-5612-0410-a976-696ce0be7e32
2010-12-30Change OFMEM to allocate memory from the top of RAM downwards.Mark Cave-Ayland1-2/+2
At the moment OFMEM allocates memory from the bottom of RAM upwards, however many loaders/kernels initialise themselves in lower memory areas which can cause them to be overwritten by subsequent memory allocations. Mimic the existing SPARC32 behaviour by allocating physical and virtual memory from the top of RAM downwards. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@996 f158a5a8-5612-0410-a976-696ce0be7e32
2010-12-30Introduce ofmem_arch_get_phys_top() for specifying the top of physical ↵Mark Cave-Ayland4-4/+19
memory in OFMEM. At the same time, teach OFMEM to make use of it when calculating the /memory available property. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@995 f158a5a8-5612-0410-a976-696ce0be7e32
2010-12-30Alter ofmem_posix_memalign() so that the resulting pointer is aligned for ↵Mark Cave-Ayland1-3/+8
both physical and virtual addresses. Some uses of ofmem_posix_memalign() need to ensure that the alignment requirement is for physical as well as virtual addresses, e.g. for MMU page tables. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@994 f158a5a8-5612-0410-a976-696ce0be7e32
2010-12-30Introduce va2pa() and pa2va() functions for PPC for subsequent use by OFMEM.Mark Cave-Ayland1-0/+21
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@993 f158a5a8-5612-0410-a976-696ce0be7e32