[OpenBIOS] [PATCH 5/7] SPARC64: fix up translation property mode to make it a valid TTE

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun May 4 19:49:53 CEST 2014


NetBSD attempts to parse the translation property in order to set up the
virtual to physical translations for kernel. Alter the mode cell to
include the physical address and valid bit so that it represents a real
TTE entry for the given start adddress.

This is confirmed by checking real dumps from prtconf examples, plus the
NetBSD kernel now starts to boot.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 openbios-devel/arch/sparc64/ofmem_sparc64.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openbios-devel/arch/sparc64/ofmem_sparc64.c b/openbios-devel/arch/sparc64/ofmem_sparc64.c
index 005d774..5758a5d 100644
--- a/openbios-devel/arch/sparc64/ofmem_sparc64.c
+++ b/openbios-devel/arch/sparc64/ofmem_sparc64.c
@@ -103,12 +103,12 @@ void ofmem_arch_create_translation_entry(ucell *transentry, translation_t *t)
 
 		virtual address
 		length
-		mode 
+		mode (valid TTE for start of translation region)
 	*/
 
 	transentry[0] = t->virt;
 	transentry[1] = t->size;
-	transentry[2] = t->mode;
+	transentry[2] = t->phys | t->mode | SPITFIRE_TTE_VALID;
 }
 
 /* Return the size of a memory available entry given the phandle in cells */
-- 
1.7.10.4




More information about the OpenBIOS mailing list