Author: mcayland
Date: Tue Feb 8 23:06:51 2011
New Revision: 1021
URL: http://tracker.coreboot.org/trac/openbios/changeset/1021
Log:
Explicitly claim physical and virtual memory used by OpenBIOS in OFMEM under 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(a)siriusit.co.uk>
Modified:
trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c
Modified: trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c Tue Feb 8 23:06:49 2011 (r1020)
+++ trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c Tue Feb 8 23:06:51 2011 (r1021)
@@ -161,4 +161,10 @@
{
memset(&s_ofmem_data, 0, sizeof(s_ofmem_data));
s_ofmem_data.ofmem.ramsize = qemu_mem_size;
+
+ /* Claim reserved physical addresses at top of RAM */
+ ofmem_claim_phys(ofmem_arch_get_phys_top(), s_ofmem_data.ofmem.ramsize - ofmem_arch_get_phys_top(), 0);
+
+ /* Claim OpenBIOS reserved space */
+ ofmem_claim_virt(0xffd00000, 0x300000, 0);
}
Author: mcayland
Date: Tue Feb 8 23:06:49 2011
New Revision: 1020
URL: http://tracker.coreboot.org/trac/openbios/changeset/1020
Log:
Switch SPARC32 to use 2 address cells for addresses within the /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(a)siriusit.co.uk>
Modified:
trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c
Modified: trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c Tue Feb 8 23:06:46 2011 (r1019)
+++ trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c Tue Feb 8 23:06:49 2011 (r1020)
@@ -127,11 +127,7 @@
/* Return the size of a memory available entry given the phandle in cells */
int ofmem_arch_get_available_entry_size(phandle_t ph)
{
- if (ph == s_phandle_memory) {
- return 1 + ofmem_arch_get_physaddr_cellsize();
- } else {
- return 1 + 1;
- }
+ return 1 + ofmem_arch_get_physaddr_cellsize();
}
/* Generate memory available property entry for Sparc32 */
@@ -139,12 +135,7 @@
{
int i = 0;
- if (ph == s_phandle_memory) {
- i += ofmem_arch_encode_physaddr(availentry, start);
- } else {
- availentry[i++] = start;
- }
-
+ i += ofmem_arch_encode_physaddr(availentry, start);
availentry[i] = size;
}