From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 33E9A21F2AF8C for ; Thu, 28 Sep 2017 11:15:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 441E932BF38; Thu, 28 Sep 2017 18:19:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 441E932BF38 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-73.rdu2.redhat.com [10.10.120.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16C041715F; Thu, 28 Sep 2017 18:19:09 +0000 (UTC) To: Michael Brown , Konrad Rzeszutek Wilk , edk2-devel@lists.01.org, Konrad Rzeszutek Wilk , alejandro.j.jimenez@oracle.com, aaron.young@oracle.com, ipxe-devel@lists.ipxe.org, Xen-devel References: <7c5cafdc-67cc-5535-1385-6ed9dd491e7e@ipxe.org> From: Laszlo Ersek Message-ID: Date: Thu, 28 Sep 2017 20:19:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <7c5cafdc-67cc-5535-1385-6ed9dd491e7e@ipxe.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 28 Sep 2017 18:19:13 +0000 (UTC) Subject: Re: [ipxe-devel] Tips on how to debug EFI code (iPXE) from within KVM after ipxe.efi has crashed with #GP? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2017 18:15:59 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 09/28/17 20:04, Michael Brown wrote: > On 28/09/17 18:37, Konrad Rzeszutek Wilk wrote: >> !!! X64 Exception Type - 0D(#GP - General Protection)  CPU Apic ID - >> 00000000 !!!! >> ExceptionData - 0000000000000000 >> RIP  - 00000000BEC2949C, CS  - 0000000000000038, RFLAGS - >> 0000000000210216 >> .... >> !!!! Find image 808610ed.efidrv (ImageBase=00000000BEC27000, >> EntryPoint=00000000BEC2E089) !!!! >> >> And now I am trying to figure out how to troubleshoot this. >> (and yes I am thinking it was related to the Tivoli work-around, but >> disabling that didn't help). > > The Tivoli workaround is for legacy BIOS only; it doesn't apply to the > UEFI build of iPXE. > > You have the RIP and ImageBase, so you know that the exception happens > at offset +0x249c within your iPXE binary.  You can use this in > conjunction with the corresponding map file from the iPXE build (which > will probably be named bin-x86_64-efi/808610d3.efidrv.tmp.map, but see > below) to figure out exactly where the crash is occurring. Or run "objdump -S 808610d3.efidrv.tmp", and look up the offset in the output. (First, check if (EntryPoint - ImageBase), i.e., 0x7089, equals "start address" in the "objdump -x" output.) Laszlo