From: Alexander Graf Date: Mon, 18 Jun 2018 17:03:08 +0200 Subject: [U-Boot] [PATCH v8 24/30] efi: Adjust memory handling to support sandbox In-Reply-To: <20180618140835.195901-25-sjg@chromium.org> References: <20180618140835.195901-1-sjg@chromium.org> <20180618140835.195901-25-sjg@chromium.org> Message-ID: <952b2d75-eb2f-9f39-c43e-731d3112249b@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/18/2018 04:08 PM, Simon Glass wrote: > Sandbox does not support direct casts between addresses and pointers, > since it uses an emulated RAM buffer rather than directly using host > RAM. > > The current EFI code uses an integer type for addresses, but treats them > like pointers. > > Update the code to maintain a (reasonably) clear separation between the > two, so that sandbox can work. > > Unfortunately there remains an inconsistency between the arguments of > allocate_pages() and allocate_pool(). One takes an address and one takes > a pointer. Partly this seems to be defined by the boot services API itself > but it would be fairly easy to update the functions in efi_memory.c to be > consistent. However, this is a larger change and needs discussion. > > Signed-off-by: Simon Glass This also seems to be fallout of a misinterpretation of the API :) Alex