On 19/04/11 20:31, Blue Swirl wrote:
-char *obp_dumb_memalloc(char *va, unsigned int size) +char *obp_align_memalloc(char *va, unsigned int size, unsigned int align)
Apparently there is a v2 and a v3 version of malloc() within romvec, so it's pretty likely that this is the v3 version given its position within the structure. I'll rename this to something that makes it more obvious it is v3 related.
void obp_dumb_memfree(__attribute__((unused))char *va, diff --git a/openbios-devel/arch/sparc32/openprom.h b/openbios-devel/arch/sparc32/openprom.h index 0a2074b..5f05014 100644 --- a/openbios-devel/arch/sparc32/openprom.h +++ b/openbios-devel/arch/sparc32/openprom.h @@ -135,7 +135,10 @@ struct linux_romvec { struct linux_bootargs_v2 pv_v2bootargs; struct linux_dev_v2_funcs pv_v2devops;
int filler[15];
/* Allocate memory to specified alignment */
char * (*pv_align_mem_alloc)(char *va, unsigned int size, unsigned int align);
int filler[11];
This would shorten the structure by 12 bytes, please use 14 instead of 11.
Ah yes, my mistake - it's an int rather than a char. Will re-submit shortly with these two changes.
ATB,
Mark.