mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix bug in SPARC64 CIF claim function - previously we were just allocating virtual memory rather than allocating both virtual
and physical memory and setting up an MMU mapping. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@856 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Mark Cave-Ayland
parent
eec9e0d61b
commit
bb488d3045
@@ -417,6 +417,27 @@ mem_retain ( void )
|
|||||||
PUSH(phys >> 32);
|
PUSH(phys >> 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ( virt size align -- baseaddr|-1 ) */
|
||||||
|
static void
|
||||||
|
ciface_claim( void )
|
||||||
|
{
|
||||||
|
ucell align = POP();
|
||||||
|
ucell size = POP();
|
||||||
|
ucell virt = POP();
|
||||||
|
ucell ret = ofmem_claim( virt, size, align );
|
||||||
|
|
||||||
|
/* printk("ciface_claim: %08x %08x %x\n", virt, size, align ); */
|
||||||
|
PUSH( ret );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ( virt size -- ) */
|
||||||
|
static void
|
||||||
|
ciface_release( void )
|
||||||
|
{
|
||||||
|
POP();
|
||||||
|
POP();
|
||||||
|
}
|
||||||
|
|
||||||
DECLARE_NODE(memory, INSTALL_OPEN, 0, "/memory");
|
DECLARE_NODE(memory, INSTALL_OPEN, 0, "/memory");
|
||||||
|
|
||||||
NODE_METHODS( memory ) = {
|
NODE_METHODS( memory ) = {
|
||||||
@@ -493,6 +514,6 @@ void ob_mmu_init(const char *cpuname, uint64_t ram_size)
|
|||||||
|
|
||||||
push_str("/openprom/client-services");
|
push_str("/openprom/client-services");
|
||||||
fword("find-device");
|
fword("find-device");
|
||||||
bind_func("cif-claim", mmu_claim);
|
bind_func("cif-claim", ciface_claim);
|
||||||
bind_func("cif-release", mmu_release);
|
bind_func("cif-release", ciface_release);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user