From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 052DA1A1FCA for ; Thu, 22 Sep 2016 14:13:43 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 22 Sep 2016 14:13:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,379,1470726000"; d="scan'208";a="764600055" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 22 Sep 2016 14:13:43 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Sep 2016 14:13:43 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.80]) by fmsmsx111.amr.corp.intel.com ([169.254.12.12]) with mapi id 14.03.0248.002; Thu, 22 Sep 2016 14:13:42 -0700 From: "Carsey, Jaben" To: Tapan Shah , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" Thread-Topic: [PATCH] ShellPkg: Add Persistent Memory support in 'memmap' command Thread-Index: AQHSFQ40p+oG6OSsAU2q01bk3mDDwaCGAi9A Date: Thu, 22 Sep 2016 21:13:42 +0000 Message-ID: References: <1474575378-13968-1-git-send-email-tapandshah@hpe.com> In-Reply-To: <1474575378-13968-1-git-send-email-tapandshah@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjIxMjk0MjUtNGYwOC00YzdmLWI2MDctNmQ0M2MyOGJkNmQxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ild0VFpvWkNRQ1pNQWczZXJ2RHNqU05NanpyR0hzNzZySWRtaDJBUGJxSUU9In0= 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:13:44 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Can you reply with your attestation and signed off by lines? > -----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 >=20 > 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(-) >=20 > 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. >=20 > + (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; >=20 > 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,PersistentPages)= ; > 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 : %,14ld = Pages (%,ld Bytes)\r\n" > " PalCode : %,14ld = Pages (%,ld Bytes)\r\n" > " Available : %,14ld = Pages (%,ld Bytes)\r\n" > + " Persistent: %,14ld = Pages (%,ld Bytes)\r\n" > " -------= ------- \r\n" > "Total Memory: %,14ld = 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" >=20 > #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