From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.7561.1607044269395133714 for ; Thu, 03 Dec 2020 17:11:11 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 04 Dec 2020 09:11:02 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , , Cc: "'Wang, Jian J'" , "'Wu, Hao A'" , "'Ni, Ray'" , "'Ard Biesheuvel'" , "'Andy Lutomirski'" References: <20201124191546.17403-1-Samer.El-Haj-Mahmoud@arm.com> <20201124191546.17403-4-Samer.El-Haj-Mahmoud@arm.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYxIDMvM10gTWRlTW9kdWxlUGtnL0NvblNwbGl0dGVyOiBDaGFuZ2UgU3RkRXJyIGNvbG9yIHRvIEVGSV9MSUdIVEdSQVk=?= Date: Fri, 4 Dec 2020 09:11:02 +0800 Message-ID: <009001d6c9da$55c9a460$015ced20$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQI/pUoZ03bVh/MVH2ORJWqE7FtgyAKX65wSAUnr6vECx6GvpQHZ2ccMAc1bhBYCdLSFr6iuPm4A Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Samer: Does all debug message output by PeiDxeDebugLibReportStatusCode? There is= not debug message to print as UefiDebugLibStdErr or UefiDebugLibConOut. Ri= ght? Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+68301+4905953+8761045@groups.i= o > =E4=BB=A3=E8=A1=A8 Samer > El-Haj-Mahmoud > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B412=E6=9C=884=E6=97=A5= 8:05 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; zhichao.gao@intel.com= ; lersek@redhat.com > =E6=8A=84=E9=80=81: Wang, Jian J ; Wu, Hao A > ; Ni, Ray ; Ard Biesheuvel > ; Andy Lutomirski ; Samer > El-Haj-Mahmoud > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSpli= tter: Change > StdErr color to EFI_LIGHTGRAY >=20 > Zhichao, >=20 > I can understand the rationale if this is truly only for StdErr (althoug= h it would > have been nice to allow platforms to customize the color with a PCD). > However, I see the inconsistency in debug output with platforms I tested= with. > For example, on the RPi, with DEBUG build, and all ConOut/StdErr and > DebugLiub using the same serial console. The serial debug starts with > LIGHTGRAY (attached screenshot 1), until gEfiStandardErrorDeviceGuid is > installed. At that point, the debug output switches to MAGENTA, and > continues to do so until entering the UI or booting to UEFI Shell, where= the > color switches back to LIGHTGRAY (attached screenshot2). After that, all > ConOut and Debug output is LIGHTGRAY . I do not really know of any actua= l > StdErr output from the Shell. >=20 > So, there might be a bug somewhere that causes DEBUG output to switch to > MAGENTA and back. I am not really sure. But this inconsistency is annoyi= ng. > Can we simply avoid this by using a consistent color for all console out= put? Or > at least allow platforms to decide? >=20 >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Gao, > > Zhichao via groups.io > > Sent: Wednesday, December 2, 2020 6:05 AM > > To: Samer El-Haj-Mahmoud ; > > devel@edk2.groups.io; lersek@redhat.com > > Cc: Wang, Jian J ; Wu, Hao A > > ; Ni, Ray ; Ard Biesheuvel > > ; Andy Lutomirski > > Subject: Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: > > Change StdErr color to EFI_LIGHTGRAY > > > > > > > > > -----Original Message----- > > > From: Samer El-Haj-Mahmoud > > > Sent: Tuesday, December 1, 2020 11:17 PM > > > To: Gao, Zhichao ; devel@edk2.groups.io; > > > lersek@redhat.com > > > Cc: Wang, Jian J ; Wu, Hao A > > > ; Ni, Ray ; Ard Biesheuvel > > > ; Andy Lutomirski ; Samer > > > El-Haj-Mahmoud > > > Subject: RE: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: > > > Change StdErr color to EFI_LIGHTGRAY > > > > > > Why does StdErr have to be a different color from ConOut? If the > > > system redirected both streams to the same console output then that = is > > their choice. > > > Serial DEBUG output is not a different color even if the DEBUG is > > > redirected to the same console as ConOut and StdErr. Also, from what= I > > > have seen, StdErr does not seem to always retain this MAGENTA color > > > later (for example, after booting a UEFI Shell?). > > > > Can you share the use case of StdErr? Seems when using StdErr- > > >OutputString, the output is not always MAGENTA color. If so, it is a = bug of > > console driver. > > > > I am thinking of one case. The platform only have the serial port with= out any > > other display device. System boots to uefi shell and run a debug build > > application. And the app would have both print output and debug print.= If > > the color are same, the info of normal print and debug print would be = mixed > > up. I am saying StdErr output not normal DebugLib. > > > > Thanks, > > Zhichao > > > > > > > > Do users really care (other than being annoyed by the inconsistency = of > > "some" > > > text showing up in purple?). Using the same color for consoles/DEBUG > > > output by default is consistent and clean. Applications/users can > > > always change the colors later to whatever is the preference for tha= t > > particular UI/CLI. > > > > > > Thanks, > > > --Samer > > > > > > > > > > -----Original Message----- > > > > From: Gao, Zhichao > > > > Sent: Monday, November 30, 2020 8:00 PM > > > > To: devel@edk2.groups.io; lersek@redhat.com; Samer El-Haj-Mahmoud > > > > > > > > Cc: Wang, Jian J ; Wu, Hao A > > > > ; Ni, Ray ; Ard Biesheuvel > > > > ; Andy Lutomirski > > > > Subject: RE: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: > > > > Change StdErr color to EFI_LIGHTGRAY > > > > > > > > I agree the EFI_MAGENTA is not a good choose. But this may be a > > > > different issue. Many platforms would set serial port as ConOut an= d > > > > ErrOut. The different colors for them can differ the origin. I don= 't > > > > think change them to the same color is a good idea. > > > > > > > > Thanks, > > > > Zhichao > > > > > > > > > -----Original Message----- > > > > > From: devel@edk2.groups.io On Behalf Of > > > > > Laszlo Ersek > > > > > Sent: Wednesday, November 25, 2020 7:30 AM > > > > > To: devel@edk2.groups.io; samer.el-haj-mahmoud@arm.com > > > > > Cc: Wang, Jian J ; Wu, Hao A > > > > > ; Gao, Zhichao ; Ni, > > > > > Ray ; Ard Biesheuvel ; > > > > > Andy Lutomirski > > > > > Subject: Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitte= r: > > > > > Change StdErr color to EFI_LIGHTGRAY > > > > > > > > > > On 11/24/20 20:15, Samer El-Haj-Mahmoud wrote: > > > > > > ConSplitter was using EFI_LIGHTGRAY foreground color for ConOu= t > > > > > > and EFI_MAGENTA for StdErr. > > > > > > > > > > > > This does not work all the time, and StdErr ends up showing > > > > > > parts in MAGENTA and other parts in LIGHTGRAY. Changing StdErr > > > > > > to LIGHTGRAY looks better and is more consistent. > > > > > > > > > > > > Cc: Jian J Wang > > > > > > Cc: Hao A Wu > > > > > > Cc: Zhichao Gao > > > > > > Cc: Ray Ni > > > > > > Cc: Ard Biesheuvel > > > > > > Signed-off-by: Samer El-Haj-Mahmoud > > > Mahmoud@arm.com> > > > > > > --- > > > > > > MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c | > 2 > > > > > > +- > > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > > > diff --git > > > > > > a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c > > > > > > b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c > > > > > > index b090de288517..e8cd4ce120a0 100644 > > > > > > --- > > > > > > a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c > > > > > > +++ > > b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter. > > > > > > +++ c > > > > > > @@ -1476,7 +1476,7 @@ ConSplitterStdErrDriverBindingStart ( > > > > > > // their MaxMode and QueryData should be the intersection o= f > > both. > > > > > > // > > > > > > Status =3D ConSplitterTextOutAddDevice (&mStdErr, TextOut, > > > > > > NULL, NULL); > > > > > > - ConSplitterTextOutSetAttribute (&mStdErr.TextOut, > > > > > > EFI_TEXT_ATTR (EFI_MAGENTA, EFI_BLACK)); > > > > > > + ConSplitterTextOutSetAttribute (&mStdErr.TextOut, > > > > > > + EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK)); > > > > > > > > > > > > return Status; > > > > > > } > > > > > > > > > > > > > > > > I am very curious as to how this patch is going to fare, as Andy > > > > > Lutomirski (CC'd) reported the same symptom in a Fedora bugzilla > > > > > ticket > > > > > 4+ years ago: > > > > > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=3D1355913 > > > > > > > > > > As you can see in that BZ, I found the same code location, I jus= t > > > > > didn't feel up to starting another crusade on edk2-devel -- abou= t > > > > > colors even!... So I'll be watching this one now. :) > > > > > > > > > > Thanks > > > > > Laszlo > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > IMPORTANT NOTICE: The contents of this email and any attachments are > > > confidential and may also be privileged. If you are not the intended > > > recipient, please notify the sender immediately and do not disclose > > > the contents to any other person, use it for any purpose, or store o= r > > > copy the information in any medium. Thank you. > > > > > > > > >=20 > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended rec= ipient, > please notify the sender immediately and do not disclose the contents to= any > other person, use it for any purpose, or store or copy the information i= n any > medium. Thank you. >=20 >=20 >=20 >=20