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.97]) by mx.groups.io with SMTP id smtpd.web12.10059.1631721644788694239 for ; Wed, 15 Sep 2021 09:00:44 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=Ajjvytt4; spf=pass (domain: os.amperecomputing.com, ip: 40.107.94.97, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DB0mSD0BT67AB4LPRvt8el0L0v9eqy9tbEii1IZwn6HAiwN0nsbiBlNPFvz+5pt1FQvdrjYI9UqWFXbvOggqI/SE7wK/OvSuErLtbypqmWoRULVkiBGI2I6uc6cVJA1ahWx/PaRVNmOc75C8//KG6vVV/HxpWrfgqrc5X2EsxW0ZuMd637q0OTBer4DQ8xHGhnC6bBxk2jnsx2hqyueOqFXMOoxhyhk5jM47l1P0C1oqypHq49iWV7fZgt9goweAV8rVk6Xk4O86I9Mpd9NHbrJ73xnbgKixeNz0iqqy+0cyXR4yYLwrqnr0Tsc1B6yzdL9eQaUBf8iYcuhXpE07Fw== 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; bh=W7Qeq91xyhLWzO0sccTZ2CwCP0/aKHFt3TbsFElgsC4=; b=NpFHjSq9okrtxqYkzEd4TwDYCspi62B/iRdCF9ARWWk8QFKSvmgJu/Bu5eJNDGmhugJY6RTVDaGkOMJYGeMeP/9IN5FJm6viTa3w++u86e9ZVrmBTrNoLRFifIXxZOMBM4XfUXl9Jr871ovMstig2R6v3gfqw+XuU1wOK+R60PMIS+M8TT6ZKyOKG+qs0Y4lJVDxvQ5GP169kSfGkkEG8DOHqIKEeVu19PogFrWN6zYuw5oA90lDCbfPYKIBUQmXpsm7Gw9kfau1BeGvZmpLjRGhvDz9eZi48q2h9F0yebJwSimOvi8NorM+p1H1cGeIgzMgFIYoSV/jiI3DNynE+g== 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=W7Qeq91xyhLWzO0sccTZ2CwCP0/aKHFt3TbsFElgsC4=; b=Ajjvytt4LoIUgPD0djJ/Ak8JerzePdWhVyCmllUcSbImx+ZoRZvkjzK5DUngQH5h9Jtt0OckSyTnRDJ0O1NULj2JQgkPCBRj6s/Q73yqV4ibst7BiiHZ8uu7D1QaHqI9BaP3O3lw7WXiCaEHj44yCmJk+f0qzRPKBgswnBNAidU= 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 DM5PR0101MB3065.prod.exchangelabs.com (2603:10b6:4:33::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15; Wed, 15 Sep 2021 16:00:30 +0000 Received: from DM6PR01MB5849.prod.exchangelabs.com ([fe80::8eb:704f:2ba7:9bc3]) by DM6PR01MB5849.prod.exchangelabs.com ([fe80::8eb:704f:2ba7:9bc3%4]) with mapi id 15.20.4523.014; Wed, 15 Sep 2021 16:00:29 +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: [PATCH v3 21/28] AmpereAltraPkg: Add DebugInfoPei module Date: Wed, 15 Sep 2021 22:55:20 +0700 Message-ID: <20210915155527.8176-22-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210915155527.8176-1-nhi@os.amperecomputing.com> References: <20210915155527.8176-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: HK2PR0302CA0012.apcprd03.prod.outlook.com (2603:1096:202::22) To DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 Received: from sw004.amperecomputing.com (118.69.219.201) by HK2PR0302CA0012.apcprd03.prod.outlook.com (2603:1096:202::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.5 via Frontend Transport; Wed, 15 Sep 2021 16:00:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc84d40c-3088-4590-ae3a-08d97861f0ab X-MS-TrafficTypeDiagnostic: DM5PR0101MB3065: 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: 5/uI/BVJCzO5voHXep1XJK4wjfLHT04TqTbHKH7oWml5cut01rCwGsO9BerqGMURUUavCpaPJUzAdw3ojRPU3TQtD/nTkAQP9cNCLWzwBUqb1tNmdlz/9O3w211lsh2hdbLg6H7oAHzBlCITLpmf+lM8s2wp9aOTuJSY0J6ja7geHsiX7KQNEB04V9Kck1lANMG95k23KsrrTWe5imHvYocj2ZjOZCGT/9/izu8ZafT546rNIIjhxl5frFfTsicpKqPYwoGhl20fP/1LG4scbibnE70eOH6uJzoZBZ3cohaBOZcD2ZjJhFhMwGl4fcchh24Ns2lUoG7mXygj+ftBG4VoP6+MuqOn2kswsXjI/fdVHRAf1o3aXxZvvO83AjrsAWSlEnhjhnLWgnfX0wsHSex0TH9ixj27+zNM+gWONa8jHUWhUggKo0SUGXR/zUOLB1OmORuFOWky8EeSkTezsvdAA8i21lQ4j5cedKNRV3wGEjl8GtMvXQPeDCUGv2reOMlbu9TUAeYPDGah5DuWnfJqj+W7pg9bB86FOhhZCsuxHtFMLODNXJkc5+VgV0fRaMGwKC0DG2KwCm76L8b9WPjBKDfpMgqnF3k1KfK2yqbIEFLynXlHFl2EL0Vq//WhIEsGteHnt1u+Eck7c8HUiYGjI+ztaIiEQxMxXFEHlZtouLe9Kv4jS14zmZHIZlwjzFg7fsjkZp1UcUdOIrKxMw== 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)(136003)(346002)(396003)(366004)(376002)(39850400004)(2616005)(38100700002)(38350700002)(2906002)(6666004)(6916009)(83380400001)(6512007)(26005)(8676002)(4326008)(186003)(8936002)(478600001)(6506007)(5660300002)(52116002)(1076003)(86362001)(316002)(66556008)(54906003)(956004)(6486002)(66476007)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?k2sWw9t4MtsPtD1GYW4DyHyHJpZH99OOprnhnxihMc06LN1VHu9/27QWa6Ht?= =?us-ascii?Q?1qNI/Mc6WNYJXIbOsVo4KPUHae0MApQvefZJtlTH+2wJCYj7nR9u1MFsvcWc?= =?us-ascii?Q?uNQ3iyUYDc+p7vwdspEI2zSxvuIl/ZcfOn5+ODDWLteHXkUlzsNH1kOwe6hm?= =?us-ascii?Q?Qeoi9FwRhyct+hffm/QC5XnfkfAFNTx2zz1tFD6DlwML4VH6ANGMMv5zJ+aG?= =?us-ascii?Q?6vE7Pt3mwAXV4HIkGLMlcZWf4C0HZLy64uw2PDvGUdaGbjNPTqtWLCk2jXfi?= =?us-ascii?Q?yxYLbHLtQKUQ+N2vgVGs8b1+Fw/4cGLpjeII6q/GdJBX1Wp1e9VToJLZn6vK?= =?us-ascii?Q?saz6/r6Gi4Nl3+vjwuYQyg4KLdRXaES7hsbLoujVfG3j20a1ql6mm0sBp6e4?= =?us-ascii?Q?JD3nfuAkCqoVjQconE3f25ZqCsikil+gu6HMWGsbLcwy5MoMyP2OCRQ3WmiV?= =?us-ascii?Q?nm/NSnhjdp2TuoL8/NWoll9pOWtGQV46NGOq0gHnPPxZv2lKmbSUR8c94par?= =?us-ascii?Q?gycFAiDTr5D/CeE67mPLwotFZTtUgawdHrJmbTI9MLnFmlQfEhq3Z9m8U45g?= =?us-ascii?Q?72IW4JzARbp2tLDBwU/ZGv98fXfW1/uncMSDww1sb5zm7Yu0fkUQW4rRmbm5?= =?us-ascii?Q?g+wW9Bg/gx/XmwGM8OFfRlYYpH7zeudzmsrtf5/HBZjAaoaMjmiKy9tG4i70?= =?us-ascii?Q?d8JSnd5XLZPCoISqYZBrQva2uqk6JTf1LQskyqsUCK9CMGw4Ot1RdfwXolo3?= =?us-ascii?Q?k9Hyhn1bYnBCFMKMJ9CLcUwGeCAk/V7KVS5NPOQN7UAlkNtych7Q8GK6O3EO?= =?us-ascii?Q?OPQYNYdcuOnlgHM+vLYn9H7RjTmQYMIS8s1tG0jGa4uU/nkVx7q/zaG9MW5U?= =?us-ascii?Q?77up1ftsBpjSbccscuvqcVhy2Qnjp3uFPGXVzoat/lPKALJOWElbFHP6NS8n?= =?us-ascii?Q?jtyCMKMLDl6ErJaiGi4z6Yx8Dy+WYtPh45QLXGVyWAvjhQ1MPTZ6ImxAs7r+?= =?us-ascii?Q?+Udcuho5bYV1vtfb4SaVZwASW0xpdL3xh3MxC9SiJxaPjrLCOceegW+C2wJ7?= =?us-ascii?Q?0hdG4lbdfdDT25ck4VbbI3QwmMdDcjGZ+dWOMgYdaGxhwuIbxDsofWMFx9EF?= =?us-ascii?Q?8hs8RMeyWKm6z1Pjhzfeb3B1uuJm0O97Opykgh5c43BwAApWbm3bsNhO2wda?= =?us-ascii?Q?NgJsidwLYrWFbgmroHRqLO2mN4pkZvnpUE5dNWkxxgRAAdO6aSO5WbkA7agu?= =?us-ascii?Q?RoSD8IQAhHGQjqT2cMr6Z/FETCWx2IrHTbMFnANRaokqd3LeI2NKjz4Vt5pv?= =?us-ascii?Q?LUU3tr3AVmQ4RCNKF5dPjZoD?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc84d40c-3088-4590-ae3a-08d97861f0ab X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5849.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2021 16:00:29.8617 (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: X0GGxnBo0wSai3SBwD+a1DZvd0MHkxlxqQiZffB8jkatgVx/mN0P3X7cVe1Xtq8oicZ1L/vkUmLcBiOchFl7+DZEO3TxEW3b+i8sO6dVcmE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0101MB3065 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 | 4 = + Platform/Ampere/JadePkg/Jade.fdf | 2 = + Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.inf | 40 = ++++ Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.c | 210 = ++++++++++++++++++++ 4 files changed, 256 insertions(+) diff --git a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc b/Silicon= /Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc index 459d06c33c02..aadbf6dae83e 100644 --- a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc +++ b/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc @@ -543,6 +543,10 @@ [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 { + + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.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 96213edb2676..56a54b307f04 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..1f50f811f273 --- /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] + 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..ece9295864a8 --- /dev/null +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/DebugInfoPei/DebugInfoPei.c @@ -0,0 +1,210 @@ +/** @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 + +#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 (&gPlatformHobGuid); + 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