Implement new v3_memalloc romvec interface for allocating aligned memory.
commitc981afcafb4801e688b537cbf41a93bf5b8b09b2
authormcayland <mcayland@f158a5a8-5612-0410-a976-696ce0be7e32>
Fri, 22 Apr 2011 00:13:53 +0000 (22 00:13 +0000)
committermcayland <mcayland@f158a5a8-5612-0410-a976-696ce0be7e32>
Fri, 22 Apr 2011 00:13:53 +0000 (22 00:13 +0000)
tree0208828d76b3a56274b884e24a85d07e9d17a943
parent2c2144da4430e1f682f38e370728452c61ce85a4
Implement new v3_memalloc romvec interface for allocating aligned memory.

When attempting to load kadb from a Solaris 8 CD at boot, it seems that in order
for kadb to allocate enough memory to load the kernel (and its modules) the
/openprom/aligned-allocator property must be present with length zero.

This has the additional side-effect that OpenBIOS memory allocations are
redirected to a new romvec offset when this property is detected, which appears
to have a similar interface to obp_dumb_memalloc() but with an extra
alignment parameter. Hence we include a simple implementation which seems
to be enough to be able to get kadb to load and attach to the kernel.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://openbios.org/openbios/trunk/openbios-devel@1035 f158a5a8-5612-0410-a976-696ce0be7e32
arch/sparc32/call-romvec.S
arch/sparc32/lib.c
arch/sparc32/openprom.h
arch/sparc32/romvec.c
arch/sparc32/romvec.h
arch/sparc32/tree.fs