Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0785DC433EF for ; Thu, 24 Mar 2022 14:51:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E3B84840BC; Thu, 24 Mar 2022 15:51:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=unixzen.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=unixzen.com header.i=@unixzen.com header.b="JSAkD5QR"; dkim=pass (1024-bit key) header.d=unixzen.com header.i=@unixzen.com header.b="ODGURFIA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2008F840DE; Thu, 24 Mar 2022 15:51:40 +0100 (CET) Received: from mx.dal1.terarocket.io (unknown [IPv6:2001:19f0:6401:8d3:5400:1ff:fe4f:75e6]) by phobos.denx.de (Postfix) with ESMTP id 538558407B for ; Thu, 24 Mar 2022 15:51:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=unixzen.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=kallisti5@unixzen.com Received: by mx.dal1.terarocket.io (Postfix, from userid 1001) id F0CA55E4C8; Thu, 24 Mar 2022 14:51:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mx.dal1.terarocket.io F0CA55E4C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unixzen.com; s=default; t=1648133494; bh=ncmzhs5wcvRlWWiy+0UJ0InJTMvSkbSOmYZUXWSfs1c=; h=Date:From:Subject:To:From; b=JSAkD5QRIiFqtlxcxzGTnSQz3kHED2faiZLLoE44p9lpp5fkW1MsynUAGxyr238kC jlg1rneV+0rBSjiqa+XbuZj2b11eUy+dBgb57QdXxj7lGbGYHVre42/gJBfrAMrE+v 3wk6UBUIEsSYg9DbzKzkQeBP5alFGL58jDV6NgY8= Received: from mx.dal1.terarocket.io (localhost [IPv6:::1]) by mx.dal1.terarocket.io (Postfix) with ESMTPSA id B90A15E4C8 for ; Thu, 24 Mar 2022 14:51:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mx.dal1.terarocket.io B90A15E4C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unixzen.com; s=default; t=1648133492; bh=ncmzhs5wcvRlWWiy+0UJ0InJTMvSkbSOmYZUXWSfs1c=; h=Date:From:Subject:To:From; b=ODGURFIAASaNyLHsuXiCbDMvMVW4tAtYUuXlsadsIgApD+wjeIXcQUnidl5PUbuTe D4aZ9kl0c9J6IsLz/zGRZJJltbKK1QDRm20vX7wsul7ZEVPxixy+MyXsFFP+cp0Cnq I9z6AlTy+SCnvW0y3UWD4IRETzNLG8ooWewqmpik= MIME-Version: 1.0 Date: Thu, 24 Mar 2022 14:51:32 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.13.0 From: "Alex" Message-ID: Subject: [RFC] Dumping load addresses - bootefi qemu gdb remote debugging To: u-boot@lists.denx.de X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Good morning!=0A=0ASo, some time ago I wrote a short guide on how to debu= g EFI bootloaders started=0Aby u-boot in qemu.=0A=0Ahttps://www.haiku-os.= org/blog/kallisti5/2021-01-17_debugging_riscv-64_bootloader_in_qemu/=0A= =0AAt the time it worked, however figuring the elf load addresses from u-= boot was extremely=0Adifficult and required compiling it with full tracin= g and taking guesses at =0Avarious EFI: Entry efi_load_image messages unt= il I found the correct address.=0A=0AIs there an easier way to find the l= oad addresses? If not, a more verbose message=0Aon non-debug builds migh= t be extremely useful here.=0A=0A"positioning image at address 0xfe6b0000= " or something=0A=0Ausing the leveraged kernel_addr_r (0x84000000) was no= t enough.=0A=0A -- Alex