<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:SimSun;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
span.EmailStyle25
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Ray,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black">As explained in my reply to Zhichao, we are more concerned about the impact to serial console users (DebugLib and in some cases the kernel messages, which is common and annoying), than the impact to StdErr users
 (not common, in fact none that I know of other than</span> <span style="color:black">
UefiDebugLibStdErr and possibly some Shell scripts with console redirection). The simplest solution is to make StdErr use the same color as ConOut and DebugLib, and let platforms deal with changing the colors in their own platform console initialization BDS
 code. I will send an updated patch with the commit message explaining this.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black">Thanks,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black">--Samer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Ni, Ray <ray.ni@intel.com>
<br>
<b>Sent:</b> Monday, December 7, 2020 8:28 PM<br>
<b>To:</b> Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com>; lersek@redhat.com; gaoliming <gaoliming@byosoft.com.cn><br>
<b>Cc:</b> Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Ard Biesheuvel <Ard.Biesheuvel@arm.com>; 'Andy Lutomirski' <luto@kernel.org><br>
<b>Subject:</b> RE: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: Change StdErr color to EFI_LIGHTGRAY<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">The issue happens when the terminal and debug log use the same device.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">When they use different UARTs, such issue won’t happen.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Can such issue be resolved by restoring back to light gray after printing errors from StdErr?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Ray<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>>
<br>
<b>Sent:</b> Friday, December 4, 2020 8:42 PM<br>
<b>To:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>; Gao, Zhichao <<a href="mailto:zhichao.gao@intel.com">zhichao.gao@intel.com</a>>;
<a href="mailto:lersek@redhat.com">lersek@redhat.com</a>; gaoliming <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>><br>
<b>Cc:</b> Wang, Jian J <<a href="mailto:jian.j.wang@intel.com">jian.j.wang@intel.com</a>>; Wu, Hao A <<a href="mailto:hao.a.wu@intel.com">hao.a.wu@intel.com</a>>; Ni, Ray <<a href="mailto:ray.ni@intel.com">ray.ni@intel.com</a>>; Ard Biesheuvel <<a href="mailto:Ard.Biesheuvel@arm.com">Ard.Biesheuvel@arm.com</a>>;
 'Andy Lutomirski' <<a href="mailto:luto@kernel.org">luto@kernel.org</a>>; Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>><br>
<b>Subject:</b> RE: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: Change StdErr color to EFI_LIGHTGRAY<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">StdErr console is required to be implemented by the UEFI spec to fill in the pointers in ST (even with a stubbed protocol implementation).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">So if we agree that the color of the StdErr (required but low to no usage) is impacting the serial debug prints (high usage for DEBUG targets), why do we still insist on keeping
 the MAGENTA color for StdErr? Yes adding PCDs would be nice for platforms to select their default colors (and it should be done for both ConOut and StdErr), but that can be added later if there is a real ask for it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I still do not see why the original patch of simply changing StdErr default color from MAGENTA to LIGHTGRAY (and avoid all of this headache) is problematic?! Please consider
 the original patch so we can close on this topic and move on.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">--Samer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>>
<b>On Behalf Of </b>Gao, Zhichao via groups.io<br>
<b>Sent:</b> Friday, December 4, 2020 12:24 AM<br>
<b>To:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>; Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>>;
<a href="mailto:lersek@redhat.com">lersek@redhat.com</a>; gaoliming <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>><br>
<b>Cc:</b> Wang, Jian J <<a href="mailto:jian.j.wang@intel.com">jian.j.wang@intel.com</a>>; Wu, Hao A <<a href="mailto:hao.a.wu@intel.com">hao.a.wu@intel.com</a>>; Ni, Ray <<a href="mailto:ray.ni@intel.com">ray.ni@intel.com</a>>; Ard Biesheuvel <<a href="mailto:Ard.Biesheuvel@arm.com">Ard.Biesheuvel@arm.com</a>>;
 'Andy Lutomirski' <<a href="mailto:luto@kernel.org">luto@kernel.org</a>><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: Change StdErr color to EFI_LIGHTGRAY<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Normal DebugLib usually outputs string debug message only. It would show at the serial device with it current attributes. ErrOut and ConOut would change the attribute. That
 is why the color changes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Actually I don’t see many usage of the ErrOut. I would suggest to remove ErrOut if you’re not using it for debug output.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">For the Pcds, I agree to let the consumer to choose their wonder default color. But it is better to get the MdeModulePkg maintainers’ point.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Zhichao<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>>
