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@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 */