[OpenBIOS] [PATCH 2/2] Switch SPARC32 to use 2 address cells for addresses within the /virtual-memory available property.
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Sat Jan 8 13:27:57 CET 2011
This matches the format of the /virtual-memory available property generated by OBP under QEMU.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>
---
openbios-devel/arch/sparc32/ofmem_sparc32.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/openbios-devel/arch/sparc32/ofmem_sparc32.c b/openbios-devel/arch/sparc32/ofmem_sparc32.c
index aee736a..0f5e535 100644
--- a/openbios-devel/arch/sparc32/ofmem_sparc32.c
+++ b/openbios-devel/arch/sparc32/ofmem_sparc32.c
@@ -127,11 +127,7 @@ void ofmem_arch_create_translation_entry(ucell *transentry, translation_t *t)
/* Return the size of a memory available node 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 @@ void ofmem_arch_create_available_entry(phandle_t ph, ucell *availentry, phys_add
{
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;
}
--
1.7.2.3
More information about the OpenBIOS
mailing list