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
@@ -182,15 +182,15 @@ static void ofmem_update_mmu_translations( void )
|
||||
for( t = ofmem->trans, ncells = 0; t ; t=t->next, ncells++ ) {
|
||||
}
|
||||
|
||||
props = malloc(ncells * sizeof(ucell) * 3);
|
||||
props = malloc(ncells * sizeof(ucell) * ofmem_arch_get_translation_entry_size());
|
||||
|
||||
if (props == NULL)
|
||||
return;
|
||||
|
||||
/* Call architecture-specific routines to generate translation entries */
|
||||
for( t = ofmem->trans, ncells = 0 ; t ; t=t->next ) {
|
||||
props[ncells++] = t->virt;
|
||||
props[ncells++] = t->size;
|
||||
props[ncells++] = t->mode;
|
||||
ofmem_arch_create_translation_entry(&props[ncells], t);
|
||||
ncells += ofmem_arch_get_translation_entry_size();
|
||||
}
|
||||
|
||||
set_property(s_phandle_mmu, "translations",
|
||||
|
||||
Reference in New Issue
Block a user