From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.1425.1588108992061773034 for ; Tue, 28 Apr 2020 14:23:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LOZDKzKV; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588108991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mCH/nfHYWQOLvLvgnuMGrTRvOkzkc4DRVsu1cNE/2H8=; b=LOZDKzKVfKhwKHdk4CM6ejV/2k/7wQSEHE/0FPXsfk2aiOLn5IgeTVJ6XxTBxcVDrKr+1Q +1GQEz1IickWGVcPWVX9D5syIYVGA5w7BNnfU5Ipfqm0gW0MZC2p3HfaNBDte3ZpouCHAU lh+0OqehxaRV3rp0ZJJCpHJDdOCmZ3s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-55-jplx3ietOYikqdvj0uRCiQ-1; Tue, 28 Apr 2020 17:23:07 -0400 X-MC-Unique: jplx3ietOYikqdvj0uRCiQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 61BC546B; Tue, 28 Apr 2020 21:23:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-33.ams2.redhat.com [10.36.113.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2F725D9E5; Tue, 28 Apr 2020 21:23:01 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 0/5] OvmfXen: Cleanup debug options To: devel@edk2.groups.io, anthony.perard@citrix.com Cc: Ard Biesheuvel , Jordan Justen , Julien Grall , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= References: <20200423095358.2518197-1-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: <22773435-f172-9dc2-fc21-dd651711c319@redhat.com> Date: Tue, 28 Apr 2020 23:23:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200423095358.2518197-1-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable On 04/23/20 11:53, Anthony PERARD wrote: > Patch series available in this git branch: > git://xenbits.xen.org/people/aperard/ovmf.git br.ovmfxen-debug-io-v2 > > v2: > - reuse PlatformDebugLibIoPort rather than duplicate it. > > Remove non working DEBUG_ON_SERIAL_PORT, then add a new LibIoPort which a= lways > writes to the IO port. > > Issues was discovered and discuss in this mail threads: > > "OvmfPkg XenPkg: X64 DEBUG GCC5 -DDEBUG_ON_SERIAL_PORT=3DTRUE build i= s broken" > > Cheers, > > Anthony PERARD (5): > OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT > OvmfPkg/PlatformDebugLibIoPort: Reword QEMU to hypervisor > OvmfPkg/PlatformDebugLibIoPort: factor out debug port detection > OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant > OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag > > OvmfPkg/OvmfXen.dsc | 49 +++++-------------- > .../PlatformDebugLibIoPort.inf | 1 + > .../PlatformRomDebugLibIoPort.inf | 1 + > ...f =3D> PlatformRomDebugLibIoPortNocheck.inf} | 14 +++--- > .../PlatformDebugLibIoPort/DebugLibDetect.h | 8 +-- > .../DebugIoPortNocheck.c | 25 ++++++++++ > .../PlatformDebugLibIoPort/DebugIoPortQemu.c | 34 +++++++++++++ > .../Library/PlatformDebugLibIoPort/DebugLib.c | 18 +------ > .../PlatformDebugLibIoPort/DebugLibDetect.c | 2 +- > .../DebugLibDetectRom.c | 2 +- > 10 files changed, 84 insertions(+), 70 deletions(-) > copy OvmfPkg/Library/PlatformDebugLibIoPort/{PlatformRomDebugLibIoPort.i= nf =3D> PlatformRomDebugLibIoPortNocheck.inf} (65%) > create mode 100644 OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNoc= heck.c > create mode 100644 OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortQem= u.c > Merged as commit range 099dfbb29d8b..3a402f961143, via , with the following changes (listed with git-range-diff): > 1: 30e967c8caff ! 1: 8131bcf75724 OvmfPkg/OvmfXen: Remove DEBUG_ON_SERI= AL_PORT > @@ -18,6 +18,7 @@ > Signed-off-by: Anthony PERARD > Reviewed-by: Laszlo Ersek > Message-Id: <20200423095358.2518197-2-anthony.perard@citrix.com> > + Reviewed-by: Philippe Mathieu-Daud=E9 > > diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc > --- a/OvmfPkg/OvmfXen.dsc > 2: f5074c29bed8 ! 2: d81604376c2c OvmfPkg/PlatformDebugLibIoPort: Rewor= d QEMU to hypervisor > @@ -8,6 +8,7 @@ > > Signed-off-by: Anthony PERARD > Message-Id: <20200423095358.2518197-3-anthony.perard@citrix.com> > + Reviewed-by: Laszlo Ersek > > diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h= b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h > --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h > 3: f34d57687c4f ! 3: b2d70c6189ac OvmfPkg/PlatformDebugLibIoPort: facto= r out debug port detection > @@ -6,6 +6,8 @@ > > Signed-off-by: Anthony PERARD > Message-Id: <20200423095358.2518197-4-anthony.perard@citrix.com> > + Reviewed-by: Philippe Mathieu-Daud=E9 > + Reviewed-by: Laszlo Ersek > > diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLib= IoPort.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.= inf > --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.= inf > 4: c095623a5cfb ! 4: 37f050ea8228 OvmfPkg/PlatformDebugLibIoPort: Intro= duce a Nocheck variant > @@ -7,6 +7,7 @@ > > Signed-off-by: Anthony PERARD > Message-Id: <20200423095358.2518197-5-anthony.perard@citrix.com> > + Reviewed-by: Laszlo Ersek > > diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebug= LibIoPortNocheck.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDe= bugLibIoPortNocheck.inf > new file mode 100644 > @@ -30,7 +31,7 @@ > + FILE_GUID =3D 92AEB68E-C2CF-466E-9AB2-3F5E71= 3F7DE6 > + MODULE_TYPE =3D BASE > + VERSION_STRING =3D 1.0 > -+ LIBRARY_CLASS =3D DebugLib|SEC PEI_CORE PEIM DXE= _CORE DXE_DRIVER DXE_RUNTIME_DRIVER SMM_CORE DXE_SMM_DRIVER UEFI_DRIVER UEF= I_APPLICATION > ++ LIBRARY_CLASS =3D DebugLib > + CONSTRUCTOR =3D PlatformRomDebugLibIoPortConst= ructor > + > +# > @@ -40,8 +41,8 @@ > +[Sources] > + DebugIoPortNocheck.c > + DebugLib.c > -+ DebugLibDetectRom.c > + DebugLibDetect.h > ++ DebugLibDetectRom.c > + > +[Packages] > + MdePkg/MdePkg.dec > 5: 979f76d57653 ! 5: c6f8d17f53f9 OvmfPkg/OvmfXen: Introduce DEBUG_ON_H= YPERVISOR_CONSOLE build flag > @@ -10,6 +10,7 @@ > > Signed-off-by: Anthony PERARD > Message-Id: <20200423095358.2518197-6-anthony.perard@citrix.com> > + Reviewed-by: Laszlo Ersek > > diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc > --- a/OvmfPkg/OvmfXen.dsc > @@ -29,9 +30,7 @@ > > [LibraryClasses.common.SEC] > QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf > -+!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE) > -+ DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugL= ibIoPortNocheck.inf > -+!else > ++!ifndef $(DEBUG_ON_HYPERVISOR_CONSOLE) > DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugL= ibIoPort.inf > +!endif > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/P= eiReportStatusCodeLib.inf Thanks! Laszlo