From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0717.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::717]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 487171A1FA4 for ; Thu, 22 Sep 2016 14:15:20 -0700 (PDT) Received: from CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.151) by CS1PR84MB0231.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Thu, 22 Sep 2016 21:15:18 +0000 Received: from CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.151]) by CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.151]) with mapi id 15.01.0639.006; Thu, 22 Sep 2016 21:15:18 +0000 From: "Shah, Tapan" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] ShellPkg: Add Persistent Memory support in 'memmap' command Thread-Index: AQHSFQ48bKWyug57C0mVBbILzx0c76CGAkcAgAAAbSA= Date: Thu, 22 Sep 2016 21:15:18 +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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=tapandshah@hpe.com; x-originating-ip: [15.203.227.10] x-ms-office365-filtering-correlation-id: 4bd61b77-3b5a-4ffa-3f19-08d3e32d8e23 x-microsoft-exchange-diagnostics: 1; CS1PR84MB0231; 6:TRNLcjUCdVAGNXwWg06xu+E6a7dxXKigmIKK/04PmPT+q28Vkr3XlJ0Bd83H1LbkO7cD/Hzbk1eTcOWuSLTtShYdYsOgzdx6Yb+KDdmS7gzLhtBzE1ZmOongOl/eWSXgCy8tAO040van/+P6EhNIyN8iWvOvCGjMSWlEI8tt7GogaiHXeKg1SM4ieMlwUgQmXZAcmj925FXN9zikZY4Qk1ya9J0Rf6ilcVWtfAtNXLqUNoaSVDg/6vRUyIzHD3tKJ/5t8FdpIaYQtgFQzG4f9x93uwu6T6OWGmuofW2TyRU7XpDXIVbD3Cr1w2SSaiXlQEtXb7i3Sogz41fU5lkkwA==; 5:tLl4gjktDDAgEq3z4GjLKQWUpfSh/F5oysBt7sE9ispwrFEeTeZsYdkuaanMzGwGCiev1F4ArkfBQlSOa5xMnA6TSGUm+RIOTHryF503F7upgHTASj6aLyne5SGLefl9BEkmm+DQZvFeVLxBiZKuhA==; 24:ZcIu/EhXfRACQarRJqREmBTXh5DqmgATwV746DvVEdv+cTRgy1xL1qlj2uHTOxc1rsElO1wg+n9G92C8qa/EPhCWCY2+V8VvBApRhfxlyYM=; 7:28Yzdg9075vj1J5Jg2w/YIf0Td7ejCZpfuN+aDOU475fLZN2JJUVEaphYkU2dLwG5CRsvtDcPuTUu5J8FqvC3QXdXlIcsnSR+CzpVMVECtJKCak/c2jqiozo0UykFo24SD5oY3aXgD/X8uc6mMilqtkYLsXfgk8IFBnwPmM58+u9St4E8zwJaRFMvvtnS9GdG1BsbXY2KBRdnw8NVUmrYNYLH3XByPo3f7kO1GGT/9t2uzvoOn19BCWQUDgLP/PphmoO9O0iskYNSWy8l/GEdUz/mMsJPmOWJsPk+AlV3YeBQs4HQoN9aiTZucH+3UAo x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0231; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:CS1PR84MB0231; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0231; x-forefront-prvs: 0073BFEF03 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(189002)(377454003)(13464003)(2900100001)(122556002)(101416001)(8936002)(2950100001)(8676002)(10400500002)(33656002)(92566002)(11100500001)(2501003)(5002640100001)(107886002)(5001770100001)(97736004)(87936001)(66066001)(7846002)(54356999)(7696004)(19580405001)(105586002)(102836003)(3846002)(189998001)(3280700002)(6116002)(19580395003)(5660300001)(106116001)(86362001)(99286002)(74316002)(586003)(7736002)(50986999)(76176999)(2906002)(68736007)(305945005)(3660700001)(106356001)(77096005)(81156014)(9686002)(81166006)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0231; H:CS1PR84MB0229.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2016 21:15:18.5728 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0231 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:15:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah -----Original Message----- From: Carsey, Jaben [mailto:jaben.carsey@intel.com]=20 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' co= mmand 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=20 > > 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=20 > 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 @@=20 > 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,=20 > (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN > (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle,=20 > 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,=20 > (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN > (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle,=20 > !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=20 > (STR_MEMMAP_LIST_SUMM), gShellDebug1HiiHandle, @@ -277,6 +282,7 @@=20 > ShellCommandRunMemMap ( > MmioPortPages, MmioPortPagesSize, > PalCodePages, PalCodePagesSize, > AvailPages, AvailPagesSize, > + PersistentPages, PersistentPagesSize, > DivU64x32(MultU64x64(SIZE_4KB,TotalPages), SIZE_1MB),=20 > 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=20 > "MemoryMap,"%s","%LX","%LX","%LX","%LX"\r\n" > -#string STR_MEMMAP_LIST_SUMM_SFO #language en-US=20 > "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