/** @file\r
This contains the business logic for the module-specific Reset Helper functions.\r
\r
- Copyright (c) 2017 - 2018 Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2017 - 2019 Intel Corporation. All rights reserved.<BR>\r
Copyright (c) 2016 Microsoft Corporation. All rights reserved.<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);\r
\r
/**\r
- This is a shorthand helper function to reset with a subtype so that\r
- the caller doesn't have to bother with a function that has half a dozen\r
- parameters.\r
+ This is a shorthand helper function to reset with reset type and a subtype\r
+ so that the caller doesn't have to bother with a function that has half\r
+ a dozen parameters.\r
\r
This will generate a reset with status EFI_SUCCESS, a NULL string, and\r
no custom data. The subtype will be formatted in such a way that it can be\r
are not initialized. For DXE, you can add gEfiResetArchProtocolGuid\r
to your DEPEX.\r
\r
+ @param[in] ResetType The default EFI_RESET_TYPE of the reset.\r
@param[in] ResetSubtype GUID pointer for the reset subtype to be used.\r
\r
**/\r
VOID\r
EFIAPI\r
-ResetPlatformSpecificGuid (\r
+ResetSystemWithSubtype (\r
+ IN EFI_RESET_TYPE ResetType,\r
IN CONST GUID *ResetSubtype\r
)\r
{\r
(GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, ResetSubtype)),\r
ResetSubtype\r
);\r
- ResetPlatformSpecific (sizeof (ResetData), &ResetData);\r
+\r
+ ResetSystem (ResetType, EFI_SUCCESS, sizeof (ResetData), &ResetData);\r
+}\r
+\r
+/**\r
+ This is a shorthand helper function to reset with the reset type\r
+ 'EfiResetPlatformSpecific' and a subtype so that the caller doesn't\r
+ have to bother with a function that has half a dozen parameters.\r
+\r
+ This will generate a reset with status EFI_SUCCESS, a NULL string, and\r
+ no custom data. The subtype will be formatted in such a way that it can be\r
+ picked up by notification registrations and custom handlers.\r
+\r
+ NOTE: This call will fail if the architectural ResetSystem underpinnings\r
+ are not initialized. For DXE, you can add gEfiResetArchProtocolGuid\r
+ to your DEPEX.\r
+\r
+ @param[in] ResetSubtype GUID pointer for the reset subtype to be used.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+ResetPlatformSpecificGuid (\r
+ IN CONST GUID *ResetSubtype\r
+ )\r
+{\r
+ ResetSystemWithSubtype (EfiResetPlatformSpecific, ResetSubtype);\r
}\r
\r
/**\r