From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.136]) by mx.groups.io with SMTP id smtpd.web10.5464.1622023939633540658 for ; Wed, 26 May 2021 03:12:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=Zhk9Afgu; spf=pass (domain: os.amperecomputing.com, ip: 40.107.94.136, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VZ/cpa1sfQvHRsFyxTzybam5dQ3/wviie8Yxop2J+n184PAZ8ucIqj+JPqMF/Xwc5jF+5Q8Sud0L1IqjM93D2yxFl+5+3EPLbHSfu30rijZqEa3HWoowTQltcBdp9VTRRZYtqsHlIy/5n1YQ3nL+/MdpyKOEl2tWhRdwTmpBcyCKW6Xg8w6WuqPwn5iO8EiPTujckWjgBKYke/DQ89axVJ1i8MWP1GN6Tr8TlCitex+kAMODmbCvuzeNSdYlvicUFXgQsgAVohPYSoekWWepV7dHupnLY6D5fa+vpZBYFynGcQq0Afjxf3SfbRJ0qNQiJ+qRVHfOF05Uk0Ptjy/z8w== 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-SenderADCheck; bh=ZOJtH8WhuOiebCHDfoF7oCcSv3N6N9lu1bJRP3+/stg=; b=Hc4+iTRi70ZLaYVjMDfZLnGyzugE8nObV4bbZGdRHccYgNxFhNbB+P2VBtCja1oAlKUcQK/Ar7g/oXM0q0FhgFMKZurJg6DVAnJIG/gBJ0pE13Gjg7D+GjYs+7ASRi62uqQ+uVrgRffb41y2ZP3nqgMuXaf9OOubo/Iy/N2W9SGcWX8p+ZWssc18HJgWm7Q66IOk8ks2sqMWf17dO2zyA7G+ZaVK8vKPA1k1GmtuZiJjc0AqoBTk3iRbi1LIaGwj+vQrzL+svy+jRDNjuxH3bpXAMPmcsdn1od/Dlz3bfEeDP0xtBMPpyomXJ5Yy4I8B9QPbX4JVV1xERUlu/8ka0g== 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=ZOJtH8WhuOiebCHDfoF7oCcSv3N6N9lu1bJRP3+/stg=; b=Zhk9Afguxv4pYY+oe8ATebglaGhxqOUk/mwpuh7YLoKjpT3xjBSiBHooCcZm478+dn9393aROTShHloEKlrzgbiDxhFGKaJ6JXCUqmqgnx9OV4SVMaakwdq4Q0CWLWz7ub8Ru34Qo4OoT/HomlvGPYGoNmdMmxUa5nsK81Piheg= 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 DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) by DM5PR01MB2426.prod.exchangelabs.com (2603:10b6:3:3b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Wed, 26 May 2021 10:12:18 +0000 Received: from DM6PR01MB5849.prod.exchangelabs.com ([fe80::60d2:86dd:1f1c:51dd]) by DM6PR01MB5849.prod.exchangelabs.com ([fe80::60d2:86dd:1f1c:51dd%7]) with mapi id 15.20.4173.020; Wed, 26 May 2021 10:12:18 +0000 From: "Nhi Pham" To: devel@edk2.groups.io CC: Vu Nguyen , Thang Nguyen , Chuong Tran , Phong Vo , Leif Lindholm , Michael D Kinney , Ard Biesheuvel , Nate DeSimone Subject: [edk2-platforms][PATCH v2 21/32] AmpereAltraPkg: Add DebugInfoPei module Date: Wed, 26 May 2021 17:07:13 +0700 Message-ID: <20210526100724.5359-23-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210526100724.5359-1-nhi@os.amperecomputing.com> References: <20210526100724.5359-1-nhi@os.amperecomputing.com> X-Originating-IP: [118.69.219.201] X-ClientProxiedBy: HKAPR04CA0008.apcprd04.prod.outlook.com (2603:1096:203:d0::18) To DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (118.69.219.201) by HKAPR04CA0008.apcprd04.prod.outlook.com (2603:1096:203:d0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Wed, 26 May 2021 10:12:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c15e3e27-4f42-4305-3bf9-08d9202ebe0e X-MS-TrafficTypeDiagnostic: DM5PR01MB2426: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XCREOLX12JC+v5pP6EsmA2hfquRiB4RaithEcYU5f/UKQBQSzqUs+Jxnn5VECOTYGrXpLzQi4/CSr/L1AVIgR+652LRVjsmgOfSqQrBvYSzt40CirdWjfhWSc8PpYJl5OsqQouIHUm3PM8yLGS6mMjvu0jRIvGM49fORZxGW6IA7sNLl6DEao4YApIUSLqDQ+6qoSJUYSm85t3Qb6iw1cWQvS6n+o1XdkRnI00yx3R+h1sIXxxQVaVdjLe7skE9/ktx0Mv39o+RIy5TmPUIAf18XA+TEebbE43qZVeNIOuqDDJU9fFY5MJO1svH0zCVLizzv5fLY7strVG/+AEpXHiNPAzGKm4nZWM5O+51zB/KS37OHdDoQe5ifd5IoxeRD6jO2t3hESMj7LfE7dea2fJYFsEBvTSP9W5f+ICvTAb1999EEHcGcCnIlmBePuLGIcT/JOmjzph/huemYkXPasqVN2EqAhQbhkj2RPvpq7Ibimlzl7wkxGbQBC0C8PJh9Q6EfS9sJCjBW5EsjPN6o7QrV3Z+yhVljKDyluSh6tSLswgWOkxUFw3pK5T1HsaQO2i6bWZmrJELYbqAIfh/Kga9XGd14GJmb59Xu4c71xvp4IkJCVNUeBbbFetJxw/n5rhJwVVXOaFjLajs9e+rzQ6ru6XkUPH+DUEpMIUy7AMx5L8iB5mjzbTcrgClfhMpA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB5849.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(39850400004)(136003)(346002)(366004)(376002)(186003)(66476007)(6506007)(2616005)(6486002)(66946007)(52116002)(6916009)(16526019)(38100700002)(38350700002)(1076003)(83380400001)(66556008)(6512007)(956004)(316002)(478600001)(4326008)(8676002)(5660300002)(26005)(86362001)(2906002)(8936002)(54906003)(69590400013);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?4+clMBKwpLYHRCdd109+P2rXsCI6ByZHP6ia4AXLev0C9czGubYJe1ziuuSu?= =?us-ascii?Q?SFFClQcIaDppQi85qMb2nagviDpEEeLcIrIzX0RYnoLBLjXAeI7IPTvzSib2?= =?us-ascii?Q?xThxBJOQNVbfbeOQAla7ADm4aZiqQk9hBTv4ood8Ess8BYuoLA8uybeAR9pt?= =?us-ascii?Q?juVuq/PeSVP8h/gFtw/dDBFvhO/hB40RIOSXFNSVFobmnGI48o67SnXWoUkE?= =?us-ascii?Q?Ow7lVAWsnV15y4pgv60INWGKgS0vbdyZvnrGLTmUnjDeCtHkjrpTS5r/Vp4F?= =?us-ascii?Q?qiI59h2lI/xtFpsPOP2JFsdMrqCkrf97aA+A36e4+kL1ACtI1CQbJ5Dz+9Nl?= =?us-ascii?Q?0Hhs8VQ8htmAijUnB9bwI5rmnWkvfJElMNTtKAGiPJEDlXJPCgW+MqaQTV9A?= =?us-ascii?Q?M6Hti1UlwTkS8qqpAmsMTvbgW14MsEdg2UuI52XN7HJ/m9bdz9nSfbcjzctF?= =?us-ascii?Q?I2zAabAk4wbRXF+8f+Kb0GorfjqzlXPsxFxJP5XkHZoH6QzsU7NDCWoGNSVJ?= =?us-ascii?Q?6We/+LdsFX6wcm2IrUdrJ8xzxNoTxRCJSERBNRWXnMXRFQXX5ub5+2LuLyzQ?= =?us-ascii?Q?W5JN8KaCutmy98B2xJ2+68hERvogIP1U5JPu+aYbDcamypZFvwLgIwJeqqDj?= =?us-ascii?Q?aadZOUSnUbcmS43tNgGhL3gIAJDfXLm99r8nH4KAmcBy49BG1KeLe74bbrg5?= =?us-ascii?Q?6UdJ4QJ56qcDUIPz6F36B3aiYHK38OnMKw784GgLIyDM/BCXbGPFLkSv05MX?= =?us-ascii?Q?b5t3NUAG9ogmvigVLl09y8iPMWJdWcHSVN5Yt7CAYcFrakPQ6vBXxM8EfSMw?= =?us-ascii?Q?Co0C/DEFRFw27xnAaj1aydl2kQJgJNDlEUnvFjwa3aEQSYJOMA7Lb4X5Qlds?= =?us-ascii?Q?jSQAEv7au6xoWui1LKlsg764Q3mSnH6lrSpHinWjpxjIT8pYB0QepLqxOS4Z?= =?us-ascii?Q?6jJ+hOZU6IjKla4s8NXYaelWRLijxz2yD6xkMmw+dd+4Fwtbmw3nRKjj3LGC?= =?us-ascii?Q?+oVbkifYZLCVl6KoLPVgQa+eSx2Y5R6ddTTqNJYF52l473r/BXHwax4zmi/Y?= =?us-ascii?Q?bLpqbA1mFykmfnJYz1+Ip3O8cH24TjAA22CpLxYWT7nVfpNvNeXeWeWXljVY?= =?us-ascii?Q?MLaEimq/9iTfkDppu9vC5lxee0WFjhd099yPLffAvEHfOBJrHvi9kIWp8dTt?= =?us-ascii?Q?KiZAMYvx/leJoDJ07Om26ys3/gpAJUv8dfB19q1Z1jdquZaS4UJ/MYyFPpWw?= =?us-ascii?Q?6DtfRhbnzMMOkiXuMt9yoKE2L0ejqfn6W3/rR82d2d7XBoJEVQ6GQTQzUFbm?= =?us-ascii?Q?htJtMwLoyCKBeQJlSsnG6nyz?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: c15e3e27-4f42-4305-3bf9-08d9202ebe0e X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5849.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 10:12:18.2002 (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: g8J6Q0vCTH4Tos9nTUJskSZGHyIOXHCeiYfXU4wn01EiYcmlnFVWPP5tEiOmEtkG2D86npBWclSXQE7KYsmx5YD2k4brWHou3JJE+7WS4lE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR01MB2426 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: Vu Nguyen --- Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc | 1 = + Platform/Ampere/JadePkg/Jade.fdf | 2 = + Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf | 41 = ++++ Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.c | 230 = ++++++++++++++++++++ 4 files changed, 274 insertions(+) diff --git a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc b/Silicon= /Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc index 930bbb5d385b..2d380b21df24 100755 --- a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc +++ b/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc @@ -534,6 +534,7 @@ [Components.common] ArmPlatformPkg/PlatformPei/PlatformPeim.inf Silicon/Ampere/AmpereAltraPkg/Drivers/ATFHobPei/ATFHobPeim.inf Silicon/Ampere/AmpereAltraPkg/Drivers/MemoryInitPeim/MemoryInitPeim.inf + Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf Silicon/Ampere/AmpereAltraPkg/Drivers/MmCommunicationPei/MmCommunication= Pei.inf Silicon/Ampere/AmpereAltraPkg/Drivers/FlashPei/FlashPei.inf ArmPkg/Drivers/CpuPei/CpuPei.inf diff --git a/Platform/Ampere/JadePkg/Jade.fdf b/Platform/Ampere/JadePkg/Jad= e.fdf index 3d5d857178b3..8c09e2a49089 100755 --- 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 100755 index 000000000000..11414f72f369 --- /dev/null +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf @@ -0,0 +1,41 @@ +## @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 + HobLib + NVParamLib + PeimEntryPoint + PrintLib + SerialPortLib + +[Guids] + gPlatformHobGuid + +[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..d6775ffa4a79 --- /dev/null +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.c @@ -0,0 +1,230 @@ +/** @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 +#include +#include +#include +#include + +#define MAX_PRINT_LEN 512 + +#define GB_SCALE_FACTOR 1073741824 +#define MB_SCALE_FACTOR 1048576 +#define KB_SCALE_FACTOR 1024 +#define MHZ_SCALE_FACTOR 1000000 + +STATIC VOID +SerialPrint ( + IN CONST CHAR8 *FormatString, + ... + ) +{ + CHAR8 Buf[MAX_PRINT_LEN]; + VA_LIST Marker; + UINTN NumberOfPrinted; + + VA_START (Marker, FormatString); + NumberOfPrinted =3D AsciiVSPrint (Buf, sizeof (Buf), FormatString, Marke= r); + SerialPortWrite ((UINT8 *)Buf, NumberOfPrinted); + VA_END (Marker); +} + +/** + 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) { + SerialPrint ("Pre-boot Configuration Setting:\n"); + Flag =3D TRUE; + } + SerialPrint (" %04X: 0x%X (%d)\n", (UINT32)Idx, Val, Val); + } + } + + 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) { + SerialPrint ("Manufacturer Configuration Setting:\n"); + Flag =3D TRUE; + } + SerialPrint (" %04X: 0x%X (%d)\n", (UINT32)Idx, Val, Val); + } + } + + 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) { + SerialPrint ("User Configuration Setting:\n"); + Flag =3D TRUE; + } + SerialPrint (" %04X: 0x%X (%d)\n", (UINT32)Idx, Val, Val); + } + } + + 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) { + SerialPrint ("Board Configuration Setting:\n"); + Flag =3D TRUE; + } + SerialPrint (" %04X: 0x%X (%d)\n", (UINT32)Idx, Val, Val); + } + } +} + +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 (&gPlatformHobGuid); + if (Hob =3D=3D NULL) { + return; + } + + PlatformHob =3D (PLATFORM_INFO_HOB *)GET_GUID_HOB_DATA (Hob); + + SerialPrint ("SCP FW version : %a\n", (const CHAR8 *)PlatformHob->SmP= mProVer); + SerialPrint ("SCP FW build date : %a\n", (const CHAR8 *)PlatformHob->SmP= mProBuild); + + SerialPrint ("Failsafe status : %d\n", PlatformHob->Fail= SafeStatus); + SerialPrint ("Reset status : %d\n", PlatformHob->Rese= tStatus); + SerialPrint ("CPU info\n"); + SerialPrint (" CPU ID : %X\n", ArmReadMidr ()); + SerialPrint (" CPU Clock : %d MHz\n", PlatformHob->= CpuClk / MHZ_SCALE_FACTOR); + SerialPrint (" Number of active sockets : %d\n", GetNumberOfActive= Sockets ()); + SerialPrint (" Number of active cores : %d\n", GetNumberOfActive= Cores ()); + if (IsSlaveSocketActive ()) { + SerialPrint ( + " Inter Socket Connection 0 : Width: x%d / Speed %a\n", + PlatformHob->Link2PWidth[0], + GetCCIXLinkSpeed (PlatformHob->Link2PSpeed[0]) + ); + SerialPrint ( + " Inter Socket Connection 1 : Width: x%d / Speed %a\n", + PlatformHob->Link2PWidth[1], + GetCCIXLinkSpeed (PlatformHob->Link2PSpeed[1]) + ); + } + for (Idx =3D 0; Idx < GetNumberOfActiveSockets (); Idx++) { + SerialPrint (" Socket[%d]: Core voltage : %d\n", Idx, PlatformH= ob->CoreVoltage[Idx]); + SerialPrint (" Socket[%d]: SCU ProductID : %X\n", Idx, PlatformH= ob->ScuProductId[Idx]); + SerialPrint (" Socket[%d]: Max cores : %d\n", Idx, PlatformH= ob->MaxNumOfCore[Idx]); + SerialPrint (" Socket[%d]: Warranty : %d\n", Idx, PlatformH= ob->Warranty[Idx]); + SerialPrint (" Socket[%d]: Subnuma : %d\n", Idx, PlatformH= ob->SubNumaMode[Idx]); + SerialPrint (" Socket[%d]: RC disable mask : %X\n", Idx, PlatformH= ob->RcDisableMask[Idx]); + SerialPrint (" Socket[%d]: AVS enabled : %d\n", Idx, PlatformH= ob->AvsEnable[Idx]); + SerialPrint (" Socket[%d]: AVS voltage : %d\n", Idx, PlatformH= ob->AvsVoltageMV[Idx]); + } + + SerialPrint ("SOC info\n"); + SerialPrint (" DDR Frequency : %d MHz\n", PlatformHob->= DramInfo.MaxSpeed); + for (Idx =3D 0; Idx < GetNumberOfActiveSockets (); Idx++) { + SerialPrint (" Socket[%d]: Soc voltage : %d\n", Idx, PlatformH= ob->SocVoltage[Idx]); + SerialPrint (" Socket[%d]: DIMM1 voltage : %d\n", Idx, PlatformH= ob->Dimm1Voltage[Idx]); + SerialPrint (" Socket[%d]: DIMM2 voltage : %d\n", Idx, PlatformH= ob->Dimm2Voltage[Idx]); + } + + SerialPrint (" PCP Clock : %d MHz\n", PlatformHob->= PcpClk / MHZ_SCALE_FACTOR); + SerialPrint (" SOC Clock : %d MHz\n", PlatformHob->= SocClk / MHZ_SCALE_FACTOR); + SerialPrint (" SYS Clock : %d MHz\n", PlatformHob->= SysClk / MHZ_SCALE_FACTOR); + SerialPrint (" AHB Clock : %d MHz\n", PlatformHob->= 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