From: Tom Rini Date: Mon, 5 Jun 2017 20:21:34 -0400 Subject: [U-Boot] [U-Boot,04/15] bootstage: Convert to use malloc() In-Reply-To: <20170522110536.6231-5-sjg@chromium.org> References: <20170522110536.6231-5-sjg@chromium.org> Message-ID: <20170606002134.GT10782@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, May 22, 2017 at 05:05:25AM -0600, Simon Glass wrote: > At present bootstage uses the data section of the image to store its > information. There are a few problems with this: > > - It does not work on all boards (e.g. those which run from flash before > relocation) > - Allocated strings still point back to the pre-relocation data after > relocation > > Now that U-Boot has a pre-relocation malloc() we can use this instead, > with a pointer to the data in global_data. Update bootstage to do this and > set up an init routine to allocate the memory. > > Now that we have a real init function, we can drop the fake 'reset' record > and add a normal one instead. > > Note that part of the problem with allocated strings remains. They are > reallocated but this will only work where pre-relocation memory is > accessible after relocation. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: