From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRQ2E-0002nz-TT for qemu-devel@nongnu.org; Tue, 09 Sep 2014 14:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRQ2A-0000YM-3u for qemu-devel@nongnu.org; Tue, 09 Sep 2014 14:20:58 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:55647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRQ29-0000YH-Sr for qemu-devel@nongnu.org; Tue, 09 Sep 2014 14:20:54 -0400 Received: by mail-lb0-f178.google.com with SMTP id c11so3686792lbj.23 for ; Tue, 09 Sep 2014 11:20:52 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1409930126-28449-1-git-send-email-ard.biesheuvel@linaro.org> <1409930126-28449-7-git-send-email-ard.biesheuvel@linaro.org> Date: Tue, 9 Sep 2014 20:20:52 +0200 Message-ID: From: Ard Biesheuvel Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 6/6] hw/arm/boot: enable DTB support when booting ELF images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Fu Wei , QEMU Developers , Christoffer Dall On 9 September 2014 20:17, Peter Maydell wrote: > On 9 September 2014 19:15, Ard Biesheuvel wrote: >> On 9 September 2014 20:08, Peter Maydell wrote: >>> (Thinking about it, that implies we either need a >>> rom_del_blob() or we need to tell load_dtb() about >>> areas of address space it needs to check for overlap >>> with before it registers the rom blob for the dtb.) >>> >> >> ... or we just call load_elf() again > > That won't work, because we'll still trip the overlap > check in rom_load_all(), won't we? > Yeah, you're right. My fingers are moving faster than my brain again I will go ahead and rework load_dtb() to take a max_size parameter, and load the dtb only if its size doesn't exceed max_size. This should be sufficient to (a) implement the ELF case, and (b) not complicate the other call sites too much