<b>On Behalf Of </b>Samer El-Haj-Mahmoud<br>
<b>Sent:</b> Friday, December 4, 2020 9:21 AM<br>
<b>To:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>; Gao, Zhichao <<a href="mailto:zhichao.gao@intel.com">zhichao.gao@intel.com</a>>;
<a href="mailto:lersek@redhat.com">lersek@redhat.com</a>; gaoliming <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>><br>
<b>Cc:</b> Wang, Jian J <<a href="mailto:jian.j.wang@intel.com">jian.j.wang@intel.com</a>>; Wu, Hao A <<a href="mailto:hao.a.wu@intel.com">hao.a.wu@intel.com</a>>; Ni, Ray <<a href="mailto:ray.ni@intel.com">ray.ni@intel.com</a>>; Ard Biesheuvel <<a href="mailto:Ard.Biesheuvel@arm.com">Ard.Biesheuvel@arm.com</a>>;
 'Andy Lutomirski' <<a href="mailto:luto@kernel.org">luto@kernel.org</a>><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: Change StdErr color to EFI_LIGHTGRAY<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black">It's actually all *DebugLibSerialPort :<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><a href="https://github.com/tianocore/edk2-platforms/blob/master/Platform/RaspberryPi/RPi4/RPi4.dsc"><span style="font-size:11.0pt;font-family:"Arial",sans-serif">https://github.com/tianocore/edk2-platforms/blob/master/Platform/RaspberryPi/RPi4/RPi4.dsc</span></a><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black">DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black">DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black">But I have seen this on other systems as well. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<div id="id-8c5ffa2d-9ddb-427f-91af-b4b02313ac3b">
<div>
<p class="MsoNormal"><span style="font-size:13.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><strong><span style="font-family:SimSun">From:</span></strong> gaoliming <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>><br>
<strong><span style="font-family:SimSun">Sent:</span></strong> Thursday, December 3, 2020, 8:11 PM<br>
<strong><span style="font-family:SimSun">To:</span></strong> <a href="mailto:devel@edk2.groups.io">
devel@edk2.groups.io</a>; Samer El-Haj-Mahmoud; <a href="mailto:zhichao.gao@intel.com">
zhichao.gao@intel.com</a>; <a href="mailto:lersek@redhat.com">lersek@redhat.com</a><br>
<strong><span style="font-family:SimSun">Cc:</span></strong> 'Wang, Jian J'; 'Wu, Hao A'; 'Ni, Ray'; Ard Biesheuvel; 'Andy Lutomirski'<br>
<strong><span style="font-family:SimSun">Subject:</span></strong> <span lang="ZH-CN" style="mso-fareast-language:ZH-CN">
回复</span>: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: Change StdErr color to EFI_LIGHTGRAY<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Samer:<br>
 Does all debug message output by PeiDxeDebugLibReportStatusCode? There is not debug message to print as UefiDebugLibStdErr or UefiDebugLibConOut. Right?<br>
