mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Move creation of MMU translation property entries into architecture-specific files, rather than in ofmem_common.c. This is because different architectures have
different translation entries described within the OF platform bindings. With thanks to Andreas Färber and Igor Kovalenko. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@772 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Mark Cave-Ayland
parent
389529217e
commit
12eab86f39
@@ -141,6 +141,30 @@ retain_t *ofmem_arch_get_retained(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ofmem_arch_get_translation_entry_size(void)
|
||||
{
|
||||
/* Return size of a single MMU package translation property entry in cells */
|
||||
return 4;
|
||||
}
|
||||
|
||||
void ofmem_arch_create_translation_entry(ucell *transentry, translation_t *t)
|
||||
{
|
||||
/* Generate translation property entry for PPC. According to the
|
||||
platform bindings for PPC (http://playground.sun.com/1275/bindings/ppc/release/ppc-2_1.html#REF34579)
|
||||
a translation property entry has the following layout:
|
||||
|
||||
virtual address
|
||||
length
|
||||
physical address
|
||||
mode
|
||||
*/
|
||||
|
||||
transentry[0] = t->virt;
|
||||
transentry[1] = t->size;
|
||||
transentry[2] = t->phys;
|
||||
transentry[3] = t->mode;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* OF private allocations */
|
||||
/************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user