From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 3F3341A1FB5 for ; Thu, 22 Sep 2016 14:21:45 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 22 Sep 2016 14:21:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,379,1470726000"; d="scan'208";a="12358022" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 22 Sep 2016 14:21:44 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Sep 2016 14:21:44 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.80]) by fmsmsx118.amr.corp.intel.com ([10.18.116.18]) with mapi id 14.03.0248.002; Thu, 22 Sep 2016 14:21:44 -0700 From: "Carsey, Jaben" To: "Shah, Tapan" , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" Thread-Topic: [PATCH] ShellPkg: Add Persistent Memory support in 'memmap' command Thread-Index: AQHSFQ40p+oG6OSsAU2q01bk3mDDwaCGAi9AgAB14wD//4xvAA== Date: Thu, 22 Sep 2016 21:21:43 +0000 Message-ID: References: <1474575378-13968-1-git-send-email-tapandshah@hpe.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWZiZDc5MzYtOGMzOS00MWFkLWE1ZGItNGMyOGFlNmJlOGJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlpGeklHRDdQbVIwVGVtalBcL2hHYVl3Y3E0TVpnWElcL1ljdklva1ZyWWxcL2M9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg: Add Persistent Memory support in 'memmap' command X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 21:21:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey And commited. > -----Original Message----- > From: Shah, Tapan [mailto:tapandshah@hpe.com] > Sent: Thursday, September 22, 2016 2:15 PM > To: Carsey, Jaben ; edk2-devel@lists.01.org > Subject: RE: [PATCH] ShellPkg: Add Persistent Memory support in 'memmap' > command > Importance: High >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Tapan Shah >=20 > -----Original Message----- > From: Carsey, Jaben [mailto:jaben.carsey@intel.com] > Sent: Thursday, September 22, 2016 4:14 PM > To: Shah, Tapan ; edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: RE: [PATCH] ShellPkg: Add Persistent Memory support in 'memmap' > command >=20 > Can you reply with your attestation and signed off by lines? >=20 > > -----Original Message----- > > From: Tapan Shah [mailto:tapandshah@hpe.com] > > Sent: Thursday, September 22, 2016 1:16 PM > > To: edk2-devel@lists.01.org > > Cc: Carsey, Jaben ; Tapan Shah > > > > Subject: [PATCH] ShellPkg: Add Persistent Memory support in 'memmap' > > command > > Importance: High > > > > As per ECR 1416, latest UEFI Shell 2.2 Specification has added > > Persistent Memory support in 'memmap' command. > > --- > > ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c | 13 > > ++++++++++--- > > .../UefiShellDebug1CommandsLib.uni | 3 ++- > > 2 files changed, 12 insertions(+), 4 deletions(-) > > > > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c > > index 81c561f..a4eb1be 100644 > > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c > > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c > > @@ -1,6 +1,7 @@ > > /** @file > > Main file for Mode shell Debug1 function. > > > > + (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> > (C) Copyright 2013-2015 Hewlett-Packard Development Company, > L.P.
> > Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. > > This program and the accompanying materials @@ -100,6 +101,8 @@ > > ShellCommandRunMemMap ( > > UINT64 UnusableMemoryPagesSize; > > UINT64 PalCodePages; > > UINT64 PalCodePagesSize; > > + UINT64 PersistentPages; > > + UINT64 PersistentPagesSize; > > BOOLEAN Sfo; > > > > AcpiReclaimPages =3D 0; > > @@ -117,6 +120,7 @@ ShellCommandRunMemMap ( > > MmioPortPages =3D 0; > > UnusableMemoryPages =3D 0; > > PalCodePages =3D 0; > > + PersistentPages =3D 0; > > Size =3D 0; > > Buffer =3D NULL; > > ShellStatus =3D SHELL_SUCCESS; > > @@ -210,8 +214,8 @@ ShellCommandRunMemMap ( > > break; > > case EfiPersistentMemory: > > ShellPrintHiiEx(-1, -1, NULL, > > (EFI_STRING_ID)(!Sfo?STRING_TOKEN > (STR_MEMMAP_LIST_ITEM):STRING_TOKEN > > (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, > > NameEfiPersistentMemory, ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > >PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > > >PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker > > )->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > >NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); > > - AvailPages +=3D ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > >NumberOfPages; > > - TotalPages +=3D ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > >NumberOfPages; > > + PersistentPages +=3D ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > >NumberOfPages; > > + TotalPages +=3D ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > >NumberOfPages; > > break; > > case EfiUnusableMemory: > > ShellPrintHiiEx(-1, -1, NULL, > > (EFI_STRING_ID)(!Sfo?STRING_TOKEN > (STR_MEMMAP_LIST_ITEM):STRING_TOKEN > > (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, > > !Sfo?NameEfiUnusableMemoryShort:NameEfiUnusableMemory, > > ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, > > ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > > >PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker > > )->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)- > > >NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); > > @@ -261,6 +265,7 @@ ShellCommandRunMemMap ( > > MmioSpacePagesSize =3D MultU64x64(SIZE_4KB,MmioSpacePages= ); > > MmioPortPagesSize =3D MultU64x64(SIZE_4KB,MmioPortPages)= ; > > PalCodePagesSize =3D MultU64x64(SIZE_4KB,PalCodePages); > > + PersistentPagesSize =3D MultU64x64(SIZE_4KB,PersistentPage= s); > > UnusableMemoryPagesSize =3D > > MultU64x64(SIZE_4KB,UnusableMemoryPages); > > if (!Sfo) { > > ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN > > (STR_MEMMAP_LIST_SUMM), gShellDebug1HiiHandle, @@ -277,6 +282,7 > @@ > > ShellCommandRunMemMap ( > > MmioPortPages, MmioPortPagesSize, > > PalCodePages, PalCodePagesSize, > > AvailPages, AvailPagesSize, > > + PersistentPages, PersistentPagesSize, > > DivU64x32(MultU64x64(SIZE_4KB,TotalPages), SIZE_1MB), > > TotalPagesSize > > ); > > } else { > > @@ -295,7 +301,8 @@ ShellCommandRunMemMap ( > > UnusableMemoryPagesSize, > > AcpiReclaimPagesSize, > > AcpiNvsPagesSize, > > - PalCodePagesSize > > + PalCodePagesSize, > > + PersistentPagesSize > > ); > > } > > } > > diff --git > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.uni > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.uni > > index c6c7ba9..52c2af0 100644 > > --- > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.uni > > +++ > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.uni > > @@ -116,10 +116,11 @@ > > " MMIO_Port : %,14l= d Pages (%,ld Bytes)\r\n" > > " PalCode : %,14l= d Pages (%,ld Bytes)\r\n" > > " Available : %,14l= d Pages (%,ld Bytes)\r\n" > > + " Persistent: %,14l= d Pages (%,ld Bytes)\r\n" > > " -----= --------- \r\n" > > "Total Memory: %,14l= d MB (%,ld Bytes)\r\n" > > #string STR_MEMMAP_LIST_ITEM_SFO #language en-US > > "MemoryMap,"%s","%LX","%LX","%LX","%LX"\r\n" > > -#string STR_MEMMAP_LIST_SUMM_SFO #language en-US > > > "MemoryMapSummary,"%Ld","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld > > ","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld"\r\n" > > +#string STR_MEMMAP_LIST_SUMM_SFO #language en-US > > > "MemoryMapSummary,"%Ld","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld > > ","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld","%Ld"\r\n" > > > > #string STR_EFI_COMPRESS_FAIL #language en-US "Unable to > compress: > > %r.\r\n" > > #string STR_EFI_DECOMPRESS_FAIL #language en-US "Unable to > > decompress: %r.\r\n" > > -- > > 1.9.5.msysgit.0 >=20