From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ray.ni@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Thu, 22 Aug 2019 16:12:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Aug 2019 16:12:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,418,1559545200"; d="scan'208";a="173298534" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 22 Aug 2019 16:12:18 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 22 Aug 2019 16:12:18 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 22 Aug 2019 16:12:17 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.163]) with mapi id 14.03.0439.000; Fri, 23 Aug 2019 07:12:15 +0800 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Justen, Jordan L" , Andrew Fish , Tim Lewis Subject: Re: [edk2-devel] [Patch][edk2-stable201908 2/2] EmulatorPkg/Win/Host: Fix SecPrint() log line endings Thread-Topic: [edk2-devel] [Patch][edk2-stable201908 2/2] EmulatorPkg/Win/Host: Fix SecPrint() log line endings Thread-Index: AQHVWJJgIoFUeum78kyG6w3b7A0ri6cHzHGg Date: Thu, 22 Aug 2019 23:12:15 +0000 Deferred-Delivery: Thu, 22 Aug 2019 23:11:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C2951D4@SHSMSX104.ccr.corp.intel.com> References: <20190822023610.2068-1-michael.d.kinney@intel.com> <20190822023610.2068-3-michael.d.kinney@intel.com> In-Reply-To: <20190822023610.2068-3-michael.d.kinney@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Michael D > Kinney > Sent: Thursday, August 22, 2019 10:36 AM > To: devel@edk2.groups.io > Cc: Justen, Jordan L ; Ni, Ray ; > Andrew Fish ; Tim Lewis > Subject: [edk2-devel] [Patch][edk2-stable201908 2/2] EmulatorPkg/Win/Hos= t: > Fix SecPrint() log line endings >=20 > Update use of SecPrint() to consistently use \n\r for > line endings to fix formatting issues in the debug log. >=20 > Cc: Jordan Justen > Cc: Ray Ni > Cc: Andrew Fish > Cc: Tim Lewis > Signed-off-by: Michael D Kinney > --- > EmulatorPkg/Win/Host/WinHost.c | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) >=20 > diff --git a/EmulatorPkg/Win/Host/WinHost.c > b/EmulatorPkg/Win/Host/WinHost.c > index 9c6acac279..9aba3c8959 100644 > --- a/EmulatorPkg/Win/Host/WinHost.c > +++ b/EmulatorPkg/Win/Host/WinHost.c > @@ -408,7 +408,7 @@ Returns: > MemorySizeStr =3D (CHAR16 *) PcdGetPtr (PcdEmuMemorySize); > FirmwareVolumesStr =3D (CHAR16 *) PcdGetPtr (PcdEmuFirmwareVolume); >=20 > - SecPrint ("\nEDK II WIN Host Emulation Environment from > http://www.tianocore.org/edk2/\n"); > + SecPrint ("\n\rEDK II WIN Host Emulation Environment from > http://www.tianocore.org/edk2/\n\r"); >=20 > // > // Determine the first thread available to this process. > @@ -450,7 +450,7 @@ Returns: > gSystemMemoryCount =3D CountSeparatorsInString (MemorySizeStr, '!') = + 1; > gSystemMemory =3D calloc (gSystemMemoryCount, sizeof > (NT_SYSTEM_MEMORY)); > if (gSystemMemory =3D=3D NULL) { > - SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", > MemorySizeStr); > + SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n\r", > MemorySizeStr); > exit (1); > } >=20 > @@ -460,13 +460,13 @@ Returns: > gFdInfoCount =3D CountSeparatorsInString (FirmwareVolumesStr, '!') += 1; > gFdInfo =3D calloc (gFdInfoCount, sizeof (NT_FD_INFO)); > if (gFdInfo =3D=3D NULL) { > - SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", > FirmwareVolumesStr); > + SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n\r", > FirmwareVolumesStr); > exit (1); > } > // > // Setup Boot Mode. > // > - SecPrint (" BootMode 0x%02x\n", PcdGet32 (PcdEmuBootMode)); > + SecPrint (" BootMode 0x%02x\n\r", PcdGet32 (PcdEmuBootMode)); >=20 > // > // Allocate 128K memory to emulate temp memory for PEI. > @@ -476,12 +476,12 @@ Returns: > TemporaryRamSize =3D TEMPORARY_RAM_SIZE; > TemporaryRam =3D VirtualAlloc (NULL, (SIZE_T) (TemporaryRamSize), > MEM_COMMIT, PAGE_EXECUTE_READWRITE); > if (TemporaryRam =3D=3D NULL) { > - SecPrint ("ERROR : Can not allocate enough space for SecStack\n"); > + SecPrint ("ERROR : Can not allocate enough space for SecStack\n\r")= ; > exit (1); > } > SetMem32 (TemporaryRam, TemporaryRamSize, PcdGet32 > (PcdInitValueInTempStack)); >=20 > - SecPrint (" OS Emulator passing in %u KB of temp RAM at 0x%08lx to S= EC\n", > + SecPrint (" OS Emulator passing in %u KB of temp RAM at 0x%08lx to S= EC\n\r", > TemporaryRamSize / SIZE_1KB, > TemporaryRam > ); > @@ -503,7 +503,7 @@ Returns: > &Size > ); > if (EFI_ERROR (Status)) { > - SecPrint ("ERROR : Could not allocate PeiServicesTablePage @ %p\n= ", > EmuMagicPage); > + SecPrint ("ERROR : Could not allocate PeiServicesTablePage @ %p\n= \r", > EmuMagicPage); > return EFI_DEVICE_ERROR; > } > } > @@ -514,7 +514,7 @@ Returns: > // > FileNamePtr =3D AllocateCopyPool (StrSize (FirmwareVolumesStr), > FirmwareVolumesStr); > if (FileNamePtr =3D=3D NULL) { > - SecPrint ("ERROR : Can not allocate memory for firmware volume stri= ng\n"); > + SecPrint ("ERROR : Can not allocate memory for firmware volume > string\n\r"); > exit (1); > } >=20 > @@ -540,11 +540,11 @@ Returns: > &gFdInfo[Index].Size > ); > if (EFI_ERROR (Status)) { > - SecPrint ("ERROR : Can not open Firmware Device File %S (0x%X). > Exiting.\n", FileName, Status); > + SecPrint ("ERROR : Can not open Firmware Device File %S (0x%X). > Exiting.\n\r", FileName, Status); > exit (1); > } >=20 > - SecPrint (" FD loaded from %S\n", FileName); > + SecPrint (" FD loaded from %S", FileName); >=20 > if (SecFile =3D=3D NULL) { > // > @@ -565,7 +565,7 @@ Returns: > } > } >=20 > - SecPrint ("\n"); > + SecPrint ("\n\r"); > } > // > // Calculate memory regions and store the information in the gSystemM= emory > @@ -590,7 +590,7 @@ Returns: > MemorySizeStr =3D MemorySizeStr + Index1 + 1; > } >=20 > - SecPrint ("\n"); > + SecPrint ("\n\r"); >=20 > // > // Hand off to SEC Core > @@ -601,7 +601,7 @@ Returns: > // If we get here, then the SEC Core returned. This is an error as SE= C should > // always hand off to PEI Core and then on to DXE Core. > // > - SecPrint ("ERROR : SEC returned\n"); > + SecPrint ("ERROR : SEC returned\n\r"); > exit (1); > } >=20 > -- > 2.21.0.windows.1 >=20 >=20 >=20