From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.112]) by mx.groups.io with SMTP id smtpd.web12.4651.1634883641656557133 for ; Thu, 21 Oct 2021 23:20:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=WZWpe5UZ; spf=pass (domain: os.amperecomputing.com, ip: 40.107.237.112, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VcoVjYrlZfeCaIFRhd9dyiTYLg1wdfPND4gReAnK1qYt3dtCDXGIt91gu1tVByDTtC9gZHd/CBXy1v5DBQHKmNnI5U689NW01W8CQxpMqCwGrnaPsDrc8E8S3+iNSFpFE3ed/EYqZn6ph94G6tbl4Vr0MtXKPjSdeGquNEYRXEGFfxxn4RcV6zSwCO2/EI2P9f4j3c0gEzQDjGQlScBNXAdca76vecaxPzamJC32hxKLClEYZnHKRUut6lsWWCTyhMJRSUxS1Le3JXg7nzUknj2GQ36auabCDitk1ewduq10miZCZMRNBy1O0HgpZzyDi90QvUL7n0QB8r1HwUCCvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=alGZHXQnylp+rMlTR9TKs+CztQmdh+4oZcxG5zne9mU=; b=TM+/OfkX7LvAV8gw4q0/BqdeASJ4R1Wb6UDPQZsYHVWrykDtp8LDMNUvbSJ/B0U+eUPvAR6alreegUuz9U1AoyPGTsdfpUWp2XJse2lNtU9NEuKWXOZCoPhKYJ2DW0GHN2gl2+yc9EwHSL7PzOzWs768EchR60pR2NbIYc3bHf3oGv4KHUtxAoXD1ZFvAdxoRoyvWXDJo7PTJRD067sQuyaLidQnrozy724licROdCs92O9yYqa39kBGchVKiNfM2HSF3OQzPvVCU+jEUmLbqgj80N3ymEDXQOJvcp7qWulQ96cO17ZGMblA34c+Er45uZfXwyDjvhTLV4KWHOrHtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=alGZHXQnylp+rMlTR9TKs+CztQmdh+4oZcxG5zne9mU=; b=WZWpe5UZKvGpmz5XwenW6pzMnzzSmcyQS6GroT82tAm4jrfQ6FRAiP6T3oi40II6r3ew7JF6nDV7N2T+w7r8o87LZOy7cBMCqRFWviva3aRiIhW5zIl9HNa3EGQiWDBAZsRladiWmCaF4ujpTftq/6+ZiXrmKbyCAMFFPWV3BHw= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by PH0PR01MB6213.prod.exchangelabs.com (2603:10b6:510:9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Fri, 22 Oct 2021 06:20:40 +0000 Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::254c:9533:7f35:aee]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::254c:9533:7f35:aee%4]) with mapi id 15.20.4628.016; Fri, 22 Oct 2021 06:20:40 +0000 From: "Nhi Pham" To: devel@edk2.groups.io CC: patches@amperecomputing.com, nhi@os.amperecomputing.com, vunguyen@os.amperecomputing.com, Thang Nguyen , Chuong Tran , Phong Vo , Leif Lindholm , Michael D Kinney , Ard Biesheuvel , Nate DeSimone Subject: [edk2-platforms][PATCH v4 23/31] AmpereAltraPkg: Add DebugInfoPei module Date: Fri, 22 Oct 2021 13:18:01 +0700 Message-ID: <20211022061809.31087-24-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211022061809.31087-1-nhi@os.amperecomputing.com> References: <20211022061809.31087-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: HK2PR02CA0168.apcprd02.prod.outlook.com (2603:1096:201:1f::28) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 Received: from sw004.amperecomputing.com (118.69.219.201) by HK2PR02CA0168.apcprd02.prod.outlook.com (2603:1096:201:1f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 06:20:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01c0f263-c8d8-4bfa-348b-08d9952411e2 X-MS-TrafficTypeDiagnostic: PH0PR01MB6213: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bpBW/f78hbm79hRjLQLStFSDtJwnrHP/w5Oxip//yLJN/74kEr5CK9jtZSvn56cm6VOBqHjiE5X4hnfayf53OgBdLunlKNCU4Tz77eH7QI6VuA3eARibJ4dUrk/ZGOImtDC1yM8wRjMXKIuPhYGjh3O1SRfqm3vUrt+i3Va3/+YxRTeOWVS4bvts09ERVaK9t9dwR5VPGqsnlI1LfLcyOBvckKwd/BVFQphcFDEWdsu1N+hIa7kVeyUMiv9D3QQK4bmmRjYPZlg2Q1IGVEvNNZYpHnbD9DvTEj0HXKCkcMHjrLoEv+iHaHokQMFv48XfUQ1t0RcjnsL/G/c+LYGgE0G0shOm1gQU0J4/XeFofmMzgM3MDza+soNb43nJCBQFlEmC+nLqS7d8gJQPjWfF4LLSWsePYo7qVsX4PZWZV03rUWy0IQJFa2otEdS852e8o7M+tvyRHnmChF4C660O8GGc8ZbNWyUgqBSn4qcvJAhJce5xDfypWKLwcDKzXYL3cXAKzbQh1P0dckgdZg+t3/qdYaCR1/OddBcv2hBZlUao5TLLIydF2OA1cB2tIMotZ11XjCO2FIyNtqAN3XzLD74CiSup3+1Dubber3FUxYWIM+pMNbOpyjct7YERKMbcV6UluDmny4H0/H20wndgXfNxCj65ZpkJLFdFv+W2Nk3eUStuoJc6mINeL1MbWHP2CQ1sEXiereAjBGdqwCl3/A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7287.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(52116002)(186003)(2906002)(26005)(2616005)(86362001)(5660300002)(316002)(6916009)(6666004)(83380400001)(38100700002)(508600001)(6506007)(956004)(1076003)(8936002)(6486002)(4326008)(8676002)(66556008)(66946007)(66476007)(6512007)(54906003)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PDXuFihrnjTrzXgABURI4byrH9mBiFP3SnYbsFHJTbhO06FpP4b+OQT1r0oF?= =?us-ascii?Q?RTKTt00sfXBhNH10bA+km/PHvx/MWf015nXrN2iNJi3WS/Rzpg113LgU7Ssq?= =?us-ascii?Q?gYbBMP2BWQkqpre2q5UN2B9OmVdgw3OIZGYd8myNC+Ak3/rQ1arpb7TvWCvi?= =?us-ascii?Q?OTdEwOiXNB3/PnYwo4oQGLlExkSCCgpc5Ie9DSxkRNsDbynstR6eIu2DiMhC?= =?us-ascii?Q?zzZERAQaEPI7RNUCGpCP/wZnv+pLPB+SWhCOAfBn93Xwe6/UfcV/nDKFA/Eg?= =?us-ascii?Q?+H/8fMr3CXu9hVIaltvVrUWOoZLrnORr/Por8IxDOOuvVzwxespwmf9u1tn9?= =?us-ascii?Q?6tnUy7AkFRvfxBaynLLE0gDv7j8PIrApdovHO2A6C1xCR474EpNOKbBzZS0S?= =?us-ascii?Q?7HYjgMPQwOjCjL9HnLGKHtTdb9g6v0YidbFdhgcyXlyk/JbfeCg4OpXvi78C?= =?us-ascii?Q?NN1n5hlEFIclHA6BO+nxtpuAV7unklKKyE1iXANoAB0xab6HjHKChvv1iQlJ?= =?us-ascii?Q?rJG1Vx71CJH/2Vy135E1qriAeyqauaPluaJw3J77/1vNaTyzTR26AuG8FS4M?= =?us-ascii?Q?eIoTP7lFFptKLYT+zc5bAhkoZXFPlWsRDFtTnTnK16dFb4801oRUsAVCbxF/?= =?us-ascii?Q?XfUQ5GX3QovRqRQh7w+QMSGJBzwETXQVqwkOFYF+Kt/wFmZhhRb6Jq/X4PjQ?= =?us-ascii?Q?Mc+EbLkYbzw4KzYJmpT/PLH65KNGotem9DvUy45tvi9wY2g/N3/oee5E53hn?= =?us-ascii?Q?h0gqTUsDBah2WvxKm9X5K2rcVZj8q1roSiMEJhLKm6CiHxhK0/rIwo/VFQY7?= =?us-ascii?Q?Q81e7huFlmQg0oivQGOR4YAJakQSTk6zYYBLDWvt1Yx1UCTRObefXT1tBHxS?= =?us-ascii?Q?9TuVX5teZhoIVHbTcFSyBmGenuzUC3hkhrVvCSqn4IqDTQ8AJ3MVhWgLQbO/?= =?us-ascii?Q?dSxq0q5xa6hkusMqApc8c5nNYwKc+Sy3Sm1iqHVsPu7gVE9GgY7aHSwilE+r?= =?us-ascii?Q?BDa4LJztTyj//GDsUEQ9ictOpSkL0fRChGupHbzk/Rwq8wtzGACFcrjUqcuD?= =?us-ascii?Q?6XLWdeZeUdZPgamWhGxEG79N1YuFnnaPBRZzVr8UxTE4poiF2k4qunoyYb3k?= =?us-ascii?Q?nkGWrfg4s3TSkS2/zqhdnFYNTqRBCH/TZViYMfbbKvLh+cypiBi2XwCK3Zzx?= =?us-ascii?Q?SNPIaycvMRhHQiik/qqh7QPyt+XfEYqByDe0E9XEAGrDQSk5BjLsy1l+Qgq2?= =?us-ascii?Q?8CS8Te2dYVYmWNtSM0UNEuqdkdsmQKYANI4IW+pZ/mLYai6QM8zBRtkiKEAo?= =?us-ascii?Q?cqFIsMrtDk8g9NvdEft70xrd?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01c0f263-c8d8-4bfa-348b-08d9952411e2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2021 06:20:40.4797 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nhi@amperemail.onmicrosoft.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB6213 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Vu Nguyen Helps to show various system information like CPU info and Board Setting values to UART console during boot process. Cc: Thang Nguyen Cc: Chuong Tran Cc: Phong Vo Cc: Leif Lindholm Cc: Michael D Kinney Cc: Ard Biesheuvel Cc: Nate DeSimone Signed-off-by: Nhi Pham Reviewed-by: Leif Lindholm --- Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc | 4 = + Platform/Ampere/JadePkg/Jade.fdf | 2 = + Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf | 40 = ++++ Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.c | 209 = ++++++++++++++++++++ 4 files changed, 255 insertions(+) diff --git a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc b/Silicon= /Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc index d25e34ffc6e7..16e561bb9f78 100644 --- a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc +++ b/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc @@ -535,6 +535,10 @@ [Components.common] ArmPlatformPkg/PlatformPei/PlatformPeim.inf Silicon/Ampere/AmpereAltraPkg/Drivers/ATFHobPei/ATFHobPeim.inf ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf + Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf { + + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf + } Silicon/Ampere/AmpereAltraPkg/Drivers/FlashPei/FlashPei.inf Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.inf ArmPkg/Drivers/CpuPei/CpuPei.inf diff --git a/Platform/Ampere/JadePkg/Jade.fdf b/Platform/Ampere/JadePkg/Jad= e.fdf index f719d9d29883..84b7b36cbc43 100644 --- a/Platform/Ampere/JadePkg/Jade.fdf +++ b/Platform/Ampere/JadePkg/Jade.fdf @@ -167,6 +167,8 @@ [FV.FVMAIN_COMPACT] # # Print platform information before passing control into the Driver Exec= ution Environment (DXE) phase # + INF Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf + INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf =20 FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPe= i.inf b/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf new file mode 100644 index 000000000000..e9c383565ce5 --- /dev/null +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf @@ -0,0 +1,40 @@ +## @file +# +# Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D DebugInfo + FILE_GUID =3D C0571D26-6176-11E9-8647-D663BD873D93 + MODULE_TYPE =3D PEIM + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D DebugInfoPeiEntryPoint + +[Sources] + DebugInfoPei.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dec + Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec + +[LibraryClasses] + AmpereCpuLib + ArmLib + DebugLib + HobLib + NVParamLib + PeimEntryPoint + +[Guids] + gPlatformInfoHobGuid + +[Depex] + TRUE diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPe= i.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.c new file mode 100644 index 000000000000..2bb01b686abc --- /dev/null +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.c @@ -0,0 +1,209 @@ +/** @file + + Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define GB_SCALE_FACTOR 1073741824 +#define MB_SCALE_FACTOR 1048576 +#define KB_SCALE_FACTOR 1024 +#define MHZ_SCALE_FACTOR 1000000 + +/** + Print any existence NVRAM. +**/ +STATIC VOID +PrintNVRAM ( + VOID + ) +{ + EFI_STATUS Status; + NVPARAM Idx; + UINT32 Val; + UINT16 ACLRd =3D NV_PERM_ALL; + BOOLEAN Flag; + + Flag =3D FALSE; + for (Idx =3D NV_PREBOOT_PARAM_START; Idx <=3D NV_PREBOOT_PARAM_MAX; Idx = +=3D NVPARAM_SIZE) { + Status =3D NVParamGet (Idx, ACLRd, &Val); + if (!EFI_ERROR (Status)) { + if (!Flag) { + DebugPrint (DEBUG_INIT, "Pre-boot Configuration Setting:\n"); + Flag =3D TRUE; + } + DebugPrint (DEBUG_INIT, " %04X: 0x%X (%d)\n", (UINT32)Idx, Val, V= al); + } + } + + Flag =3D FALSE; + for (Idx =3D NV_MANU_PARAM_START; Idx <=3D NV_MANU_PARAM_MAX; Idx +=3D N= VPARAM_SIZE) { + Status =3D NVParamGet (Idx, ACLRd, &Val); + if (!EFI_ERROR (Status)) { + if (!Flag) { + DebugPrint (DEBUG_INIT, "Manufacturer Configuration Setting:\n"); + Flag =3D TRUE; + } + DebugPrint (DEBUG_INIT, " %04X: 0x%X (%d)\n", (UINT32)Idx, Val, V= al); + } + } + + Flag =3D FALSE; + for (Idx =3D NV_USER_PARAM_START; Idx <=3D NV_USER_PARAM_MAX; Idx +=3D N= VPARAM_SIZE) { + Status =3D NVParamGet (Idx, ACLRd, &Val); + if (!EFI_ERROR (Status)) { + if (!Flag) { + DebugPrint (DEBUG_INIT, "User Configuration Setting:\n"); + Flag =3D TRUE; + } + DebugPrint (DEBUG_INIT, " %04X: 0x%X (%d)\n", (UINT32)Idx, Val, V= al); + } + } + + Flag =3D FALSE; + for (Idx =3D NV_BOARD_PARAM_START; Idx <=3D NV_BOARD_PARAM_MAX; Idx +=3D= NVPARAM_SIZE) { + Status =3D NVParamGet (Idx, ACLRd, &Val); + if (!EFI_ERROR (Status)) { + if (!Flag) { + DebugPrint (DEBUG_INIT, "Board Configuration Setting:\n"); + Flag =3D TRUE; + } + DebugPrint (DEBUG_INIT, " %04X: 0x%X (%d)\n", (UINT32)Idx, Val, V= al); + } + } +} + +STATIC +CHAR8 * +GetCCIXLinkSpeed ( + IN UINTN Speed + ) +{ + switch (Speed) { + case 1: + return "2.5 GT/s"; + + case 2: + return "5 GT/s"; + + case 3: + return "8 GT/s"; + + case 4: + case 6: + return "16 GT/s"; + + case 0xa: + return "20 GT/s"; + + case 0xf: + return "25 GT/s"; + } + + return "Unknown"; +} + +/** + Print system info +**/ +STATIC VOID +PrintSystemInfo ( + VOID + ) +{ + UINTN Idx; + VOID *Hob; + PLATFORM_INFO_HOB *PlatformHob; + + Hob =3D GetFirstGuidHob (&gPlatformInfoHobGuid); + if (Hob =3D=3D NULL) { + return; + } + + PlatformHob =3D (PLATFORM_INFO_HOB *)GET_GUID_HOB_DATA (Hob); + + DebugPrint (DEBUG_INIT, "SCP FW version : %a\n", (const CHAR8 *)Platf= ormHob->SmPmProVer); + DebugPrint (DEBUG_INIT, "SCP FW build date : %a\n", (const CHAR8 *)Platf= ormHob->SmPmProBuild); + + DebugPrint (DEBUG_INIT, "Failsafe status : %d\n", Platfo= rmHob->FailSafeStatus); + DebugPrint (DEBUG_INIT, "Reset status : %d\n", Platfo= rmHob->ResetStatus); + DebugPrint (DEBUG_INIT, "CPU info\n"); + DebugPrint (DEBUG_INIT, " CPU ID : %X\n", ArmRea= dMidr ()); + DebugPrint (DEBUG_INIT, " CPU Clock : %d MHz\n", Pl= atformHob->CpuClk / MHZ_SCALE_FACTOR); + DebugPrint (DEBUG_INIT, " Number of active sockets : %d\n", GetNum= berOfActiveSockets ()); + DebugPrint (DEBUG_INIT, " Number of active cores : %d\n", GetNum= berOfActiveCores ()); + if (IsSlaveSocketActive ()) { + DebugPrint (DEBUG_INIT, + " Inter Socket Connection 0 : Width: x%d / Speed %a\n", + PlatformHob->Link2PWidth[0], + GetCCIXLinkSpeed (PlatformHob->Link2PSpeed[0]) + ); + DebugPrint (DEBUG_INIT, + " Inter Socket Connection 1 : Width: x%d / Speed %a\n", + PlatformHob->Link2PWidth[1], + GetCCIXLinkSpeed (PlatformHob->Link2PSpeed[1]) + ); + } + for (Idx =3D 0; Idx < GetNumberOfActiveSockets (); Idx++) { + DebugPrint (DEBUG_INIT, " Socket[%d]: Core voltage : %d\n", Idx= , PlatformHob->CoreVoltage[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: SCU ProductID : %X\n", Idx= , PlatformHob->ScuProductId[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: Max cores : %d\n", Idx= , PlatformHob->MaxNumOfCore[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: Warranty : %d\n", Idx= , PlatformHob->Warranty[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: Subnuma : %d\n", Idx= , PlatformHob->SubNumaMode[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: RC disable mask : %X\n", Idx= , PlatformHob->RcDisableMask[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: AVS enabled : %d\n", Idx= , PlatformHob->AvsEnable[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: AVS voltage : %d\n", Idx= , PlatformHob->AvsVoltageMV[Idx]); + } + + DebugPrint (DEBUG_INIT, "SOC info\n"); + DebugPrint (DEBUG_INIT, " DDR Frequency : %d MHz\n", Pl= atformHob->DramInfo.MaxSpeed); + for (Idx =3D 0; Idx < GetNumberOfActiveSockets (); Idx++) { + DebugPrint (DEBUG_INIT, " Socket[%d]: Soc voltage : %d\n", Idx= , PlatformHob->SocVoltage[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: DIMM1 voltage : %d\n", Idx= , PlatformHob->Dimm1Voltage[Idx]); + DebugPrint (DEBUG_INIT, " Socket[%d]: DIMM2 voltage : %d\n", Idx= , PlatformHob->Dimm2Voltage[Idx]); + } + + DebugPrint (DEBUG_INIT, " PCP Clock : %d MHz\n", Pl= atformHob->PcpClk / MHZ_SCALE_FACTOR); + DebugPrint (DEBUG_INIT, " SOC Clock : %d MHz\n", Pl= atformHob->SocClk / MHZ_SCALE_FACTOR); + DebugPrint (DEBUG_INIT, " SYS Clock : %d MHz\n", Pl= atformHob->SysClk / MHZ_SCALE_FACTOR); + DebugPrint (DEBUG_INIT, " AHB Clock : %d MHz\n", Pl= atformHob->AhbClk / MHZ_SCALE_FACTOR); +} + +/** + Entry point function for the PEIM + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @return EFI_SUCCESS If we installed our PPI + +**/ +EFI_STATUS +EFIAPI +DebugInfoPeiEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + PrintSystemInfo (); + PrintNVRAM (); + + return EFI_SUCCESS; +} --=20 2.17.1