<br>
Thanks<br>
Liming<br>
> -----</span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">邮件原件</span><span style="font-size:11.0pt">-----<br>
> </span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">发件人</span><span style="font-size:11.0pt">:
</span><a href="mailto:bounce+27952+68301+4905953+8761045@groups.io"><span style="font-size:11.0pt">bounce+27952+68301+4905953+8761045@groups.io</span></a><span style="font-size:11.0pt"><br>
> <</span><a href="mailto:bounce+27952+68301+4905953+8761045@groups.io"><span style="font-size:11.0pt">bounce+27952+68301+4905953+8761045@groups.io</span></a><span style="font-size:11.0pt">>
</span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">代表</span><span style="font-size:11.0pt"> Samer<br>
> El-Haj-Mahmoud<br>
> </span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">发送时间</span><span style="font-size:11.0pt">: 2020</span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">年</span><span style="font-size:11.0pt">12</span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">月</span><span style="font-size:11.0pt">4</span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">日</span><span style="font-size:11.0pt">
 8:05<br>
> </span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">收件人</span><span style="font-size:11.0pt">:
</span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt">;
</span><a href="mailto:zhichao.gao@intel.com"><span style="font-size:11.0pt">zhichao.gao@intel.com</span></a><span style="font-size:11.0pt">;
</span><a href="mailto:lersek@redhat.com"><span style="font-size:11.0pt">lersek@redhat.com</span></a><span style="font-size:11.0pt"><br>
> </span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">抄送</span><span style="font-size:11.0pt">: Wang, Jian J <</span><a href="mailto:jian.j.wang@intel.com"><span style="font-size:11.0pt">jian.j.wang@intel.com</span></a><span style="font-size:11.0pt">>;
 Wu, Hao A<br>
> <</span><a href="mailto:hao.a.wu@intel.com"><span style="font-size:11.0pt">hao.a.wu@intel.com</span></a><span style="font-size:11.0pt">>; Ni, Ray <</span><a href="mailto:ray.ni@intel.com"><span style="font-size:11.0pt">ray.ni@intel.com</span></a><span style="font-size:11.0pt">>;
 Ard Biesheuvel<br>
> <</span><a href="mailto:Ard.Biesheuvel@arm.com"><span style="font-size:11.0pt">Ard.Biesheuvel@arm.com</span></a><span style="font-size:11.0pt">>; Andy Lutomirski <</span><a href="mailto:luto@kernel.org"><span style="font-size:11.0pt">luto@kernel.org</span></a><span style="font-size:11.0pt">>;
 Samer<br>
> El-Haj-Mahmoud <</span><a href="mailto:Samer.El-Haj-Mahmoud@arm.com"><span style="font-size:11.0pt">Samer.El-Haj-Mahmoud@arm.com</span></a><span style="font-size:11.0pt">><br>
> </span><span lang="ZH-CN" style="font-size:11.0pt;mso-fareast-language:ZH-CN">主题</span><span style="font-size:11.0pt">: Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter: Change<br>
> StdErr color to EFI_LIGHTGRAY<br>
> <br>
> Zhichao,<br>
> <br>
> I can understand the rationale if this is truly only for StdErr (although it would<br>
> have been nice to allow platforms to customize the color with a PCD).<br>
> However, I see the inconsistency in debug output with platforms I tested with.<br>
> For example, on the RPi, with DEBUG build, and all ConOut/StdErr and<br>
> DebugLiub using the same serial console. The serial debug starts with<br>
> LIGHTGRAY (attached screenshot 1), until gEfiStandardErrorDeviceGuid is<br>
> installed. At that point, the debug output switches to MAGENTA, and<br>
> continues to do so until entering the UI or booting to UEFI Shell, where the<br>
> color switches back to LIGHTGRAY (attached screenshot2). After that, all<br>
> ConOut and Debug output is LIGHTGRAY . I do not really know of any actual<br>
> StdErr output from the Shell.<br>
> <br>
> So, there might be a bug somewhere that causes DEBUG output to switch to<br>
> MAGENTA and back. I am not really sure. But this inconsistency is annoying.<br>
> Can we simply avoid this by using a consistent color for all console output? Or<br>
> at least allow platforms to decide?<br>
> <br>
> <br>
> > -----Original Message-----<br>
> > From: </span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt"> <</span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt">>
 On Behalf Of Gao,<br>
