From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.107.102.77]) by mx.groups.io with SMTP id smtpd.web11.9410.1665764184775628485 for ; Fri, 14 Oct 2022 09:16:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=J65UrT/j; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.102.77, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P92tcr7U+7D4JgIIbVatrMRJ/UGYER6m0/C1Ri4HvdJ169vVdguIBL9khAq0Y/9z9GK5zgv2nA+uVfZsDmkdVHAc/cRvkAODAQzIGRbOWt+uzbu/8JB+io+fi0Qh/woTZillxncm/pi2FVl3YKCP7EmcXKge4QIJoHQR792RSWciLrXQQ/cKwT2sm4V7GtOKLAS84zsij50J/X4skmOFNmfJHw6UFuWk8Um8Vcf8BK+6cFk5ptFYy63pQ1cCmpokaGXJLBPszpfTfRhThyKCX1bq6D3nqaRpMPCLW7Dxm+Pjme7b0JZHajYVsERES9wfOBhltCGdxJIzXab+ubWZNQ== 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=Ub8cgZdZEx24hhUtJHWPc58XcXKWk/+4ot+E8VzN+s4=; b=MEo5popOzedNVdYmpQKVRCoZZSZzfCNiL4ztmVQ4T1dLyldDZumU3O0dapbFYolE/gpMWbTHus714JvXBlBTtyFRg/yr/HzN6SSLNuwLR4uG+8EgLyKlaZ0TVhIdTeQkEi5pJsJc61JEf439SvhntTaapb+/SqxJ+I+Yq6dgeLoO9uNHfEhjE4bN0CzuRdbcRqtF/5rHfZP8ZV3vMEmH7sJVCBMgzCuHBhIG0EuIc+KzPFKnGaozANZDaW7GXEKSpcoMRhOFbs5N1cdkzlKvAdvtxU5dIKgJxV7JrP7PRbnjCUFZz3zJWF8kDhI/3sj5ARSRH5+YpduXf4A1sMhWMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ub8cgZdZEx24hhUtJHWPc58XcXKWk/+4ot+E8VzN+s4=; b=J65UrT/j4TGAyYg4rexdBRrwRpspR3rSingafgHg4ibCf8rFkm/COoTpRCVRMXmKgcs2iLY+XHhQY8i97cEwb/OIdPILC1F0xJFIVBF9EJCLRYrwGhMk0mJJFy46NainIQ+x+/JfFnlKQ/Q8LNBKYfQd84szNUlySMgoB0U50d8= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by IA1PR12MB6409.namprd12.prod.outlook.com (2603:10b6:208:38b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Fri, 14 Oct 2022 16:16:22 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::2eab:b851:827c:1d88]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::2eab:b851:827c:1d88%3]) with mapi id 15.20.5723.029; Fri, 14 Oct 2022 16:16:22 +0000 From: "Chang, Abner" To: "devel@edk2.groups.io" , "sunilvl@ventanamicro.com" CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Rebecca Cran , Peter Grehan , Daniel Schaefer Subject: Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V3 08/34] OvmfPkg/ResetSystemLib: Add support for RISC-V Thread-Topic: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V3 08/34] OvmfPkg/ResetSystemLib: Add support for RISC-V Thread-Index: AQHY3uqDomtJQgCp30Gg7vrkKMfSUK4OEnEw Date: Fri, 14 Oct 2022 16:16:21 +0000 Message-ID: References: <20221013095829.1454581-1-sunilvl@ventanamicro.com> <20221013095829.1454581-9-sunilvl@ventanamicro.com> In-Reply-To: <20221013095829.1454581-9-sunilvl@ventanamicro.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-10-14T16:16:20Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=20f57605-b70b-4d55-be6f-b4e7b565bd2d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|IA1PR12MB6409:EE_ x-ms-office365-filtering-correlation-id: 154e2f19-ddc6-4a29-3201-08daadff6f35 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dujFhFRp6HbR6W8/RcOBiFOqNgvqE8cosLYXSV27IyCdWfzeN8dQt2QndIryb+GbwsV13oh1EaIDhuLryPieRrHbvNzoQ5TJqC/rOXDOqRs3GiPYrhzc/IG+61sSHNIxlHhRlKCgWeCO/ZzJOl3aHEeI8GUdy9dHHBuOX3mlT/F79Q69kq8MFQkTOkUHEsHCKVVIzPP/LyAWm41xTxer9D1kRFj/nV3NI4QqjONJB31mHzUY9xTS2AUrtKf9JHulgM4sceBNA1RK7SrtvvZttxn6TNZfsWaY7ITD5wgYXcHB7b4qOZTDwib9xtY6inIA5D66x4pa6fMnipHfL5DxFSpAKUmNjl54a/zE12GRDxeCx5L4l+H40Z1xI4HOBAn1lNgVkALmVKmFOKuSODlVLcz1gOtBj1ad/Bp3TktbEJwGcoqdhjlRZaB5UbNIk2oniCohvvfmxKmCaYj2Yn9L4ApdCJpSwtsdsYOp3moM6K4UCBtPqYFKAIHbaEG3bAw14WxC388OSfQpfFCxHFa3t6QRtrWo1h0Oc6+WY7qzN3qiat+nEBoUE5bgq/2VjFXXJcQxtlhHpjDFlrRpFLIECUak2cC2kpcR+3WmaSA0MmaJk/EI7TvqmQLWSvVJKMx+6Eltfc47U01w/a/0kVXdaPcYo4/mo79gdH1cZNPuIjDexx1ExAlLprtJYkjM798oiPA3l/ytQQQyhznN6YG8DIjUhoP2n7LDWqWGxlUZcm1hC0Lou6CualQEv6FkPuCJzOswSV16jTZj4xrGjNHCbRaMcEicoRBTYO6y9b7x4/IQC+Tg1NOfdERl0h6yt99FZjEJWpDoWFOGPn06K4bcvg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(376002)(39860400002)(396003)(366004)(451199015)(66899015)(19627235002)(83380400001)(38070700005)(55016003)(9686003)(86362001)(4326008)(66476007)(38100700002)(110136005)(41300700001)(66446008)(52536014)(8936002)(5660300002)(122000001)(66556008)(186003)(478600001)(54906003)(316002)(33656002)(2906002)(76116006)(64756008)(6506007)(66946007)(26005)(71200400001)(7696005)(53546011)(45080400002)(966005)(8676002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?I8eolauzZe9KCKqZsCpj5zHAR7aHCjygMzA5ISgM89r2LjkstFLe53oklpPV?= =?us-ascii?Q?JYF1lHNDs2MBjB6BD+ZqmA80gJdkLWvccTmN45Mo+UXbsNnMOZc9X+XfVODr?= =?us-ascii?Q?VwoDiMgnE6xgGL/oTz4cNwMyd55GXn6e+UTuTtdbe39El8Jwva0ZqqrZpwdR?= =?us-ascii?Q?6X/uTn9s80UcL8DTUjWN2x8/lPWy/o7FarqzDf80SrbasYRfS+WsiVqvXUym?= =?us-ascii?Q?3X0HSlyWENoDcLJltAsDoRgZsi8EDlKSQN+kXbw2KCWxtZ38XHxzPn2AHeuF?= =?us-ascii?Q?8TB+rUCo5jT4DYGYyFAAxGQGp31UQGVGczymkJ11whXS4lRsYLG/HKAL0OHu?= =?us-ascii?Q?YrWTwWDkQWCwo/3XwvMoVNSUD17TpORWaKON9L9AkLUJPFalZ/dvb+04htvk?= =?us-ascii?Q?5pSAuigP2Re6W9tme0nMJ9MDDRibpvgyvrZjKskBl5OmszT0i5V0I6f7mRIG?= =?us-ascii?Q?eCTK/X3FzyFVRgUb/fQN1cOL3UKTtcayM+bZi7BAXhTxcIpwKPzOLufslUhV?= =?us-ascii?Q?iGFS9Sw27AxJo49x57QknDSaouhm0f+3UHQw4NSK7Vv5p88eZVufUkuP0gRf?= =?us-ascii?Q?Y4KweUl4dif/Jnd9uRQA07W3w4TxC4bLBiXjMBeSmya8F39O18sjT77qiJkc?= =?us-ascii?Q?ZDCfPGvXlGeBLe54gLXe8DF1O1e70CHDLOEVyhcWuWb7SJVZ3qEetz5ahZuo?= =?us-ascii?Q?PXLHXKrHdiehEVWa8SjzlcLgjyI3elKAGiXxprk4Q0sPML3l48oTVLFgh02m?= =?us-ascii?Q?OzLGwBbMRt4614r0KBaM30g4zhDOQPIqja1Q7nvRZBPUbI62q/PebN4hnpZC?= =?us-ascii?Q?GJhLzK5btKBXZ6rVIdv2rKeRDaIxW4y4SzBHq5TY6G/rKyGhS2yNpnEuVvMj?= =?us-ascii?Q?Brlo0UxG5yWYplA3JVS/ccv/QjoMc1HUmi3rL05c8qvsHGCuz48dTZoFXew4?= =?us-ascii?Q?copNPAsQPhdX62qFgchASjgswg4XQFc6SsmTEWQQJu3EVNt4IaUz6mD6TJlq?= =?us-ascii?Q?GXYXHOaDVux56GwRY/USHQRIVM7Fp0+RvFB2YlfuP4oIN660TOYaXKNF25Hx?= =?us-ascii?Q?+nbSz0KhWBWSNrdE5beemLUGbpKcnp11F2WFNI35ZhfhEWg8H7lhCOSnARXA?= =?us-ascii?Q?UXa4BuPuUMDAGiUWqmZASJtHGTX+QVOQcBsOVLWAklAM01QymPYuH+rQCW7e?= =?us-ascii?Q?g4iweAJ77PXmUam+u91co2xQpuahQ5q9Ozsjrx++AY/7At7ociho3rnO8Nyn?= =?us-ascii?Q?wWW6AVX+b2dW951SdPA7eT8Biu7BLO0+s4vu87MvU1RB5FA+0+BwtncjyAiw?= =?us-ascii?Q?dQZ3NeYpVwHiGRHcoZq1CVmFImxX1p7W23IYouMP9k+/rvYQSA5yz5T50R9P?= =?us-ascii?Q?2CrwNWJFWDCLcjcsmiup8w5gHKaz+hXCEsxUJo/Amk80m2DWMbcEBWsL3UY9?= =?us-ascii?Q?rE7Zcr2kqScZsWQ39Ym7k8bJFDUIAYEiA2BsqBUZCqc9YKdc/V4/0jkHF448?= =?us-ascii?Q?+a+dym8tEgub/oJReaZQQblHLTiqoH3Y9EYXvVDtZ7CcN4094qYyVrdo5uIm?= =?us-ascii?Q?45A9k6WeMLP9V+kLnu/FH5nqE0SAI30M8oG3OHj0?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 154e2f19-ddc6-4a29-3201-08daadff6f35 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2022 16:16:22.0056 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jxfkVdn/xFmWDBw5lLkomI3Dr1/0cQZcAWE3GWX4VyyuK0srtQ+6BIMtNKaBvMJvFmmfhTXqnLyyQcBYPxFD5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6409 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Acked-by: Abner Chang However, this patch has the dependency with patch 7/34. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sunil V L > via groups.io > Sent: Thursday, October 13, 2022 5:58 PM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Jiewen Yao > ; Jordan Justen ; Gerd > Hoffmann ; Rebecca Cran ; > Peter Grehan ; Daniel Schaefer > > Subject: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V3 08/34] > OvmfPkg/ResetSystemLib: Add support for RISC-V >=20 > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. >=20 >=20 > REF: > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugz > illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D4076&data=3D05%7C01%7Ca > bner.chang%40amd.com%7C58ec00ff62c04404eb6208daad01a493%7C3dd896 > 1fe4884e608e11a82d994e183d%7C0%7C0%7C638012519819152160%7CUnkn > own%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik > 1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3DQo67IiQtWoclyj > %2FM2pMmnrg7LnlELqkPnRcnYADN8BY%3D&reserved=3D0 >=20 > This is mostly copied from > edk2-platforms/Platform/RISC-V/PlatformPkg/Library/ResetSystemLib >=20 > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Gerd Hoffmann > Cc: Rebecca Cran > Cc: Peter Grehan > Cc: Daniel Schaefer > Signed-off-by: Sunil V L > --- > .../ResetSystemLib/BaseResetSystemLib.inf | 6 + > .../ResetSystemLib/DxeResetSystemLib.inf | 9 +- > .../ResetSystemLib/RiscV64/DxeResetShutdown.c | 20 +++ > .../ResetSystemLib/RiscV64/ResetSystemLib.c | 128 ++++++++++++++++++ > 4 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 > OvmfPkg/Library/ResetSystemLib/RiscV64/DxeResetShutdown.c > create mode 100644 > OvmfPkg/Library/ResetSystemLib/RiscV64/ResetSystemLib.c >=20 > diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf > b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf > index 4397f90a24dd..83cebb45b3db 100644 > --- a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf > +++ b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf > @@ -25,6 +25,9 @@ [Sources.IA32, Sources.X64] > Ia32_X64/BaseResetShutdown.c > Ia32_X64/ResetSystemLib.c >=20 > +[Sources.RISCV64] > + RiscV64/ResetSystemLib.c > + > [Packages] > MdeModulePkg/MdeModulePkg.dec > MdePkg/MdePkg.dec > @@ -36,3 +39,6 @@ [LibraryClasses] > IoLib > PciLib > TimerLib > + > +[LibraryClasses.RISCV64] > + RiscVSbiLib > diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf > b/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf > index 79478453d7cb..abab573f2f06 100644 > --- a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf > +++ b/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf > @@ -20,13 +20,17 @@ [Defines] > # The following information is for reference only and not required by th= e > build # tools. > # > -# VALID_ARCHITECTURES =3D IA32 X64 > +# VALID_ARCHITECTURES =3D IA32 X64 RISCV64 > # >=20 > [Sources.IA32, Sources.X64] > Ia32_X64/DxeResetShutdown.c > Ia32_X64/ResetSystemLib.c >=20 > +[Sources.RISCV64] > + RiscV64/ResetSystemLib.c > + RiscV64/DxeResetShutdown.c > + > [Packages] > MdeModulePkg/MdeModulePkg.dec > MdePkg/MdePkg.dec > @@ -39,5 +43,8 @@ [LibraryClasses] > PcdLib > TimerLib >=20 > +[LibraryClasses.RISCV64] > + RiscVSbiLib > + > [Pcd] > gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId ## > CONSUMES diff --git > a/OvmfPkg/Library/ResetSystemLib/RiscV64/DxeResetShutdown.c > b/OvmfPkg/Library/ResetSystemLib/RiscV64/DxeResetShutdown.c > new file mode 100644 > index 000000000000..027e235cad11 > --- /dev/null > +++ b/OvmfPkg/Library/ResetSystemLib/RiscV64/DxeResetShutdown.c > @@ -0,0 +1,20 @@ > +/** @file > + DXE Reset System Library Shutdown API implementation for OVMF. > + > + Copyright (C) 2020, Red Hat, Inc. > + Copyright (c) 2006 - 2019, Intel Corporation. All rights > +reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#include // CpuDeadLoop() > +#include // ResetShutdown() > + > +EFI_STATUS > +EFIAPI > +DxeResetInit ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + return EFI_SUCCESS; > +} > diff --git a/OvmfPkg/Library/ResetSystemLib/RiscV64/ResetSystemLib.c > b/OvmfPkg/Library/ResetSystemLib/RiscV64/ResetSystemLib.c > new file mode 100644 > index 000000000000..14f7653aa8de > --- /dev/null > +++ b/OvmfPkg/Library/ResetSystemLib/RiscV64/ResetSystemLib.c > @@ -0,0 +1,128 @@ > +/** @file > + Reset System Library functions for RISC-V > + > + Copyright (c) 2021, Hewlett Packard Development LP. All rights > + reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > +#include > +#include > + > +/** > + This function causes a system-wide reset (cold reset), in which > + all circuitry within the system returns to its initial state. This > +type of reset > + is asynchronous to system operation and operates without regard to > + cycle boundaries. > + > + If this function returns, it means that the system does not support co= ld > reset. > +**/ > +VOID > +EFIAPI > +ResetCold ( > + VOID > + ) > +{ > + // Warm Reset via SBI ecall > + SbiSystemReset (SBI_SRST_RESET_TYPE_COLD_REBOOT, > +SBI_SRST_RESET_REASON_NONE); } > + > +/** > + This function causes a system-wide initialization (warm reset), in > +which all processors > + are set to their initial state. Pending cycles are not corrupted. > + > + If this function returns, it means that the system does not support wa= rm > reset. > +**/ > +VOID > +EFIAPI > +ResetWarm ( > + VOID > + ) > +{ > + // Warm Reset via SBI ecall > + SbiSystemReset (SBI_SRST_RESET_TYPE_WARM_REBOOT, > +SBI_SRST_RESET_REASON_NONE); } > + > +/** > + This function causes the system to enter a power state equivalent > + to the ACPI G2/S5 or G3 states. > + > + If this function returns, it means that the system does not support > shutdown reset. > +**/ > +VOID > +EFIAPI > +ResetShutdown ( > + VOID > + ) > +{ > + // Shut down via SBI ecall > + SbiSystemReset (SBI_SRST_RESET_TYPE_SHUTDOWN, > +SBI_SRST_RESET_REASON_NONE); } > + > +/** > + This function causes a systemwide reset. The exact type of the reset > +is > + defined by the EFI_GUID that follows the Null-terminated Unicode > +string passed > + into ResetData. If the platform does not recognize the EFI_GUID in > +ResetData > + the platform must pick a supported reset type to perform. The > +platform may > + optionally log the parameters from any non-normal reset that occurs. > + > + @param[in] DataSize The size, in bytes, of ResetData. > + @param[in] ResetData The data buffer starts with a Null-terminated > string, > + followed by the EFI_GUID. > +**/ > +VOID > +EFIAPI > +ResetPlatformSpecific ( > + IN UINTN DataSize, > + IN VOID *ResetData > + ) > +{ > + // > + // Can map to OpenSBI vendor or platform specific reset type. > + // > + return; > +} > + > +/** > + The ResetSystem function resets the entire platform. > + > + @param[in] ResetType The type of reset to perform. > + @param[in] ResetStatus The status code for the reset. > + @param[in] DataSize The size, in bytes, of ResetData. > + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWar= m, > or EfiResetShutdown > + the data buffer starts with a Null-terminate= d string, optionally > + followed by additional binary data. The stri= ng is a description > + that the caller may use to further indicate = the reason for the > + system reset. > +**/ > +VOID > +EFIAPI > +ResetSystem ( > + IN EFI_RESET_TYPE ResetType, > + IN EFI_STATUS ResetStatus, > + IN UINTN DataSize, > + IN VOID *ResetData OPTIONAL > + ) > +{ > + switch (ResetType) { > + case EfiResetWarm: > + ResetWarm (); > + break; > + > + case EfiResetCold: > + ResetCold (); > + break; > + > + case EfiResetShutdown: > + ResetShutdown (); > + return; > + > + case EfiResetPlatformSpecific: > + ResetPlatformSpecific (DataSize, ResetData); > + return; > + > + default: > + return; > + } > +} > -- > 2.25.1 >=20 >=20 >=20 >=20 >=20