NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/44895: ofwboot.xcf from current cannot boot system

The following reply was made to PR port-macppc/44895; it has been noted by GNATS.

From: Valery Ushakov <>
Subject: Re: port-macppc/44895: ofwboot.xcf from current cannot boot system
Date: Thu, 7 Jun 2018 02:19:28 +0300

 On Mon, Apr 17, 2017 at 15:15:01 +0000, Valery Ushakov wrote:
 >  After playing with it a bit more I think the real bug is in the
 >  bootloader's memory allocator code.  If I roll back to
 >  loadfile_elf32.c 1.24 (the good one) and just add ALLOC/DEALLOC pair
 >  where 1.25 would allocate "shstr", the resulting ofwboot.xcf is
 >  broken.
 Apparently I never posted a follow up...
 I've just committed a bit of trivial code that I had sitting in my
 tree to use libsa alloc.c instead of ofwboot's own ./alloc.c.  It's
 not yet enabled and the same object code is generated for now.  You
 can edit the makefile to change to the libsa allocator.
 The new (disabled) code makes ofwboot.xcf happy, apparently.  Since
 the root cause of the bug was never discovered it may be just masking
 the bug, but whatever :)
 ./alloc.c is very naive as it rounds every allocation up to the page
 size that it gets with OF_claim.
 The new code OF_claim's HEAP_SIZE heap (default 0x20000) and lets
 libsa manage it.
 Since libsa allocator cannot request additional memory anyway we may
 as well just use an array in .bss for heap instead.
 But I wanted to commit what I had and what's known to fix or at least
 mask the issue and then someone who's interested can experiment and
 test on other machines too.

Home | Main Index | Thread Index | Old Index