> > Zhichao via groups.io<br>
> > Sent: Wednesday, December 2, 2020 6:05 AM<br>
> > To: Samer El-Haj-Mahmoud <</span><a href="mailto:Samer.El-Haj-Mahmoud@arm.com"><span style="font-size:11.0pt">Samer.El-Haj-Mahmoud@arm.com</span></a><span style="font-size:11.0pt">>;<br>
> > </span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt">;
</span><a href="mailto:lersek@redhat.com"><span style="font-size:11.0pt">lersek@redhat.com</span></a><span style="font-size:11.0pt"><br>
> > Cc: Wang, Jian J <</span><a href="mailto:jian.j.wang@intel.com"><span style="font-size:11.0pt">jian.j.wang@intel.com</span></a><span style="font-size:11.0pt">>; Wu, Hao A<br>
> > <</span><a href="mailto:hao.a.wu@intel.com"><span style="font-size:11.0pt">hao.a.wu@intel.com</span></a><span style="font-size:11.0pt">>; Ni, Ray <</span><a href="mailto:ray.ni@intel.com"><span style="font-size:11.0pt">ray.ni@intel.com</span></a><span style="font-size:11.0pt">>;
 Ard Biesheuvel<br>
> > <</span><a href="mailto:Ard.Biesheuvel@arm.com"><span style="font-size:11.0pt">Ard.Biesheuvel@arm.com</span></a><span style="font-size:11.0pt">>; Andy Lutomirski <</span><a href="mailto:luto@kernel.org"><span style="font-size:11.0pt">luto@kernel.org</span></a><span style="font-size:11.0pt">><br>
> > Subject: Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter:<br>
> > Change StdErr color to EFI_LIGHTGRAY<br>
> ><br>
> ><br>
> ><br>
> > > -----Original Message-----<br>
> > > From: Samer El-Haj-Mahmoud <</span><a href="mailto:Samer.El-Haj-Mahmoud@arm.com"><span style="font-size:11.0pt">Samer.El-Haj-Mahmoud@arm.com</span></a><span style="font-size:11.0pt">><br>
> > > Sent: Tuesday, December 1, 2020 11:17 PM<br>
> > > To: Gao, Zhichao <</span><a href="mailto:zhichao.gao@intel.com"><span style="font-size:11.0pt">zhichao.gao@intel.com</span></a><span style="font-size:11.0pt">>;
</span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt">;<br>
> > > </span><a href="mailto:lersek@redhat.com"><span style="font-size:11.0pt">lersek@redhat.com</span></a><span style="font-size:11.0pt"><br>
> > > Cc: Wang, Jian J <</span><a href="mailto:jian.j.wang@intel.com"><span style="font-size:11.0pt">jian.j.wang@intel.com</span></a><span style="font-size:11.0pt">>; Wu, Hao A<br>
> > > <</span><a href="mailto:hao.a.wu@intel.com"><span style="font-size:11.0pt">hao.a.wu@intel.com</span></a><span style="font-size:11.0pt">>; Ni, Ray <</span><a href="mailto:ray.ni@intel.com"><span style="font-size:11.0pt">ray.ni@intel.com</span></a><span style="font-size:11.0pt">>;
 Ard Biesheuvel<br>
> > > <</span><a href="mailto:Ard.Biesheuvel@arm.com"><span style="font-size:11.0pt">Ard.Biesheuvel@arm.com</span></a><span style="font-size:11.0pt">>; Andy Lutomirski <</span><a href="mailto:luto@kernel.org"><span style="font-size:11.0pt">luto@kernel.org</span></a><span style="font-size:11.0pt">>;
 Samer<br>
