diff options
author | raywu <raywu0301@gmail.com> | 2018-06-15 00:00:50 +0800 |
---|---|---|
committer | raywu <raywu0301@gmail.com> | 2018-06-15 00:00:50 +0800 |
commit | b7c51c9cf4864df6aabb99a1ae843becd577237c (patch) | |
tree | eebe9b0d0ca03062955223097e57da84dd618b9a /ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea | |
download | zprj-master.tar.xz |
Diffstat (limited to 'ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea')
-rw-r--r-- | ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.c | 31 | ||||
-rw-r--r-- | ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.h | 100 |
2 files changed, 131 insertions, 0 deletions
diff --git a/ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.c b/ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.c new file mode 100644 index 0000000..b0230a2 --- /dev/null +++ b/ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.c @@ -0,0 +1,31 @@ +/** @file + RapidStart Global NVS Area description protocol implementation. + +@copyright + Copyright (c) 2011 - 2012 Intel Corporation. All rights reserved + This software and associated documentation (if any) is furnished + under a license and may only be used or copied in accordance + with the terms of the license. Except as permitted by such + license, no part of this software or documentation may be + reproduced, stored in a retrieval system, or transmitted in any + form or by any means without the express written consent of + Intel Corporation. + + This file contains an 'Intel Peripheral Driver' and uniquely + identified as "Intel Mobile Silicon Support Module" and is + licensed for Intel Mobile CPUs and chipsets under the terms of your + license agreement with Intel or your vendor. This file may + be modified by the user, subject to additional terms of the + license agreement +**/ +#include "EdkIIGlueDxe.h" + +#include "RapidStartGlobalNvsArea.h" + +EFI_GUID gRapidStartGlobalNvsAreaProtocolGuid = RAPID_START_GLOBAL_NVS_AREA_PROTOCOL_GUID; + +EFI_GUID_STRING + ( + &gRapidStartGlobalNvsAreaProtocolGuid, "RapidStart Global NVS Area Protocol", + "Protocol describing RapidStart ACPI NVS memory region used by ACPI subsystem." + ); diff --git a/ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.h b/ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.h new file mode 100644 index 0000000..25fa453 --- /dev/null +++ b/ReferenceCode/RapidStart/Protocol/RapidStartGlobalNvsArea/RapidStartGlobalNvsArea.h @@ -0,0 +1,100 @@ +/** @file + Definition of the RapidStart global NVS area protocol. This protocol + publishes the address and format of a global ACPI NVS buffer used as a communications + buffer between SMM/DXE/PEI code and ASL code. + @todo The format is derived from the ACPI reference code, version 0.95. + + Note: Data structures defined in this protocol are not naturally aligned. + +@copyright + Copyright (c) 1999 - 2012 Intel Corporation. All rights reserved + This software and associated documentation (if any) is furnished + under a license and may only be used or copied in accordance + with the terms of the license. Except as permitted by such + license, no part of this software or documentation may be + reproduced, stored in a retrieval system, or transmitted in any + form or by any means without the express written consent of + Intel Corporation. + + This file contains a 'Sample Driver' and is licensed as such + under the terms of your license agreement with Intel or your + vendor. This file may be modified by the user, subject to + the additional terms of the license agreement +**/ +#ifndef _RAPID_START_GLOBAL_NVS_AREA_H_ +#define _RAPID_START_GLOBAL_NVS_AREA_H_ + +// +// Includes +// +// +// Forward reference for pure ANSI compatability +// +EFI_FORWARD_DECLARATION (RAPID_START_GLOBAL_NVS_AREA_PROTOCOL); + +/// +/// RapidStart Global NVS Area Protocol GUID +/// +#define RAPID_START_GLOBAL_NVS_AREA_PROTOCOL_GUID \ + { \ + 0xa5559f06, 0x6415, 0x4759, 0x88, 0x69, 0xde, 0x15, 0xf9, 0xcd, 0x9c, 0x9b \ + } + +/// +/// Extern the GUID for protocol users. +/// +extern EFI_GUID gRapidStartGlobalNvsAreaProtocolGuid; + +/** + Global NVS Area definition + + To provide OS base utility controlling capability, these ACPI Global NVS fields + provides the interface for OS base utility to control Rapid Start behavior and + Rapid Start reference code will work accordingly. +**/ +#pragma pack(1) +typedef struct { + /// + /// It shows what wake up event sources available for Rapid Start Entry. + /// + /// Used by RapidStart.asl as "RSTA" + /// + UINT8 EventsAvailable; + /// + /// This controls which wake up source can be used to trigger Rapid Start Entry tasks. + /// + /// Used by RapidStart.asl as "RSTS" + /// + UINT8 EventsEnabled; + /// + /// This defines how many minutes the wake up event will happen for performing Rapid + /// Start Entry transition. Available options are "Immediately" (wake system up + /// once system entering S3 mode), 1 Min, 2 Min, 5 Min and 10 Min etc. Default + /// Platform Policy will set this to 10 minutes. + /// + /// Used by RapidStart.asl as "RSTT" + /// + UINT16 WakeTimerMin; + /// + /// This is the pointer for performance data structure. + /// + /// Used by RapidStart.asl as "RSTP" + /// + UINT32 PerfDataPtr; +} RAPID_START_GLOBAL_NVS_AREA; +#pragma pack() + +/** + RapidStart Global NVS Area Protocol + + To provide OS base utility controlling mechanism there are some items + created in Rapid Start private ACPI Global NVS area. Note: This will be + published by reference code as one SSDT table so no Platform code change + required. +**/ +struct _RAPID_START_GLOBAL_NVS_AREA_PROTOCOL { + RAPID_START_GLOBAL_NVS_AREA *Area; + VOID *RapidStartData; +}; + +#endif |