> > > El-Haj-Mahmoud <Samer.El-Haj- </span><a href="mailto:Mahmoud@arm.com"><span style="font-size:11.0pt">Mahmoud@arm.com</span></a><span style="font-size:11.0pt">><br>
> > > Subject: RE: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter:<br>
> > > Change StdErr color to EFI_LIGHTGRAY<br>
> > ><br>
> > > Why does StdErr have to be a different color from ConOut? If the<br>
> > > system redirected both streams to the same console output then that is<br>
> > their choice.<br>
> > > Serial DEBUG output is not a different color even if the DEBUG is<br>
> > > redirected to the same console as ConOut and StdErr. Also, from what I<br>
> > > have seen, StdErr does not seem to always retain this MAGENTA color<br>
> > > later (for example, after booting a UEFI Shell?).<br>
> ><br>
> > Can you share the use case of StdErr? Seems when using StdErr-<br>
> > >OutputString, the output is not always MAGENTA color. If so, it is a bug of<br>
> > console driver.<br>
> ><br>
> > I am thinking of one case. The platform only have the serial port without any<br>
> > other display device. System boots to uefi shell and run a debug build<br>
> > application. And the app would have both print output and debug print. If<br>
> > the color are same, the info of normal print and debug print would be mixed<br>
> > up. I am saying StdErr output not normal DebugLib.<br>
> ><br>
> > Thanks,<br>
> > Zhichao<br>
> ><br>
> > ><br>
> > > Do users really care (other than being annoyed by the inconsistency of<br>
> > "some"<br>
> > > text showing up in purple?). Using the same color for consoles/DEBUG<br>
> > > output by default is consistent and clean. Applications/users can<br>
> > > always change the colors later to whatever is the preference for that<br>
> > particular UI/CLI.<br>
> > ><br>
> > > Thanks,<br>
> > > --Samer<br>
> > ><br>
> > ><br>
> > > > -----Original Message-----<br>
> > > > From: Gao, Zhichao <</span><a href="mailto:zhichao.gao@intel.com"><span style="font-size:11.0pt">zhichao.gao@intel.com</span></a><span style="font-size:11.0pt">><br>
> > > > Sent: Monday, November 30, 2020 8:00 PM<br>
> > > > To: </span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt">;
</span><a href="mailto:lersek@redhat.com"><span style="font-size:11.0pt">lersek@redhat.com</span></a><span style="font-size:11.0pt">; Samer El-Haj-Mahmoud<br>
> > > > <</span><a href="mailto:Samer.El-Haj-Mahmoud@arm.com"><span style="font-size:11.0pt">Samer.El-Haj-Mahmoud@arm.com</span></a><span style="font-size:11.0pt">><br>
> > > > Cc: Wang, Jian J <</span><a href="mailto:jian.j.wang@intel.com"><span style="font-size:11.0pt">jian.j.wang@intel.com</span></a><span style="font-size:11.0pt">>; Wu, Hao A<br>
> > > > <</span><a href="mailto:hao.a.wu@intel.com"><span style="font-size:11.0pt">hao.a.wu@intel.com</span></a><span style="font-size:11.0pt">>; Ni, Ray <</span><a href="mailto:ray.ni@intel.com"><span style="font-size:11.0pt">ray.ni@intel.com</span></a><span style="font-size:11.0pt">>;
 Ard Biesheuvel<br>
> > > > <</span><a href="mailto:Ard.Biesheuvel@arm.com"><span style="font-size:11.0pt">Ard.Biesheuvel@arm.com</span></a><span style="font-size:11.0pt">>; Andy Lutomirski <</span><a href="mailto:luto@kernel.org"><span style="font-size:11.0pt">luto@kernel.org</span></a><span style="font-size:11.0pt">><br>
> > > > Subject: RE: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter:<br>
> > > > Change StdErr color to EFI_LIGHTGRAY<br>
> > > ><br>
> > > > I agree the EFI_MAGENTA is not a good choose. But this may be a<br>
> > > > different issue. Many platforms would set serial port as ConOut and<br>
> > > > ErrOut. The different colors for them can differ the origin. I don't<br>
> > > > think change them to the same color is a good idea.<br>
> > > ><br>
> > > > Thanks,<br>
> > > > Zhichao<br>
> > > ><br>
> > > > > -----Original Message-----<br>
> > > > > From: </span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt"> <</span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt">>
 On Behalf Of<br>
> > > > > Laszlo Ersek<br>
> > > > > Sent: Wednesday, November 25, 2020 7:30 AM<br>
> > > > > To: </span><a href="mailto:devel@edk2.groups.io"><span style="font-size:11.0pt">devel@edk2.groups.io</span></a><span style="font-size:11.0pt">;
</span><a href="mailto:samer.el-haj-mahmoud@arm.com"><span style="font-size:11.0pt">samer.el-haj-mahmoud@arm.com</span></a><span style="font-size:11.0pt"><br>
> > > > > Cc: Wang, Jian J <</span><a href="mailto:jian.j.wang@intel.com"><span style="font-size:11.0pt">jian.j.wang@intel.com</span></a><span style="font-size:11.0pt">>; Wu, Hao A<br>
> > > > > <</span><a href="mailto:hao.a.wu@intel.com"><span style="font-size:11.0pt">hao.a.wu@intel.com</span></a><span style="font-size:11.0pt">>; Gao, Zhichao <</span><a href="mailto:zhichao.gao@intel.com"><span style="font-size:11.0pt">zhichao.gao@intel.com</span></a><span style="font-size:11.0pt">>;
 Ni,<br>
> > > > > Ray <</span><a href="mailto:ray.ni@intel.com"><span style="font-size:11.0pt">ray.ni@intel.com</span></a><span style="font-size:11.0pt">>; Ard Biesheuvel <</span><a href="mailto:Ard.Biesheuvel@arm.com"><span style="font-size:11.0pt">Ard.Biesheuvel@arm.com</span></a><span style="font-size:11.0pt">>;<br>
> > > > > Andy Lutomirski <</span><a href="mailto:luto@kernel.org"><span style="font-size:11.0pt">luto@kernel.org</span></a><span style="font-size:11.0pt">><br>
> > > > > Subject: Re: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/ConSplitter:<br>
> > > > > Change StdErr color to EFI_LIGHTGRAY<br>
> > > > ><br>
> > > > > On 11/24/20 20:15, Samer El-Haj-Mahmoud wrote:<br>
> > > > > > ConSplitter was using EFI_LIGHTGRAY foreground color for ConOut<br>
> > > > > > and EFI_MAGENTA for StdErr.<br>
> > > > > ><br>
> > > > > > This does not work all the time, and StdErr ends up showing<br>
> > > > > > parts in MAGENTA and other parts in LIGHTGRAY. Changing StdErr<br>
> > > > > > to LIGHTGRAY looks better and is more consistent.<br>
> > > > > ><br>
> > > > > > Cc: Jian J Wang <</span><a href="mailto:jian.j.wang@intel.com"><span style="font-size:11.0pt">jian.j.wang@intel.com</span></a><span style="font-size:11.0pt">><br>
> > > > > > Cc: Hao A Wu <</span><a href="mailto:hao.a.wu@intel.com"><span style="font-size:11.0pt">hao.a.wu@intel.com</span></a><span style="font-size:11.0pt">><br>
> > > > > > Cc: Zhichao Gao <</span><a href="mailto:zhichao.gao@intel.com"><span style="font-size:11.0pt">zhichao.gao@intel.com</span></a><span style="font-size:11.0pt">><br>
> > > > > > Cc: Ray Ni <</span><a href="mailto:ray.ni@intel.com"><span style="font-size:11.0pt">ray.ni@intel.com</span></a><span style="font-size:11.0pt">><br>
> > > > > > Cc: Ard Biesheuvel <</span><a href="mailto:Ard.Biesheuvel@arm.com"><span style="font-size:11.0pt">Ard.Biesheuvel@arm.com</span></a><span style="font-size:11.0pt">><br>
> > > > > > Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-<br>
> > > > </span><a href="mailto:Mahmoud@arm.com"><span style="font-size:11.0pt">Mahmoud@arm.com</span></a><span style="font-size:11.0pt">><br>
> > > > > > ---<br>
> > > > > >  MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c |<br>
> 2<br>
> > > > > > +-<br>
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)<br>
> > > > > ><br>
> > > > > > diff --git<br>
> > > > > > a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c<br>
> > > > > > b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c<br>
> > > > > > index b090de288517..e8cd4ce120a0 100644<br>
> > > > > > ---<br>
> > > > > > a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c<br>
> > > > > > +++<br>
> > b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.<br>
> > > > > > +++ c<br>
> > > > > > @@ -1476,7 +1476,7 @@ ConSplitterStdErrDriverBindingStart (<br>
> > > > > >    // their MaxMode and QueryData should be the intersection of<br>
> > both.<br>
> > > > > >    //<br>
> > > > > >    Status = ConSplitterTextOutAddDevice (&mStdErr, TextOut,<br>
> > > > > > NULL, NULL);<br>
> > > > > > -  ConSplitterTextOutSetAttribute (&mStdErr.TextOut,<br>
> > > > > > EFI_TEXT_ATTR (EFI_MAGENTA, EFI_BLACK));<br>
> > > > > > +  ConSplitterTextOutSetAttribute (&mStdErr.TextOut,<br>
> > > > > > + EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));<br>
> > > > > ><br>
> > > > > >    return Status;<br>
> > > > > >  }<br>
> > > > > ><br>
> > > > ><br>
> > > > > I am very curious as to how this patch is going to fare, as Andy<br>
> > > > > Lutomirski (CC'd) reported the same symptom in a Fedora bugzilla<br>
> > > > > ticket<br>
> > > > > 4+ years ago:<br>
> > > > ><br>
> > > > > </span><a href="https://bugzilla.redhat.com/show_bug.cgi?id=1355913"><span style="font-size:11.0pt">https://bugzilla.redhat.com/show_bug.cgi?id=1355913</span></a><span style="font-size:11.0pt"><br>
> > > > ><br>
> > > > > As you can see in that BZ, I found the same code location, I just<br>
> > > > > didn't feel up to starting another crusade on edk2-devel -- about<br>
> > > > > colors even!... So I'll be watching this one now. :)<br>
> > > > ><br>
> > > > > Thanks<br>
> > > > > Laszlo<br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > ><br>
> > > IMPORTANT NOTICE: The contents of this email and any attachments are<br>
> > > confidential and may also be privileged. If you are not the intended<br>
> > > recipient, please notify the sender immediately and do not disclose<br>
> > > the contents to any other person, use it for any purpose, or store or<br>
> > > copy the information in any medium. Thank you.<br>
> ><br>
> ><br>
> ><br>
> ><br>
> <br>
> IMPORTANT NOTICE: The contents of this email and any attachments are<br>
> confidential and may also be privileged. If you are not the intended recipient,<br>
> please notify the sender immediately and do not disclose the contents to any<br>
> other person, use it for any purpose, or store or copy the information in any<br>
> medium. Thank you.<br>
> <br>
> <br>
> <br>
> <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">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 or copy the information in any medium. Thank you.
<o:p></o:p></p>
<div>
<p class="MsoNormal"></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">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 or copy the information in any medium. Thank you.
<o:p></o:p></span></p>
</div>
</div>
</div>
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 or copy the information in any medium. Thank you.
</body>
</html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr> Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/68479">View/Reply Online (#68479)</a> |    |  <a target="_blank" href="https://groups.io/mt/78700256/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>