MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
**/
|
||||
|
||||
#include <PiDxe.h>
|
||||
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// Sample ACPI Platform Driver
|
||||
//
|
||||
// Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,15 +1,15 @@
|
||||
## @file
|
||||
# Sample ACPI Platform Driver
|
||||
#
|
||||
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// AcpiPlatform Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ACPI Platform Sample DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -196,7 +196,7 @@ SdtNotifyAcpiList (
|
||||
|
||||
/**
|
||||
Returns a requested ACPI table.
|
||||
|
||||
|
||||
The GetAcpiTable() function returns a pointer to a buffer containing the ACPI table associated
|
||||
with the Index that was input. The following structures are not considered elements in the list of
|
||||
ACPI tables:
|
||||
@@ -206,19 +206,19 @@ SdtNotifyAcpiList (
|
||||
Version is updated with a bit map containing all the versions of ACPI of which the table is a
|
||||
member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() interface,
|
||||
the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion.
|
||||
|
||||
|
||||
@param[in] Index The zero-based index of the table to retrieve.
|
||||
@param[out] Table Pointer for returning the table buffer.
|
||||
@param[out] Version On return, updated with the ACPI versions to which this table belongs. Type
|
||||
EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
@param[out] TableKey On return, points to the table key for the specified ACPI system definition table.
|
||||
This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL.
|
||||
The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable()
|
||||
to uninstall the table.
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetAcpiTable2 (
|
||||
@@ -278,9 +278,9 @@ GetAcpiTable2 (
|
||||
|
||||
/**
|
||||
Register a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function registers a function which will be called whenever a new ACPI table is installed.
|
||||
|
||||
|
||||
@param[in] Notification Points to the callback function to be registered
|
||||
**/
|
||||
VOID
|
||||
@@ -318,13 +318,13 @@ SdtRegisterNotify (
|
||||
|
||||
/**
|
||||
Unregister a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function unregisters a function which will be called whenever a new ACPI table is installed.
|
||||
|
||||
|
||||
@param[in] Notification Points to the callback function to be unregistered.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Callback successfully unregistered.
|
||||
@retval EFI_INVALID_PARAMETER Notification does not match a known registration function.
|
||||
@retval EFI_INVALID_PARAMETER Notification does not match a known registration function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtUnregisterNotify (
|
||||
@@ -371,17 +371,17 @@ SdtUnregisterNotify (
|
||||
|
||||
/**
|
||||
Register or unregister a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function registers or unregisters a function which will be called whenever a new ACPI table is
|
||||
installed.
|
||||
|
||||
|
||||
@param[in] Register If TRUE, then the specified function will be registered. If FALSE, then the specified
|
||||
function will be unregistered.
|
||||
@param[in] Notification Points to the callback function to be registered or unregistered.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Callback successfully registered or unregistered.
|
||||
@retval EFI_INVALID_PARAMETER Notification is NULL
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -413,12 +413,12 @@ RegisterNotify (
|
||||
|
||||
/**
|
||||
Create a handle for the first ACPI opcode in an ACPI system description table.
|
||||
|
||||
|
||||
@param[in] TableKey The table key for the ACPI table, as returned by GetTable().
|
||||
@param[out] Handle On return, points to the newly created ACPI handle.
|
||||
|
||||
@retval EFI_SUCCESS Handle created successfully.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtOpenSdtTable (
|
||||
@@ -466,12 +466,12 @@ SdtOpenSdtTable (
|
||||
|
||||
/**
|
||||
Create a handle for the first ACPI opcode in an ACPI system description table.
|
||||
|
||||
|
||||
@param[in] TableKey The table key for the ACPI table, as returned by GetTable().
|
||||
@param[out] Handle On return, points to the newly created ACPI handle.
|
||||
|
||||
@retval EFI_SUCCESS Handle created successfully.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -489,21 +489,21 @@ OpenSdt (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[in] BufferSize Max buffer size.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtOpenEx (
|
||||
IN VOID *Buffer,
|
||||
IN UINTN BufferSize,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
)
|
||||
{
|
||||
AML_BYTE_ENCODING *AmlByteEncoding;
|
||||
@@ -526,7 +526,7 @@ SdtOpenEx (
|
||||
//
|
||||
AmlHandle = AllocatePool (sizeof(*AmlHandle));
|
||||
ASSERT (AmlHandle != NULL);
|
||||
|
||||
|
||||
AmlHandle->Signature = EFI_AML_HANDLE_SIGNATURE;
|
||||
AmlHandle->Buffer = Buffer;
|
||||
AmlHandle->AmlByteEncoding = AmlByteEncoding;
|
||||
@@ -545,20 +545,20 @@ SdtOpenEx (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
Open (
|
||||
IN VOID *Buffer,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -583,11 +583,11 @@ Open (
|
||||
|
||||
/**
|
||||
Close an ACPI handle.
|
||||
|
||||
|
||||
@param[in] Handle Returns the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -628,7 +628,7 @@ Close (
|
||||
|
||||
/**
|
||||
Retrieve information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -636,7 +636,7 @@ Close (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -692,7 +692,7 @@ GetOption (
|
||||
|
||||
/**
|
||||
Change information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -769,14 +769,14 @@ SetOption (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects.
|
||||
|
||||
|
||||
@param[in] ParentHandle Parent handle.
|
||||
@param[in, out] Handle On entry, points to the previously returned handle or NULL to start with the first
|
||||
handle. On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -834,14 +834,14 @@ GetChild (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the AML path.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtFindPathFromNonRoot (
|
||||
@@ -873,9 +873,9 @@ SdtFindPathFromNonRoot (
|
||||
|
||||
/**
|
||||
Duplicate AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle Handle to be duplicated.
|
||||
|
||||
|
||||
@return Duplicated AML handle.
|
||||
**/
|
||||
EFI_AML_HANDLE *
|
||||
@@ -894,14 +894,14 @@ SdtDuplicateHandle (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the AML path.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtFindPathFromRoot (
|
||||
@@ -977,14 +977,14 @@ SdtFindPathFromRoot (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AcpiPath Points to the ACPI path, which conforms to the ACPI encoded path format.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1006,7 +1006,7 @@ FindPath (
|
||||
}
|
||||
|
||||
AmlHandle = (EFI_AML_HANDLE *)HandleIn;
|
||||
|
||||
|
||||
//
|
||||
// Convert ASL path to AML path
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -130,7 +130,7 @@ typedef UINT32 AML_OP_ATTRIBUTE;
|
||||
#define AML_HAS_CHILD_OBJ 0x4 // it is ACPI attribute - if OpCode has Child Object.
|
||||
#define AML_IN_NAMESPACE 0x10000 // It is UEFI SDT attribute - if OpCode will be in NameSpace
|
||||
// NOTE; Not all OBJECT will be in NameSpace
|
||||
// For example, BankField | CreateBitField | CreateByteField | CreateDWordField |
|
||||
// For example, BankField | CreateBitField | CreateByteField | CreateDWordField |
|
||||
// CreateField | CreateQWordField | CreateWordField | Field | IndexField.
|
||||
|
||||
struct _AML_BYTE_ENCODING {
|
||||
@@ -147,7 +147,7 @@ struct _AML_BYTE_ENCODING {
|
||||
|
||||
/**
|
||||
Returns a requested ACPI table.
|
||||
|
||||
|
||||
The GetAcpiTable() function returns a pointer to a buffer containing the ACPI table associated
|
||||
with the Index that was input. The following structures are not considered elements in the list of
|
||||
ACPI tables:
|
||||
@@ -157,20 +157,20 @@ struct _AML_BYTE_ENCODING {
|
||||
Version is updated with a bit map containing all the versions of ACPI of which the table is a
|
||||
member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() interface,
|
||||
the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion.
|
||||
|
||||
|
||||
@param[in] Index The zero-based index of the table to retrieve.
|
||||
@param[out] Table Pointer for returning the table buffer.
|
||||
@param[out] Version On return, updated with the ACPI versions to which this table belongs. Type
|
||||
EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
@param[out] TableKey On return, points to the table key for the specified ACPI system definition table.
|
||||
This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL.
|
||||
The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable()
|
||||
to uninstall the table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetAcpiTable2 (
|
||||
@@ -182,17 +182,17 @@ GetAcpiTable2 (
|
||||
|
||||
/**
|
||||
Register or unregister a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function registers or unregisters a function which will be called whenever a new ACPI table is
|
||||
installed.
|
||||
|
||||
|
||||
@param[in] Register If TRUE, then the specified function will be registered. If FALSE, then the specified
|
||||
function will be unregistered.
|
||||
@param[in] Notification Points to the callback function to be registered or unregistered.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Callback successfully registered or unregistered.
|
||||
@retval EFI_INVALID_PARAMETER Notification is NULL
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -203,12 +203,12 @@ RegisterNotify (
|
||||
|
||||
/**
|
||||
Create a handle for the first ACPI opcode in an ACPI system description table.
|
||||
|
||||
|
||||
@param[in] TableKey The table key for the ACPI table, as returned by GetTable().
|
||||
@param[out] Handle On return, points to the newly created ACPI handle.
|
||||
|
||||
@retval EFI_SUCCESS Handle created successfully.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -219,29 +219,29 @@ OpenSdt (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
Open (
|
||||
IN VOID *Buffer,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
);
|
||||
|
||||
/**
|
||||
Close an ACPI handle.
|
||||
|
||||
|
||||
@param[in] Handle Returns the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -251,7 +251,7 @@ Close (
|
||||
|
||||
/**
|
||||
Retrieve information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -259,7 +259,7 @@ Close (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -275,7 +275,7 @@ GetOption (
|
||||
|
||||
/**
|
||||
Change information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -299,14 +299,14 @@ SetOption (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects.
|
||||
|
||||
|
||||
@param[in] ParentHandle Parent handle.
|
||||
@param[in, out] Handle On entry, points to the previously returned handle or NULL to start with the first
|
||||
handle. On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -317,14 +317,14 @@ GetChild (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AcpiPath Points to the ACPI path, which conforms to the ACPI encoded path format.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -340,21 +340,21 @@ FindPath (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[in] BufferSize Max buffer size.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtOpenEx (
|
||||
IN VOID *Buffer,
|
||||
IN UINTN BufferSize,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
);
|
||||
|
||||
//
|
||||
@@ -365,8 +365,8 @@ SdtOpenEx (
|
||||
Get AML NameString size.
|
||||
|
||||
@param[in] Buffer AML NameString.
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid AML NameString.
|
||||
**/
|
||||
@@ -416,11 +416,11 @@ AmlSearchByOpByte (
|
||||
|
||||
/**
|
||||
Return object size.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML object buffer.
|
||||
@param[in] MaxBufferSize AML object buffer MAX size. The parser can not parse any data exceed this region.
|
||||
|
||||
|
||||
@return Size of the object.
|
||||
**/
|
||||
UINTN
|
||||
@@ -432,9 +432,9 @@ AmlGetObjectSize (
|
||||
|
||||
/**
|
||||
Return object name.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
|
||||
|
||||
@return Name of the object.
|
||||
**/
|
||||
CHAR8 *
|
||||
@@ -444,7 +444,7 @@ AmlGetObjectName (
|
||||
|
||||
/**
|
||||
Retrieve information according to AmlHandle
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -452,7 +452,7 @@ AmlGetObjectName (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -467,10 +467,10 @@ AmlParseOptionHandleCommon (
|
||||
|
||||
/**
|
||||
Return offset of last option.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML Handle.
|
||||
@param[out] Buffer Upon return, points to the offset after last option.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -482,14 +482,14 @@ AmlGetOffsetAfterLastOption (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromRoot (
|
||||
@@ -500,14 +500,14 @@ AmlGetChildFromRoot (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Non-Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Non-Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromNonRoot (
|
||||
@@ -531,16 +531,16 @@ AmlNameFromAslName (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI AML path
|
||||
|
||||
|
||||
@param[in] AmlHandle Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the ACPI AML path.
|
||||
@param[out] Buffer On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
@param[in] FromRoot TRUE means to find AML path from \ (Root) Node.
|
||||
FALSE means to find AML path from this Node (The HandleIn).
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlFindPath (
|
||||
@@ -574,7 +574,7 @@ AmlPrintNameSeg (
|
||||
Check if it is AML Root name
|
||||
|
||||
@param[in] Buffer AML path.
|
||||
|
||||
|
||||
@retval TRUE AML path is root.
|
||||
@retval FALSE AML path is not root.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Table Protocol Driver
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -150,14 +150,14 @@ AcpiTableAcpiTableConstructor (
|
||||
|
||||
/**
|
||||
Entry point of the ACPI table driver.
|
||||
Creates and initializes an instance of the ACPI Table
|
||||
Creates and initializes an instance of the ACPI Table
|
||||
Protocol and installs it on a new handle.
|
||||
|
||||
@param ImageHandle A handle for the image that is initializing this driver
|
||||
@param SystemTable A pointer to the EFI system table
|
||||
|
||||
@return EFI_SUCCESS Driver initialized successfully
|
||||
@return EFI_LOAD_ERROR Failed to Initialize or has been loaded
|
||||
@return EFI_LOAD_ERROR Failed to Initialize or has been loaded
|
||||
@return EFI_OUT_OF_RESOURCES Could not allocate needed resources
|
||||
|
||||
**/
|
||||
@@ -176,7 +176,7 @@ InitializeAcpiTableDxe (
|
||||
|
||||
@param[in] Handle Table to find.
|
||||
@param[in] TableList Table list to search
|
||||
@param[out] Table Pointer to table found.
|
||||
@param[out] Table Pointer to table found.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NOT_FOUND No table found matching the handle specified.
|
||||
|
@@ -1,16 +1,16 @@
|
||||
## @file
|
||||
# ACPI Table Protocol Driver
|
||||
#
|
||||
# This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI
|
||||
# This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI
|
||||
# services to install/uninstall/manage ACPI tables.
|
||||
#
|
||||
# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
||||
# This program and the accompanying materials are
|
||||
# licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
@@ -1,13 +1,13 @@
|
||||
// /** @file
|
||||
// AcpiTableDxe Module Localized Abstract and Description Content
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// AcpiTableDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ACPI Table DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Table Protocol Implementation
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -18,9 +18,9 @@
|
||||
//
|
||||
#include "AcpiTable.h"
|
||||
//
|
||||
// The maximum number of tables that pre-allocated.
|
||||
// The maximum number of tables that pre-allocated.
|
||||
//
|
||||
UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES;
|
||||
UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES;
|
||||
|
||||
//
|
||||
// Allocation strategy to use for AllocatePages ().
|
||||
@@ -196,7 +196,7 @@ PublishTables (
|
||||
@param TableKey Reurns a key to refer to the ACPI table.
|
||||
|
||||
@return EFI_SUCCESS The table was successfully inserted.
|
||||
@return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize
|
||||
@return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize
|
||||
and the size field embedded in the ACPI table pointed to by AcpiTableBuffer
|
||||
are not in sync.
|
||||
@return EFI_OUT_OF_RESOURCES Insufficient resources exist to complete the request.
|
||||
@@ -253,7 +253,7 @@ InstallAcpiTable (
|
||||
);
|
||||
}
|
||||
FreePool (AcpiTableBufferConst);
|
||||
|
||||
|
||||
//
|
||||
// Add a new table successfully, notify registed callback
|
||||
//
|
||||
@@ -342,8 +342,8 @@ ReallocateAcpiTableBuffer (
|
||||
EFI_ACPI_TABLE_INSTANCE TempPrivateData;
|
||||
EFI_STATUS Status;
|
||||
UINT64 CurrentData;
|
||||
|
||||
CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
|
||||
|
||||
CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
|
||||
//
|
||||
// Enlarge the max table number from mEfiAcpiMaxNumTables to mEfiAcpiMaxNumTables + EFI_ACPI_MAX_NUM_TABLES
|
||||
//
|
||||
@@ -384,7 +384,7 @@ ReallocateAcpiTableBuffer (
|
||||
|
||||
Pointer = (UINT8 *) (UINTN) PageAddress;
|
||||
ZeroMem (Pointer, TotalSize);
|
||||
|
||||
|
||||
AcpiTableInstance->Rsdt1 = (EFI_ACPI_DESCRIPTION_HEADER *) Pointer;
|
||||
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
|
||||
Pointer += (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + NewMaxTableNumber * sizeof (UINT32));
|
||||
@@ -404,14 +404,14 @@ ReallocateAcpiTableBuffer (
|
||||
CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
|
||||
|
||||
//
|
||||
// copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer
|
||||
// copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer
|
||||
//
|
||||
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
|
||||
CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
}
|
||||
CopyMem (AcpiTableInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64)));
|
||||
|
||||
|
||||
//
|
||||
// Calculate orignal ACPI table buffer size
|
||||
//
|
||||
@@ -426,10 +426,10 @@ ReallocateAcpiTableBuffer (
|
||||
}
|
||||
|
||||
gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)TempPrivateData.Rsdt1, EFI_SIZE_TO_PAGES (TotalSize));
|
||||
|
||||
|
||||
//
|
||||
// Update the Max ACPI table number
|
||||
//
|
||||
//
|
||||
mEfiAcpiMaxNumTables = NewMaxTableNumber;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -508,7 +508,7 @@ AddTableToList (
|
||||
//
|
||||
// Allocation memory type depends on the type of the table
|
||||
//
|
||||
if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||
|
||||
if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||
|
||||
(CurrentTableSignature == EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE)) {
|
||||
//
|
||||
// Allocate memory for the FACS. This structure must be aligned
|
||||
@@ -634,7 +634,7 @@ AddTableToList (
|
||||
|
||||
//
|
||||
// Update pointers in FADT. If tables don't exist this will put NULL pointers there.
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// vice-versa.
|
||||
//
|
||||
if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) {
|
||||
@@ -682,7 +682,7 @@ AddTableToList (
|
||||
&AcpiTableInstance->Fadt3->Header.OemId,
|
||||
6
|
||||
);
|
||||
|
||||
|
||||
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
|
||||
//
|
||||
// RSDT OEM information is updated to match FADT OEM information.
|
||||
@@ -714,7 +714,7 @@ AddTableToList (
|
||||
sizeof (UINT64)
|
||||
);
|
||||
AcpiTableInstance->Xsdt->OemRevision = AcpiTableInstance->Fadt3->Header.OemRevision;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Checksum the table
|
||||
//
|
||||
@@ -782,7 +782,7 @@ AddTableToList (
|
||||
//
|
||||
if (AcpiTableInstance->Fadt3 != NULL) {
|
||||
//
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// vice-versa.
|
||||
//
|
||||
if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) {
|
||||
@@ -854,7 +854,7 @@ AddTableToList (
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) {
|
||||
//
|
||||
// Save a pointer to the table
|
||||
@@ -900,7 +900,7 @@ AddTableToList (
|
||||
Checksum)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Checksum the table
|
||||
//
|
||||
@@ -1050,7 +1050,7 @@ AddTableToList (
|
||||
|
||||
@param Handle Table to find.
|
||||
@param TableList Table list to search
|
||||
@param Table Pointer to table found.
|
||||
@param Table Pointer to table found.
|
||||
|
||||
@return EFI_SUCCESS The function completed successfully.
|
||||
@return EFI_NOT_FOUND No table found matching the handle specified.
|
||||
@@ -1100,7 +1100,7 @@ FindTableByHandle (
|
||||
For Acpi 1.0 tables, pass in the Rsdt.
|
||||
For Acpi 2.0 tables, pass in both Rsdt and Xsdt.
|
||||
|
||||
@param Table Pointer to table found.
|
||||
@param Table Pointer to table found.
|
||||
@param NumberOfTableEntries Current number of table entries in the RSDT/XSDT
|
||||
@param Rsdt Pointer to the RSDT to remove from
|
||||
@param Xsdt Pointer to the Xsdt to remove from
|
||||
@@ -1320,7 +1320,7 @@ DeleteTable (
|
||||
// Remove this version from the table
|
||||
//
|
||||
Table->Version = Table->Version &~(Version & ACPI_TABLE_VERSION_GTE_2_0);
|
||||
|
||||
|
||||
//
|
||||
// Remove from Rsdt and Xsdt. We don't care about the return value
|
||||
// because it is acceptable for the table to not exist in Rsdt/Xsdt.
|
||||
@@ -1334,7 +1334,7 @@ DeleteTable (
|
||||
AcpiTableInstance->Xsdt
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Free the table, clean up any dependent tables and our private data pointers.
|
||||
//
|
||||
@@ -1392,7 +1392,7 @@ DeleteTable (
|
||||
Checksum)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE:
|
||||
@@ -1417,7 +1417,7 @@ DeleteTable (
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) {
|
||||
AcpiTableInstance->Dsdt3 = NULL;
|
||||
|
||||
@@ -1640,7 +1640,7 @@ ChecksumCommonTables (
|
||||
OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER,
|
||||
Checksum)
|
||||
);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -209,7 +209,7 @@ AmlSearchByOpByte (
|
||||
return &mAmlByteEncoding[Index];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ AmlGetPkgLength (
|
||||
UINT8 ByteCount;
|
||||
UINTN RealLength;
|
||||
UINTN Offset;
|
||||
|
||||
|
||||
//
|
||||
// <bit 7-6: ByteData count that follows (0-3)>
|
||||
// <bit 5-4: Only used if PkgLength < 63>
|
||||
@@ -265,8 +265,8 @@ AmlGetPkgLength (
|
||||
// package length value. The next ByteData will become the next least significant 8 bits
|
||||
// of the resulting value and so on, up to 3 ByteData bytes. Thus, the maximum package
|
||||
// length is 2**28.
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
LeadByte = *Buffer;
|
||||
ByteCount = (UINT8)((LeadByte >> 6) & 0x03);
|
||||
Offset = ByteCount + 1;
|
||||
@@ -295,7 +295,7 @@ AmlGetPkgLength (
|
||||
ASSERT (0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
*PkgLength = RealLength;
|
||||
return Offset;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
/**
|
||||
Return the child objects buffer from AML Handle's buffer.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle.
|
||||
@param[in] CurrentBuffer The current child buffer.
|
||||
@param[out] Buffer On return, points to the next returned child buffer or NULL if there are no
|
||||
child buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromObjectBuffer (
|
||||
@@ -72,14 +72,14 @@ AmlGetChildFromObjectBuffer (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromRoot (
|
||||
@@ -104,14 +104,14 @@ AmlGetChildFromRoot (
|
||||
|
||||
/**
|
||||
Return the child objects buffer from AML Handle's option list.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle.
|
||||
@param[in] AmlHandle The current child handle.
|
||||
@param[out] Buffer On return, points to the next returned child buffer or NULL if there are no
|
||||
child buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromOptionList (
|
||||
@@ -170,14 +170,14 @@ AmlGetChildFromOptionList (
|
||||
|
||||
/**
|
||||
Return the child objects buffer from AML Handle's object child list.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle.
|
||||
@param[in] AmlHandle The current child handle.
|
||||
@param[out] Buffer On return, points to the next returned child buffer or NULL if there are no
|
||||
child buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromObjectChildList (
|
||||
@@ -237,14 +237,14 @@ AmlGetChildFromObjectChildList (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Non-Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Non-Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromNonRoot (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
/**
|
||||
Construct node list according to the AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -33,11 +33,11 @@ AmlConstructNodeList (
|
||||
|
||||
/**
|
||||
Create AML Node.
|
||||
|
||||
|
||||
@param[in] NameSeg AML NameSeg.
|
||||
@param[in] Parent AML parent node list.
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
|
||||
|
||||
@return AML Node.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -66,11 +66,11 @@ AmlCreateNode (
|
||||
|
||||
/**
|
||||
Find the AML NameSeg in the children of AmlParentNodeList.
|
||||
|
||||
|
||||
@param[in] NameSeg AML NameSeg.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
@param[in] Create TRUE means to create node if not found.
|
||||
|
||||
|
||||
@return AmlChildNode whoes name is same as NameSeg.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -120,12 +120,12 @@ AmlFindNodeInThis (
|
||||
|
||||
/**
|
||||
Find the AML NameString in the children of AmlParentNodeList or AmlRootNodeList.
|
||||
|
||||
|
||||
@param[in] NameString AML NameString.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
@param[in] Create TRUE means to create node if not found.
|
||||
|
||||
|
||||
@return AmlChildNode whoes name is same as NameSeg.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -166,7 +166,7 @@ AmlFindNodeInTheTree (
|
||||
} else {
|
||||
AmlCurrentNodeList = AmlParentNodeList;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Handle name segment
|
||||
//
|
||||
@@ -206,13 +206,13 @@ AmlFindNodeInTheTree (
|
||||
|
||||
/**
|
||||
Insert the NameString to the AmlNodeList.
|
||||
|
||||
|
||||
@param[in] NameString AML NameString.
|
||||
@param[in] Buffer Buffer for the Node.
|
||||
@param[in] Size Size for the Node.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@return AmlChildNode whoes name is NameString.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -278,11 +278,11 @@ AmlInsertNodeToTree (
|
||||
|
||||
/**
|
||||
Construct child node list according to the AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -369,11 +369,11 @@ AmlConstructNodeListForChild (
|
||||
|
||||
/**
|
||||
Construct node list according to the AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -420,7 +420,7 @@ AmlConstructNodeList (
|
||||
|
||||
/**
|
||||
Destruct node list
|
||||
|
||||
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
**/
|
||||
VOID
|
||||
@@ -465,7 +465,7 @@ AmlDestructNodeList (
|
||||
|
||||
/**
|
||||
Dump node list
|
||||
|
||||
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
@param[in] Level Output debug level.
|
||||
**/
|
||||
@@ -502,16 +502,16 @@ AmlDumpNodeInfo (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI AML path
|
||||
|
||||
|
||||
@param[in] AmlHandle Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the ACPI AML path.
|
||||
@param[out] Buffer On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
@param[in] FromRoot TRUE means to find AML path from \ (Root) Node.
|
||||
FALSE means to find AML path from this Node (The HandleIn).
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlFindPath (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/**
|
||||
Retrieve option term according to AmlByteEncoding and Buffer.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML buffer.
|
||||
@param[in] MaxBufferSize AML buffer MAX size. The parser can not parse any data exceed this region.
|
||||
@@ -25,7 +25,7 @@
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -125,7 +125,7 @@ AmlParseOptionTerm (
|
||||
|
||||
/**
|
||||
Retrieve information according to AmlByteEncoding and Buffer.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML buffer.
|
||||
@param[in] MaxBufferSize AML buffer MAX size. The parser can not parse any data exceed this region.
|
||||
@@ -135,7 +135,7 @@ AmlParseOptionTerm (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -286,11 +286,11 @@ AmlParseOptionCommon (
|
||||
|
||||
/**
|
||||
Return object size.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML object buffer.
|
||||
@param[in] MaxBufferSize AML object buffer MAX size. The parser can not parse any data exceed this region.
|
||||
|
||||
|
||||
@return Size of the object.
|
||||
**/
|
||||
UINTN
|
||||
@@ -321,9 +321,9 @@ AmlGetObjectSize (
|
||||
|
||||
/**
|
||||
Return object name.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
|
||||
|
||||
@return Name of the object.
|
||||
**/
|
||||
CHAR8 *
|
||||
@@ -374,10 +374,10 @@ AmlGetObjectName (
|
||||
|
||||
/**
|
||||
Return offset of last option.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML Handle.
|
||||
@param[out] Buffer Upon return, points to the offset after last option.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -419,7 +419,7 @@ AmlGetOffsetAfterLastOption (
|
||||
|
||||
/**
|
||||
Retrieve information according to AmlHandle
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -427,7 +427,7 @@ AmlGetOffsetAfterLastOption (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -18,7 +18,7 @@
|
||||
Check if it is AML Root name
|
||||
|
||||
@param[in] Buffer AML path.
|
||||
|
||||
|
||||
@retval TRUE AML path is root.
|
||||
@retval FALSE AML path is not root.
|
||||
**/
|
||||
@@ -38,7 +38,7 @@ AmlIsRootPath (
|
||||
Check if it is AML LeadName.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is AML LeadName.
|
||||
@retval FALSE Char is not AML LeadName.
|
||||
**/
|
||||
@@ -58,7 +58,7 @@ AmlIsLeadName (
|
||||
Check if it is AML Name.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is AML Name.
|
||||
@retval FALSE Char is not AML Name.
|
||||
**/
|
||||
@@ -78,7 +78,7 @@ AmlIsName (
|
||||
Return is buffer is AML NameSeg.
|
||||
|
||||
@param[in] Buffer AML NameSement.
|
||||
|
||||
|
||||
@retval TRUE It is AML NameSegment.
|
||||
@retval FALSE It is not AML NameSegment.
|
||||
**/
|
||||
@@ -103,8 +103,8 @@ AmlIsNameSeg (
|
||||
Get AML NameString size.
|
||||
|
||||
@param[in] Buffer AML NameString.
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid AML NameString.
|
||||
**/
|
||||
@@ -183,7 +183,7 @@ AmlGetNameStringSize (
|
||||
Check if it is ASL LeadName.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is ASL LeadName.
|
||||
@retval FALSE Char is not ASL LeadName.
|
||||
**/
|
||||
@@ -203,7 +203,7 @@ AmlIsAslLeadName (
|
||||
Check if it is ASL Name.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is ASL Name.
|
||||
@retval FALSE Char is not ASL Name.
|
||||
**/
|
||||
@@ -223,7 +223,7 @@ AmlIsAslName (
|
||||
Get ASL NameString size.
|
||||
|
||||
@param[in] Buffer ASL NameString.
|
||||
|
||||
|
||||
@return ASL NameString size.
|
||||
**/
|
||||
UINTN
|
||||
@@ -237,7 +237,7 @@ AmlGetAslNameSegLength (
|
||||
if (*Buffer == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Length = 0;
|
||||
//
|
||||
// 1st
|
||||
@@ -275,7 +275,7 @@ AmlGetAslNameSegLength (
|
||||
@param[out] Root On return, points to Root char number.
|
||||
@param[out] Parent On return, points to Parent char number.
|
||||
@param[out] SegCount On return, points to Segment count.
|
||||
|
||||
|
||||
@return ASL NameString size.
|
||||
**/
|
||||
UINTN
|
||||
@@ -532,7 +532,7 @@ AmlPrintNameString (
|
||||
//
|
||||
SegCount = 1;
|
||||
}
|
||||
|
||||
|
||||
AmlPrintNameSeg (Buffer);
|
||||
Buffer += AML_NAME_SEG_SIZE;
|
||||
for (Index = 0; Index < SegCount - 1; Index++) {
|
||||
|
@@ -7,10 +7,10 @@
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This module installs the ACPI Boot Graphics Resource Table (BGRT).
|
||||
//
|
||||
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// BootGraphicsResourceTableDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ACPI Boot Graphics Resource Table DXE Driver"
|
||||
|
||||
|
||||
|
@@ -38,11 +38,11 @@
|
||||
ScriptExecute.c
|
||||
|
||||
[Sources.X64]
|
||||
X64/SetIdtEntry.c
|
||||
X64/SetIdtEntry.c
|
||||
X64/S3Asm.nasm
|
||||
|
||||
|
||||
[Sources.Ia32]
|
||||
IA32/SetIdtEntry.c
|
||||
IA32/SetIdtEntry.c
|
||||
IA32/S3Asm.nasm
|
||||
|
||||
[Packages]
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// This is a standalone Boot Script Executor. Standalone means it does not
|
||||
// depends on any PEI or DXE service.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// BootScriptExecutorDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Boot Script Execution DXE Driver"
|
||||
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory
|
||||
in the entry point. The functionality is to interpret and restore the S3 boot script
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -72,12 +72,12 @@ S3BootScriptExecutorEntryFunction (
|
||||
// for that parameter.
|
||||
//
|
||||
Status = S3BootScriptExecute ();
|
||||
|
||||
|
||||
//
|
||||
// If invalid script table or opcode in S3 boot script table.
|
||||
//
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
CpuDeadLoop ();
|
||||
return Status;
|
||||
@@ -95,7 +95,7 @@ S3BootScriptExecutorEntryFunction (
|
||||
//
|
||||
if (PeiS3ResumeState != 0) {
|
||||
//
|
||||
// Need report status back to S3ResumePeim.
|
||||
// Need report status back to S3ResumePeim.
|
||||
// If boot script execution is failed, S3ResumePeim wil report the error status code.
|
||||
//
|
||||
PeiS3ResumeState->ReturnStatus = (UINT64)(UINTN)Status;
|
||||
@@ -145,7 +145,7 @@ S3BootScriptExecutorEntryFunction (
|
||||
CpuDeadLoop();
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// S3ResumePeim does not provide a way to jump back to itself, so resume to OS here directly
|
||||
//
|
||||
@@ -254,9 +254,9 @@ RegisterMemoryProfileImage (
|
||||
/**
|
||||
This is the Event notification function to reload BootScriptExecutor image
|
||||
to RESERVED mem and save it to LockBox.
|
||||
|
||||
|
||||
@param Event Pointer to this event
|
||||
@param Context Event handler private data
|
||||
@param Context Event handler private data
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
The header file for Boot Script Executer module.
|
||||
|
||||
This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory
|
||||
in the entry point. The functionality is to interpret and restore the S3 boot script
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory
|
||||
in the entry point. The functionality is to interpret and restore the S3 boot script
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -51,9 +51,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
/**
|
||||
a ASM function to transfer control to OS.
|
||||
|
||||
|
||||
@param S3WakingVector The S3 waking up vector saved in ACPI Facs table
|
||||
@param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
|
||||
@param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
|
||||
**/
|
||||
VOID
|
||||
AsmTransferControl (
|
||||
@@ -62,9 +62,9 @@ AsmTransferControl (
|
||||
);
|
||||
/**
|
||||
a 32bit ASM function to transfer control to OS.
|
||||
|
||||
|
||||
@param S3WakingVector The S3 waking up vector saved in ACPI Facs table
|
||||
@param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
|
||||
@param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
|
||||
**/
|
||||
VOID
|
||||
AsmTransferControl32 (
|
||||
@@ -79,13 +79,13 @@ AsmTransferControl16 (
|
||||
VOID
|
||||
);
|
||||
/**
|
||||
Set a IDT entry for interrupt vector 3 for debug purpose.
|
||||
|
||||
@param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT
|
||||
|
||||
Set a IDT entry for interrupt vector 3 for debug purpose.
|
||||
|
||||
@param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT
|
||||
|
||||
**/
|
||||
VOID
|
||||
SetIdtEntry (
|
||||
SetIdtEntry (
|
||||
IN ACPI_S3_CONTEXT *AcpiS3Context
|
||||
);
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ AcquirePage (
|
||||
|
||||
/**
|
||||
The page fault handler that on-demand read >4G memory/MMIO.
|
||||
|
||||
|
||||
@retval TRUE The page fault is correctly handled.
|
||||
@retval FALSE The page fault is not handled and is passed through to original handler.
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
This module install ACPI Firmware Performance Data Table (FPDT).
|
||||
|
||||
This module register report status code listener to collect performance data
|
||||
for Firmware Basic Boot Performance Record and other boot performance records,
|
||||
for Firmware Basic Boot Performance Record and other boot performance records,
|
||||
and install FPDT to ACPI table.
|
||||
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
@@ -438,7 +438,7 @@ FpdtStatusCodeListenerDxe (
|
||||
if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) != EFI_PROGRESS_CODE) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
if (Value == (EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_CORE_PC_HANDOFF_TO_NEXT)) {
|
||||
//
|
||||
// DxeCore ReportStatusCode Enable so that the capability can be supported.
|
||||
@@ -552,7 +552,7 @@ FpdtExitBootServicesEventNotify (
|
||||
{
|
||||
if (!mDxeCoreReportStatusCodeEnable) {
|
||||
//
|
||||
// When DxeCore Report Status Code is disabled,
|
||||
// When DxeCore Report Status Code is disabled,
|
||||
// Unregister boot time report status code listener at ExitBootService Event.
|
||||
//
|
||||
mRscHandlerProtocol->Unregister (FpdtStatusCodeListenerDxe);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# This module installs ACPI Firmware Performance Data Table (FPDT).
|
||||
#
|
||||
# This module registers report status code listener to collect performance data
|
||||
# for Firmware Basic Boot Performance Record and other boot performance records,
|
||||
# for Firmware Basic Boot Performance Record and other boot performance records,
|
||||
# and install FPDT to ACPI table.
|
||||
#
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
@@ -10,7 +10,7 @@
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// for Firmware Basic Boot Performance Record and other boot performance records,
|
||||
// and install FPDT to ACPI table.
|
||||
//
|
||||
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// FirmwarePerformanceDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ACPI Firmware Performance DXE Driver"
|
||||
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
@@ -2,17 +2,17 @@
|
||||
// Firmware Performance Pei Module.
|
||||
//
|
||||
// In S3 resume boot mode, it updates S3 Resume Performance Record in ACPI Firmware Performance Data Table.
|
||||
//
|
||||
//
|
||||
// This module register report status code listener to collect performance data
|
||||
// for S3 Resume Performance Record on S3 resume boot path.
|
||||
//
|
||||
// Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// FirmwarePerformancePei Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Firmware Performance PEI Module"
|
||||
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
FpdtSmiHandler() will receive untrusted input and do basic validation.
|
||||
|
||||
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -90,7 +90,7 @@ FpdtStatusCodeListenerSmm (
|
||||
if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) != EFI_PROGRESS_CODE) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Collect one or more Boot records in boot time
|
||||
//
|
||||
@@ -163,7 +163,7 @@ FpdtStatusCodeListenerSmm (
|
||||
/**
|
||||
Communication service SMI Handler entry.
|
||||
|
||||
This SMI handler provides services for report SMM boot records.
|
||||
This SMI handler provides services for report SMM boot records.
|
||||
|
||||
Caution: This function may receive untrusted input.
|
||||
Communicate buffer and buffer size are external input, so this function will do basic validation.
|
||||
@@ -175,11 +175,11 @@ FpdtStatusCodeListenerSmm (
|
||||
be conveyed from a non-SMM environment into an SMM environment.
|
||||
@param[in, out] CommBufferSize The size of the CommBuffer.
|
||||
|
||||
@retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers
|
||||
@retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers
|
||||
should still be called.
|
||||
@retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should
|
||||
@retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should
|
||||
still be called.
|
||||
@retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still
|
||||
@retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still
|
||||
be called.
|
||||
@retval EFI_INTERRUPT_PENDING The interrupt could not be quiesced.
|
||||
|
||||
@@ -212,7 +212,7 @@ FpdtSmiHandler (
|
||||
if(TempCommBufferSize < sizeof (SMM_BOOT_RECORD_COMMUNICATE)) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if (!SmmIsBufferOutsideSmmValid ((UINTN)CommBuffer, TempCommBufferSize)) {
|
||||
DEBUG ((EFI_D_ERROR, "FpdtSmiHandler: SMM communication data buffer in SMRAM or overflow!\n"));
|
||||
return EFI_SUCCESS;
|
||||
@@ -242,7 +242,7 @@ FpdtSmiHandler (
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Sanity check
|
||||
//
|
||||
@@ -255,10 +255,10 @@ FpdtSmiHandler (
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
CopyMem (
|
||||
(UINT8*)BootRecordData,
|
||||
mBootRecordBuffer + BootRecordOffset,
|
||||
(UINT8*)BootRecordData,
|
||||
mBootRecordBuffer + BootRecordOffset,
|
||||
BootRecordSize
|
||||
);
|
||||
break;
|
||||
@@ -268,7 +268,7 @@ FpdtSmiHandler (
|
||||
}
|
||||
|
||||
SmmCommData->ReturnStatus = Status;
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -295,8 +295,8 @@ FirmwarePerformanceSmmEntryPoint (
|
||||
//
|
||||
// Initialize spin lock
|
||||
//
|
||||
InitializeSpinLock (&mSmmFpdtLock);
|
||||
|
||||
InitializeSpinLock (&mSmmFpdtLock);
|
||||
|
||||
//
|
||||
// Get SMM Report Status Code Handler Protocol.
|
||||
//
|
||||
|
@@ -4,12 +4,12 @@
|
||||
# This module registers report status code listener to collect performance data
|
||||
# for SMM boot performance records and S3 Suspend Performance Record.
|
||||
#
|
||||
# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// This module registers report status code listener to collect performance data
|
||||
// for SMM boot performance records and S3 Suspend Performance Record.
|
||||
//
|
||||
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// FirmwarePerformanceSmm Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"SMM Firmware Performance Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This is the implementation to save ACPI S3 Context.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -43,7 +43,7 @@ EFI_GUID mAcpiS3IdtrProfileGuid = {
|
||||
|
||||
@param MemoryType Memory type of memory to allocate.
|
||||
@param Size Size of memory to allocate.
|
||||
|
||||
|
||||
@return Allocated address for output.
|
||||
|
||||
**/
|
||||
@@ -101,7 +101,7 @@ ScanTableInRSDT (
|
||||
}
|
||||
|
||||
EntryCount = (Rsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT32);
|
||||
|
||||
|
||||
EntryPtr = (UINT32 *)(Rsdt + 1);
|
||||
for (Index = 0; Index < EntryCount; Index ++, EntryPtr ++) {
|
||||
Table = (EFI_ACPI_DESCRIPTION_HEADER *)((UINTN)(*EntryPtr));
|
||||
@@ -109,7 +109,7 @@ ScanTableInRSDT (
|
||||
return Table;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ ScanTableInXSDT (
|
||||
}
|
||||
|
||||
EntryCount = (Xsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT64);
|
||||
|
||||
|
||||
BasePtr = (UINTN)(Xsdt + 1);
|
||||
for (Index = 0; Index < EntryCount; Index ++) {
|
||||
CopyMem (&EntryPtr, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64));
|
||||
@@ -149,7 +149,7 @@ ScanTableInXSDT (
|
||||
return Table;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ ScanTableInXSDT (
|
||||
To find Facs in FADT.
|
||||
|
||||
@param Fadt FADT table pointer
|
||||
|
||||
|
||||
@return Facs table pointer.
|
||||
**/
|
||||
EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *
|
||||
@@ -187,12 +187,12 @@ FindAcpiFacsFromFadt (
|
||||
|
||||
/**
|
||||
To find Facs in Acpi tables.
|
||||
|
||||
To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored
|
||||
|
||||
To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored
|
||||
in the table.
|
||||
|
||||
@param AcpiTableGuid The guid used to find ACPI table in UEFI ConfigurationTable.
|
||||
|
||||
|
||||
@return Facs table pointer.
|
||||
**/
|
||||
EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *
|
||||
@@ -256,10 +256,10 @@ FindAcpiFacsTableByAcpiGuid (
|
||||
|
||||
/**
|
||||
To find Facs in Acpi tables.
|
||||
|
||||
To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored
|
||||
|
||||
To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored
|
||||
in the table.
|
||||
|
||||
|
||||
@return Facs table pointer.
|
||||
**/
|
||||
EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *
|
||||
@@ -315,20 +315,20 @@ IsLongModeWakingVectorSupport (
|
||||
|
||||
@param[in] LongModeWakingVectorSupport Support long mode waking vector or not.
|
||||
|
||||
If BootScriptExector driver will run in 64-bit mode, this function will establish the 1:1
|
||||
If BootScriptExector driver will run in 64-bit mode, this function will establish the 1:1
|
||||
virtual to physical mapping page table when long mode waking vector is supported, otherwise
|
||||
create 4G page table when long mode waking vector is not supported and let PF handler to
|
||||
handle > 4G request.
|
||||
If BootScriptExector driver will not run in 64-bit mode, this function will do nothing.
|
||||
|
||||
@return Page table base address.
|
||||
If BootScriptExector driver will not run in 64-bit mode, this function will do nothing.
|
||||
|
||||
@return Page table base address.
|
||||
|
||||
**/
|
||||
EFI_PHYSICAL_ADDRESS
|
||||
S3AllocatePageTablesBuffer (
|
||||
IN BOOLEAN LongModeWakingVectorSupport
|
||||
)
|
||||
{
|
||||
{
|
||||
if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
|
||||
UINTN ExtraPageTablePages;
|
||||
UINT32 RegEax;
|
||||
@@ -419,7 +419,7 @@ S3AllocatePageTablesBuffer (
|
||||
//
|
||||
// If DXE is running 32-bit mode, no need to establish page table.
|
||||
//
|
||||
return (EFI_PHYSICAL_ADDRESS) 0;
|
||||
return (EFI_PHYSICAL_ADDRESS) 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Internal header file for S3 Boot Script Saver state driver.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -48,25 +48,25 @@ AcpiS3ContextSaveOnEndOfDxe (
|
||||
Adds a record into S3 boot script table.
|
||||
|
||||
This function is used to store a boot script record into a given boot
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
necessary memory for the script.
|
||||
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
parameter list is passed in, this function returns EFI_INVALID_PARAMETER.
|
||||
If there are not enough resources available for storing more scripts, this function returns
|
||||
EFI_OUT_OF_RESOURCES.
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
Feature Flags.
|
||||
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
|
||||
|
||||
@@ -98,7 +98,7 @@ BootScriptWrite (
|
||||
inserted, either before or after, depending on BeforeOrAfter. On exit, specifies
|
||||
the position of the inserted opcode in the boot script table.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@@ -139,7 +139,7 @@ BootScriptInsert (
|
||||
|
||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
||||
@retval EFI_INVALID_PARAMETER The Opcode is an invalid opcode value or the Position is not a valid position in the boot script table..
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -152,27 +152,27 @@ BootScriptLabel (
|
||||
);
|
||||
/**
|
||||
Compare two positions in the boot script table and return their relative position.
|
||||
|
||||
|
||||
This function compares two positions in the boot script table and returns their relative positions. If
|
||||
Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2,
|
||||
then 0 is returned. If Position1 is after Position2, then 1 is returned.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param Position1 The positions in the boot script table to compare
|
||||
@param Position2 The positions in the boot script table to compare
|
||||
@param RelativePosition On return, points to the result of the comparison
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
BootScriptCompare (
|
||||
IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This,
|
||||
IN EFI_S3_BOOT_SCRIPT_POSITION Position1,
|
||||
IN EFI_S3_BOOT_SCRIPT_POSITION Position2,
|
||||
OUT UINTN *RelativePosition
|
||||
);
|
||||
|
||||
|
||||
#endif //_INTERNAL_S3_SAVE_STATE_H_
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation for S3 Boot Script Saver state driver.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -46,7 +46,7 @@ BootScriptWriteIoWrite (
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Count = VA_ARG (Marker, UINTN);
|
||||
Buffer = VA_ARG (Marker, UINT8 *);
|
||||
|
||||
|
||||
return S3BootScriptSaveIoWrite (Width, Address, Count, Buffer);
|
||||
}
|
||||
/**
|
||||
@@ -68,12 +68,12 @@ BootScriptWriteIoReadWrite (
|
||||
UINT64 Address;
|
||||
UINT8 *Data;
|
||||
UINT8 *DataMask;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, UINT8 *);
|
||||
DataMask = VA_ARG (Marker, UINT8 *);
|
||||
|
||||
|
||||
return S3BootScriptSaveIoReadWrite (Width, Address, Data, DataMask);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ BootScriptWriteMemWrite (
|
||||
UINT64 Address;
|
||||
UINTN Count;
|
||||
UINT8 *Buffer;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Count = VA_ARG (Marker, UINTN);
|
||||
@@ -124,7 +124,7 @@ BootScriptWriteMemReadWrite (
|
||||
UINT64 Address;
|
||||
UINT8 *Data;
|
||||
UINT8 *DataMask;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, UINT8 *);
|
||||
@@ -238,13 +238,13 @@ BootScriptWritePciCfg2ReadWrite (
|
||||
UINT64 Address;
|
||||
UINT8 *Data;
|
||||
UINT8 *DataMask;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Segment = VA_ARG (Marker, UINT16);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, UINT8 *);
|
||||
DataMask = VA_ARG (Marker, UINT8 *);
|
||||
|
||||
|
||||
return S3BootScriptSavePciCfg2ReadWrite (Width, Segment, Address, Data, DataMask);
|
||||
}
|
||||
/**
|
||||
@@ -269,15 +269,15 @@ BootScriptWriteSmbusExecute (
|
||||
VOID *Buffer;
|
||||
UINTN *DataSize;
|
||||
UINTN SmBusAddress;
|
||||
|
||||
|
||||
SlaveAddress.SmbusDeviceAddress = VA_ARG (Marker, UINTN);
|
||||
Command = VA_ARG (Marker, EFI_SMBUS_DEVICE_COMMAND);
|
||||
Operation = VA_ARG (Marker, EFI_SMBUS_OPERATION);
|
||||
PecCheck = VA_ARG (Marker, BOOLEAN);
|
||||
SmBusAddress = SMBUS_LIB_ADDRESS (SlaveAddress.SmbusDeviceAddress,Command,0,PecCheck);
|
||||
DataSize = VA_ARG (Marker, UINTN *);
|
||||
DataSize = VA_ARG (Marker, UINTN *);
|
||||
Buffer = VA_ARG (Marker, VOID *);
|
||||
|
||||
|
||||
return S3BootScriptSaveSmbusExecute (SmBusAddress, Operation, DataSize, Buffer);
|
||||
}
|
||||
/**
|
||||
@@ -303,7 +303,7 @@ BootScriptWriteStall (
|
||||
}
|
||||
|
||||
/**
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE.
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE.
|
||||
We ignore "Context" parameter
|
||||
|
||||
@param Marker The variable argument list to get the opcode
|
||||
@@ -325,8 +325,8 @@ BootScriptWriteDispatch (
|
||||
}
|
||||
|
||||
/**
|
||||
Internal function to add memory pool operation to the table.
|
||||
|
||||
Internal function to add memory pool operation to the table.
|
||||
|
||||
@param Marker The variable argument list to get the opcode
|
||||
and associated attributes.
|
||||
|
||||
@@ -339,18 +339,18 @@ BootScriptWriteMemPoll (
|
||||
IN VA_LIST Marker
|
||||
)
|
||||
{
|
||||
S3_BOOT_SCRIPT_LIB_WIDTH Width;
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
S3_BOOT_SCRIPT_LIB_WIDTH Width;
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
UINT64 LoopTimes;
|
||||
UINT32 Remainder;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = VA_ARG (Marker, UINT64);
|
||||
//
|
||||
// According to the spec, the interval between 2 polls is 100ns,
|
||||
@@ -375,7 +375,7 @@ BootScriptWriteMemPoll (
|
||||
}
|
||||
|
||||
/**
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE2.
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE2.
|
||||
The "Context" parameter is not ignored.
|
||||
|
||||
@param Marker The variable argument list to get the opcode
|
||||
@@ -391,7 +391,7 @@ BootScriptWriteDispatch2 (
|
||||
)
|
||||
{
|
||||
VOID *EntryPoint;
|
||||
VOID *Context;
|
||||
VOID *Context;
|
||||
|
||||
EntryPoint = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
|
||||
Context = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
|
||||
@@ -414,7 +414,7 @@ BootScriptWriteInformation (
|
||||
)
|
||||
{
|
||||
UINT32 InformationLength;
|
||||
EFI_PHYSICAL_ADDRESS Information;
|
||||
EFI_PHYSICAL_ADDRESS Information;
|
||||
|
||||
InformationLength = VA_ARG (Marker, UINT32);
|
||||
Information = VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
|
||||
@@ -435,17 +435,17 @@ BootScriptWriteIoPoll (
|
||||
)
|
||||
{
|
||||
S3_BOOT_SCRIPT_LIB_WIDTH Width;
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
return S3BootScriptSaveIoPoll (Width, Address, Data, DataMask, Delay);
|
||||
}
|
||||
/**
|
||||
@@ -469,13 +469,13 @@ BootScriptWritePciConfigPoll (
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
return S3BootScriptSavePciPoll (Width, Address, Data, DataMask, Delay);
|
||||
}
|
||||
/**
|
||||
@@ -499,14 +499,14 @@ BootScriptWritePciConfig2Poll (
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Segment = VA_ARG (Marker, UINT16);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Segment = VA_ARG (Marker, UINT16);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
return S3BootScriptSavePci2Poll (Width, Segment, Address, Data, DataMask, Delay);
|
||||
}
|
||||
|
||||
@@ -515,25 +515,25 @@ BootScriptWritePciConfig2Poll (
|
||||
Adds a record into S3 boot script table.
|
||||
|
||||
This function is used to store a boot script record into a given boot
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
necessary memory for the script.
|
||||
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
parameter list is passed in, this function returns EFI_INVALID_PARAMETER.
|
||||
If there are not enough resources available for storing more scripts, this function returns
|
||||
EFI_OUT_OF_RESOURCES.
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
Feature Flags.
|
||||
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
|
||||
|
||||
@@ -547,7 +547,7 @@ BootScriptWrite (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VA_LIST Marker;
|
||||
VA_LIST Marker;
|
||||
//
|
||||
// Build script according to opcode
|
||||
//
|
||||
@@ -568,7 +568,7 @@ BootScriptWrite (
|
||||
case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteMemWrite (Marker);
|
||||
VA_END (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE:
|
||||
@@ -599,7 +599,7 @@ BootScriptWrite (
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteStall (Marker);
|
||||
VA_END (Marker);
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_DISPATCH_OPCODE:
|
||||
@@ -638,23 +638,23 @@ BootScriptWrite (
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteIoPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfigPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfig2Poll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
@@ -683,7 +683,7 @@ BootScriptWrite (
|
||||
inserted, either before or after, depending on BeforeOrAfter. On exit, specifies
|
||||
the position of the inserted opcode in the boot script table.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@@ -702,7 +702,7 @@ BootScriptInsert (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VA_LIST Marker;
|
||||
VA_LIST Marker;
|
||||
//
|
||||
// Build script according to opcode
|
||||
//
|
||||
@@ -723,7 +723,7 @@ BootScriptInsert (
|
||||
case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteMemWrite (Marker);
|
||||
VA_END (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE:
|
||||
@@ -754,7 +754,7 @@ BootScriptInsert (
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteStall (Marker);
|
||||
VA_END (Marker);
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_DISPATCH_OPCODE:
|
||||
@@ -792,30 +792,30 @@ BootScriptInsert (
|
||||
Status = BootScriptWritePciCfg2ReadWrite (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteIoPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfigPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfig2Poll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, Position);
|
||||
}
|
||||
@@ -846,7 +846,7 @@ BootScriptInsert (
|
||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
||||
@retval EFI_INVALID_PARAMETER The Label is NULL or points to an empty string.
|
||||
@retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -858,27 +858,27 @@ BootScriptLabel (
|
||||
IN CONST CHAR8 *Label
|
||||
)
|
||||
{
|
||||
return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label);
|
||||
return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label);
|
||||
}
|
||||
/**
|
||||
Compare two positions in the boot script table and return their relative position.
|
||||
|
||||
|
||||
This function compares two positions in the boot script table and returns their relative positions. If
|
||||
Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2,
|
||||
then 0 is returned. If Position1 is after Position2, then 1 is returned.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param Position1 The positions in the boot script table to compare
|
||||
@param Position2 The positions in the boot script table to compare
|
||||
@param RelativePosition On return, points to the result of the comparison
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
||||
@retval EFI_INVALID_PARAMETER The RelativePosition is NULL.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
BootScriptCompare (
|
||||
IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This,
|
||||
IN EFI_S3_BOOT_SCRIPT_POSITION Position1,
|
||||
@@ -886,7 +886,7 @@ BootScriptCompare (
|
||||
OUT UINTN *RelativePosition
|
||||
)
|
||||
{
|
||||
return S3BootScriptCompare (Position1, Position2, RelativePosition);
|
||||
return S3BootScriptCompare (Position1, Position2, RelativePosition);
|
||||
}
|
||||
/**
|
||||
This routine is entry point of ScriptSave driver.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# It will install S3 Save State protocol to store or record various IO operations to be replayed during an S3 resume.
|
||||
#
|
||||
# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials are
|
||||
# licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -74,4 +74,4 @@
|
||||
TRUE
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
S3SaveStateDxeExtra.uni
|
||||
S3SaveStateDxeExtra.uni
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// It will install S3 Save State protocol to store or record various IO operations to be replayed during an S3 resume.
|
||||
//
|
||||
// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// S3SaveStateDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"S3 Save State DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Internal header file for SMM S3 Boot Script Saver state driver.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -31,25 +31,25 @@
|
||||
Adds a record into S3 boot script table.
|
||||
|
||||
This function is used to store a boot script record into a given boot
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
necessary memory for the script.
|
||||
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
parameter list is passed in, this function returns EFI_INVALID_PARAMETER.
|
||||
If there are not enough resources available for storing more scripts, this function returns
|
||||
EFI_OUT_OF_RESOURCES.
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
Feature Flags.
|
||||
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
|
||||
|
||||
@@ -81,7 +81,7 @@ BootScriptWrite (
|
||||
inserted, either before or after, depending on BeforeOrAfter. On exit, specifies
|
||||
the position of the inserted opcode in the boot script table.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@@ -122,7 +122,7 @@ BootScriptInsert (
|
||||
|
||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
||||
@retval EFI_INVALID_PARAMETER The Opcode is an invalid opcode value or the Position is not a valid position in the boot script table..
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -135,27 +135,27 @@ BootScriptLabel (
|
||||
);
|
||||
/**
|
||||
Compare two positions in the boot script table and return their relative position.
|
||||
|
||||
|
||||
This function compares two positions in the boot script table and returns their relative positions. If
|
||||
Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2,
|
||||
then 0 is returned. If Position1 is after Position2, then 1 is returned.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param Position1 The positions in the boot script table to compare
|
||||
@param Position2 The positions in the boot script table to compare
|
||||
@param RelativePosition On return, points to the result of the comparison
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
BootScriptCompare (
|
||||
IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This,
|
||||
IN EFI_S3_BOOT_SCRIPT_POSITION Position1,
|
||||
IN EFI_S3_BOOT_SCRIPT_POSITION Position2,
|
||||
OUT UINTN *RelativePosition
|
||||
);
|
||||
|
||||
|
||||
#endif //_INTERNAL_SMM_S3_SAVE_STATE_H_
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation for S3 SMM Boot Script Saver state driver.
|
||||
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -45,7 +45,7 @@ BootScriptWriteIoWrite (
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Count = VA_ARG (Marker, UINTN);
|
||||
Buffer = VA_ARG (Marker, UINT8 *);
|
||||
|
||||
|
||||
return S3BootScriptSaveIoWrite (Width, Address, Count, Buffer);
|
||||
}
|
||||
/**
|
||||
@@ -67,12 +67,12 @@ BootScriptWriteIoReadWrite (
|
||||
UINT64 Address;
|
||||
UINT8 *Data;
|
||||
UINT8 *DataMask;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, UINT8 *);
|
||||
DataMask = VA_ARG (Marker, UINT8 *);
|
||||
|
||||
|
||||
return S3BootScriptSaveIoReadWrite (Width, Address, Data, DataMask);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ BootScriptWriteMemWrite (
|
||||
UINT64 Address;
|
||||
UINTN Count;
|
||||
UINT8 *Buffer;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Count = VA_ARG (Marker, UINTN);
|
||||
@@ -123,7 +123,7 @@ BootScriptWriteMemReadWrite (
|
||||
UINT64 Address;
|
||||
UINT8 *Data;
|
||||
UINT8 *DataMask;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, UINT8 *);
|
||||
@@ -237,13 +237,13 @@ BootScriptWritePciCfg2ReadWrite (
|
||||
UINT64 Address;
|
||||
UINT8 *Data;
|
||||
UINT8 *DataMask;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Segment = VA_ARG (Marker, UINT16);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, UINT8 *);
|
||||
DataMask = VA_ARG (Marker, UINT8 *);
|
||||
|
||||
|
||||
return S3BootScriptSavePciCfg2ReadWrite (Width, Segment, Address, Data, DataMask);
|
||||
}
|
||||
/**
|
||||
@@ -268,15 +268,15 @@ BootScriptWriteSmbusExecute (
|
||||
VOID *Buffer;
|
||||
UINTN *DataSize;
|
||||
UINTN SmBusAddress;
|
||||
|
||||
|
||||
SlaveAddress.SmbusDeviceAddress = VA_ARG (Marker, UINTN);
|
||||
Command = VA_ARG (Marker, EFI_SMBUS_DEVICE_COMMAND);
|
||||
Operation = VA_ARG (Marker, EFI_SMBUS_OPERATION);
|
||||
PecCheck = VA_ARG (Marker, BOOLEAN);
|
||||
SmBusAddress = SMBUS_LIB_ADDRESS (SlaveAddress.SmbusDeviceAddress,Command,0,PecCheck);
|
||||
DataSize = VA_ARG (Marker, UINTN *);
|
||||
DataSize = VA_ARG (Marker, UINTN *);
|
||||
Buffer = VA_ARG (Marker, VOID *);
|
||||
|
||||
|
||||
return S3BootScriptSaveSmbusExecute (SmBusAddress, Operation, DataSize, Buffer);
|
||||
}
|
||||
/**
|
||||
@@ -302,7 +302,7 @@ BootScriptWriteStall (
|
||||
}
|
||||
|
||||
/**
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE.
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE.
|
||||
We ignore "Context" parameter
|
||||
|
||||
@param Marker The variable argument list to get the opcode
|
||||
@@ -324,8 +324,8 @@ BootScriptWriteDispatch (
|
||||
}
|
||||
|
||||
/**
|
||||
Internal function to add memory pool operation to the table.
|
||||
|
||||
Internal function to add memory pool operation to the table.
|
||||
|
||||
@param Marker The variable argument list to get the opcode
|
||||
and associated attributes.
|
||||
|
||||
@@ -338,18 +338,18 @@ BootScriptWriteMemPoll (
|
||||
IN VA_LIST Marker
|
||||
)
|
||||
{
|
||||
S3_BOOT_SCRIPT_LIB_WIDTH Width;
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
S3_BOOT_SCRIPT_LIB_WIDTH Width;
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
UINT64 LoopTimes;
|
||||
UINT32 Remainder;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = VA_ARG (Marker, UINT64);
|
||||
//
|
||||
// According to the spec, the interval between 2 polls is 100ns,
|
||||
@@ -369,12 +369,12 @@ BootScriptWriteMemPoll (
|
||||
//
|
||||
LoopTimes +=1;
|
||||
}
|
||||
return S3BootScriptSaveMemPoll (Width, Address, DataMask, Data, 1, LoopTimes);
|
||||
return S3BootScriptSaveMemPoll (Width, Address, DataMask, Data, 1, LoopTimes);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE2.
|
||||
Internal function to add Save jmp address according to DISPATCH_OPCODE2.
|
||||
The "Context" parameter is not ignored.
|
||||
|
||||
@param Marker The variable argument list to get the opcode
|
||||
@@ -390,7 +390,7 @@ BootScriptWriteDispatch2 (
|
||||
)
|
||||
{
|
||||
VOID *EntryPoint;
|
||||
VOID *Context;
|
||||
VOID *Context;
|
||||
|
||||
EntryPoint = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
|
||||
Context = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
|
||||
@@ -413,7 +413,7 @@ BootScriptWriteInformation (
|
||||
)
|
||||
{
|
||||
UINT32 InformationLength;
|
||||
EFI_PHYSICAL_ADDRESS Information;
|
||||
EFI_PHYSICAL_ADDRESS Information;
|
||||
|
||||
InformationLength = VA_ARG (Marker, UINT32);
|
||||
Information = VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
|
||||
@@ -433,18 +433,18 @@ BootScriptWriteIoPoll (
|
||||
IN VA_LIST Marker
|
||||
)
|
||||
{
|
||||
S3_BOOT_SCRIPT_LIB_WIDTH Width;
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
S3_BOOT_SCRIPT_LIB_WIDTH Width;
|
||||
UINT64 Address;
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
return S3BootScriptSaveIoPoll (Width, Address, Data, DataMask, Delay);
|
||||
}
|
||||
/**
|
||||
@@ -468,13 +468,13 @@ BootScriptWritePciConfigPoll (
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
return S3BootScriptSavePciPoll (Width, Address, Data, DataMask, Delay);
|
||||
}
|
||||
/**
|
||||
@@ -498,14 +498,14 @@ BootScriptWritePciConfig2Poll (
|
||||
VOID *Data;
|
||||
VOID *DataMask;
|
||||
UINT64 Delay;
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Segment = VA_ARG (Marker, UINT16);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
|
||||
Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
|
||||
Segment = VA_ARG (Marker, UINT16);
|
||||
Address = VA_ARG (Marker, UINT64);
|
||||
Data = VA_ARG (Marker, VOID *);
|
||||
DataMask = VA_ARG (Marker, VOID *);
|
||||
Delay = (UINT64)VA_ARG (Marker, UINT64);
|
||||
|
||||
return S3BootScriptSavePci2Poll (Width, Segment, Address, Data, DataMask, Delay);
|
||||
}
|
||||
|
||||
@@ -513,25 +513,25 @@ BootScriptWritePciConfig2Poll (
|
||||
Adds a record into S3 boot script table.
|
||||
|
||||
This function is used to store a boot script record into a given boot
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
script table. If the table specified by TableName is nonexistent in the
|
||||
system, a new table will automatically be created and then the script record
|
||||
will be added into the new table. This function is responsible for allocating
|
||||
necessary memory for the script.
|
||||
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
This function has a variable parameter list. The exact parameter list depends on
|
||||
the OpCode that is passed into the function. If an unsupported OpCode or illegal
|
||||
parameter list is passed in, this function returns EFI_INVALID_PARAMETER.
|
||||
If there are not enough resources available for storing more scripts, this function returns
|
||||
EFI_OUT_OF_RESOURCES.
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
If the opcode is unknow or not supported because of the PCD
|
||||
Feature Flags.
|
||||
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
|
||||
|
||||
@@ -545,7 +545,7 @@ BootScriptWrite (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VA_LIST Marker;
|
||||
VA_LIST Marker;
|
||||
//
|
||||
// Build script according to opcode
|
||||
//
|
||||
@@ -566,7 +566,7 @@ BootScriptWrite (
|
||||
case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteMemWrite (Marker);
|
||||
VA_END (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE:
|
||||
@@ -597,7 +597,7 @@ BootScriptWrite (
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteStall (Marker);
|
||||
VA_END (Marker);
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_DISPATCH_OPCODE:
|
||||
@@ -636,23 +636,23 @@ BootScriptWrite (
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteIoPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfigPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfig2Poll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
@@ -681,7 +681,7 @@ BootScriptWrite (
|
||||
inserted, either before or after, depending on BeforeOrAfter. On exit, specifies
|
||||
the position of the inserted opcode in the boot script table.
|
||||
@param OpCode The operation code (opcode) number.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
@param ... Argument list that is specific to each opcode.
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded. A record was added into the
|
||||
specified script table.
|
||||
@@ -700,7 +700,7 @@ BootScriptInsert (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VA_LIST Marker;
|
||||
VA_LIST Marker;
|
||||
//
|
||||
// Build script according to opcode
|
||||
//
|
||||
@@ -721,7 +721,7 @@ BootScriptInsert (
|
||||
case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteMemWrite (Marker);
|
||||
VA_END (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE:
|
||||
@@ -752,7 +752,7 @@ BootScriptInsert (
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteStall (Marker);
|
||||
VA_END (Marker);
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_DISPATCH_OPCODE:
|
||||
@@ -790,30 +790,30 @@ BootScriptInsert (
|
||||
Status = BootScriptWritePciCfg2ReadWrite (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
|
||||
case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWriteIoPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfigPoll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE:
|
||||
VA_START (Marker, OpCode);
|
||||
Status = BootScriptWritePciConfig2Poll (Marker);
|
||||
VA_END (Marker);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, Position);
|
||||
}
|
||||
@@ -844,7 +844,7 @@ BootScriptInsert (
|
||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
||||
@retval EFI_INVALID_PARAMETER The Label is NULL or points to an empty string.
|
||||
@retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -856,27 +856,27 @@ BootScriptLabel (
|
||||
IN CONST CHAR8 *Label
|
||||
)
|
||||
{
|
||||
return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label);
|
||||
return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label);
|
||||
}
|
||||
/**
|
||||
Compare two positions in the boot script table and return their relative position.
|
||||
|
||||
|
||||
This function compares two positions in the boot script table and returns their relative positions. If
|
||||
Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2,
|
||||
then 0 is returned. If Position1 is after Position2, then 1 is returned.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance.
|
||||
@param Position1 The positions in the boot script table to compare
|
||||
@param Position2 The positions in the boot script table to compare
|
||||
@param RelativePosition On return, points to the result of the comparison
|
||||
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_SUCCESS The operation succeeded.
|
||||
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
||||
@retval EFI_INVALID_PARAMETER The RelativePosition is NULL.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
BootScriptCompare (
|
||||
IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This,
|
||||
IN EFI_S3_BOOT_SCRIPT_POSITION Position1,
|
||||
@@ -884,7 +884,7 @@ BootScriptCompare (
|
||||
OUT UINTN *RelativePosition
|
||||
)
|
||||
{
|
||||
return S3BootScriptCompare (Position1, Position2, RelativePosition);
|
||||
return S3BootScriptCompare (Position1, Position2, RelativePosition);
|
||||
}
|
||||
/**
|
||||
This routine is entry point of ScriptSave driver.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# It will install S3 SMM Save State protocol to store or record various IO operations to be replayed during an S3 resume.
|
||||
#
|
||||
# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials are
|
||||
# licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -23,7 +23,7 @@
|
||||
MODULE_TYPE = DXE_SMM_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
PI_SPECIFICATION_VERSION = 0x0001000A
|
||||
|
||||
|
||||
ENTRY_POINT = InitializeSmmS3SaveState
|
||||
|
||||
#
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// It will install S3 SMM Save State protocol to store or record various IO operations to be replayed during an S3 resume.
|
||||
//
|
||||
// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// SmmS3SaveState Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"SMM S3 Save State Driver"
|
||||
|
||||
|
||||
|
@@ -78,14 +78,14 @@ BdsEntry (
|
||||
then EFI_INVALID_PARAMETER is returned.
|
||||
@param VendorGuid A unique identifier for the vendor.
|
||||
@param Attributes Attributes bitmask to set for the variable.
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero
|
||||
causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is
|
||||
set, then a SetVariable() call with a DataSize of zero will not cause any change to
|
||||
the variable value (the timestamp associated with the variable may be updated however
|
||||
even if no new data value is provided,see the description of the
|
||||
EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not
|
||||
be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).
|
||||
causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is
|
||||
set, then a SetVariable() call with a DataSize of zero will not cause any change to
|
||||
the variable value (the timestamp associated with the variable may be updated however
|
||||
even if no new data value is provided,see the description of the
|
||||
EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not
|
||||
be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).
|
||||
@param Data The contents for the variable.
|
||||
|
||||
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
|
||||
|
@@ -1,10 +1,10 @@
|
||||
## @file
|
||||
# BdsDxe module is core driver for BDS phase.
|
||||
#
|
||||
# When DxeCore dispatching all DXE driver, this module will produce architecture protocol
|
||||
# When DxeCore dispatching all DXE driver, this module will produce architecture protocol
|
||||
# gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry
|
||||
# interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered.
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -22,7 +22,7 @@
|
||||
MODULE_UNI_FILE = BdsDxe.uni
|
||||
FILE_GUID = 6D33944A-EC75-4855-A54D-809C75241F6C
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = BdsInitialize
|
||||
|
||||
#
|
||||
|
@@ -5,12 +5,12 @@
|
||||
// gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry
|
||||
// interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered.
|
||||
//
|
||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// BdsDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Boot Device Selection Core DXE Driver"
|
||||
|
||||
|
||||
|
@@ -293,9 +293,9 @@ BdsReadKeys (
|
||||
}
|
||||
|
||||
while (gST->ConIn != NULL) {
|
||||
|
||||
|
||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// No more keys.
|
||||
@@ -488,10 +488,10 @@ ProcessLoadOptions (
|
||||
|
||||
/**
|
||||
|
||||
Validate input console variable data.
|
||||
Validate input console variable data.
|
||||
|
||||
If found the device path is not a valid device path, remove the variable.
|
||||
|
||||
|
||||
@param VariableName Input console variable name.
|
||||
|
||||
**/
|
||||
@@ -505,7 +505,7 @@ BdsFormalizeConsoleVariable (
|
||||
EFI_STATUS Status;
|
||||
|
||||
GetEfiGlobalVariable2 (VariableName, (VOID **) &DevicePath, &VariableSize);
|
||||
if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) {
|
||||
if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) {
|
||||
Status = gRT->SetVariable (
|
||||
VariableName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
@@ -525,17 +525,17 @@ BdsFormalizeConsoleVariable (
|
||||
}
|
||||
|
||||
/**
|
||||
Formalize OsIndication related variables.
|
||||
|
||||
For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps
|
||||
Formalize OsIndication related variables.
|
||||
|
||||
For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps
|
||||
Delete OsIndications variable if it is not NV/BS/RT UINT64.
|
||||
|
||||
|
||||
Item 3 is used to solve case when OS corrupts OsIndications. Here simply delete this NV variable.
|
||||
|
||||
Create a boot option for BootManagerMenu if it hasn't been created yet
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
BdsFormalizeOSIndicationVariable (
|
||||
VOID
|
||||
)
|
||||
@@ -613,10 +613,10 @@ BdsFormalizeOSIndicationVariable (
|
||||
|
||||
/**
|
||||
|
||||
Validate variables.
|
||||
Validate variables.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
BdsFormalizeEfiGlobalVariable (
|
||||
VOID
|
||||
)
|
||||
@@ -884,7 +884,7 @@ BdsEntry (
|
||||
// Possible things that can be done in PlatformBootManagerBeforeConsole:
|
||||
// > Update console variable: 1. include hot-plug devices; 2. Clear ConIn and add SOL for AMT
|
||||
// > Register new Driver#### or Boot####
|
||||
// > Register new Key####: e.g.: F12
|
||||
// > Register new Key####: e.g.: F12
|
||||
// > Signal ReadyToLock event
|
||||
// > Authentication action: 1. connect Auth devices; 2. Identify auto logon user.
|
||||
//
|
||||
@@ -929,7 +929,7 @@ BdsEntry (
|
||||
// > Connect certain devices
|
||||
// > Dispatch aditional option roms
|
||||
// > Special boot: e.g.: USB boot, enter UI
|
||||
//
|
||||
//
|
||||
PERF_INMODULE_BEGIN("PlatformBootManagerAfterConsole");
|
||||
PlatformBootManagerAfterConsole ();
|
||||
PERF_INMODULE_END("PlatformBootManagerAfterConsole");
|
||||
@@ -981,7 +981,7 @@ BdsEntry (
|
||||
PlatformRecovery = (BOOLEAN) ((OsIndication & EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY) != 0);
|
||||
//
|
||||
// Clear EFI_OS_INDICATIONS_BOOT_TO_FW_UI to acknowledge OS
|
||||
//
|
||||
//
|
||||
if (BootFwUi || PlatformRecovery) {
|
||||
OsIndication &= ~((UINT64) (EFI_OS_INDICATIONS_BOOT_TO_FW_UI | EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY));
|
||||
Status = gRT->SetVariable (
|
||||
@@ -1059,7 +1059,7 @@ BdsEntry (
|
||||
if (!EFI_ERROR (Status)) {
|
||||
EfiBootManagerBoot (&LoadOption);
|
||||
EfiBootManagerFreeLoadOption (&LoadOption);
|
||||
if ((LoadOption.Status == EFI_SUCCESS) &&
|
||||
if ((LoadOption.Status == EFI_SUCCESS) &&
|
||||
(BootManagerMenuStatus != EFI_NOT_FOUND) &&
|
||||
(LoadOption.OptionNumber != BootManagerMenu.OptionNumber)) {
|
||||
//
|
||||
@@ -1107,14 +1107,14 @@ BdsEntry (
|
||||
then EFI_INVALID_PARAMETER is returned.
|
||||
@param VendorGuid A unique identifier for the vendor.
|
||||
@param Attributes Attributes bitmask to set for the variable.
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero
|
||||
causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is
|
||||
set, then a SetVariable() call with a DataSize of zero will not cause any change to
|
||||
the variable value (the timestamp associated with the variable may be updated however
|
||||
even if no new data value is provided,see the description of the
|
||||
EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not
|
||||
be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).
|
||||
causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is
|
||||
set, then a SetVariable() call with a DataSize of zero will not cause any change to
|
||||
the variable value (the timestamp associated with the variable may be updated however
|
||||
even if no new data value is provided,see the description of the
|
||||
EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not
|
||||
be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).
|
||||
@param Data The contents for the variable.
|
||||
|
||||
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Set the level of support for Hardware Error Record Persistence that is
|
||||
implemented by the platform.
|
||||
|
||||
Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -28,9 +28,9 @@ InitializeHwErrRecSupport (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINT16 HardwareErrorRecordLevel;
|
||||
|
||||
|
||||
HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel);
|
||||
|
||||
|
||||
if (HardwareErrorRecordLevel != 0) {
|
||||
//
|
||||
// If level value equal 0, no need set to 0 to variable area because UEFI specification
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Language settings
|
||||
|
||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -47,7 +47,7 @@ IsLangInSupportedLangCodes(
|
||||
IN CHAR8 *SupportedLang,
|
||||
IN CHAR8 *Lang,
|
||||
IN BOOLEAN Iso639Language
|
||||
)
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
UINTN CompareLength;
|
||||
@@ -79,8 +79,8 @@ IsLangInSupportedLangCodes(
|
||||
// Determine the length of the next language code in SupportedLang
|
||||
//
|
||||
for (CompareLength = 0; SupportedLang[CompareLength] != '\0' && SupportedLang[CompareLength] != ';'; CompareLength++);
|
||||
|
||||
if ((CompareLength == LanguageLength) &&
|
||||
|
||||
if ((CompareLength == LanguageLength) &&
|
||||
(AsciiStrnCmp (Lang, SupportedLang, CompareLength) == 0)) {
|
||||
//
|
||||
// Successfully find the Lang string in SupportedLang string.
|
||||
@@ -108,7 +108,7 @@ VOID
|
||||
InitializeLangVariable (
|
||||
IN CHAR16 *LangName,
|
||||
IN CHAR8 *SupportedLang,
|
||||
IN CHAR8 *DefaultLang,
|
||||
IN CHAR8 *DefaultLang,
|
||||
IN BOOLEAN Iso639Language
|
||||
)
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This module produces Boot Manager Policy protocol.
|
||||
|
||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -139,7 +139,7 @@ ConnectNetwork (
|
||||
system will be connected using the platforms EFI Boot
|
||||
Manager policy.
|
||||
@param[in] Recursive If TRUE, then ConnectController() is called recursively
|
||||
until the entire tree of controllers below the
|
||||
until the entire tree of controllers below the
|
||||
controller specified by DevicePath have been created.
|
||||
If FALSE, then the tree of controllers is only expanded
|
||||
one level. If DevicePath is NULL then Recursive is ignored.
|
||||
@@ -147,7 +147,7 @@ ConnectNetwork (
|
||||
@retval EFI_SUCCESS The DevicePath was connected.
|
||||
@retval EFI_NOT_FOUND The DevicePath was not found.
|
||||
@retval EFI_NOT_FOUND No driver was connected to DevicePath.
|
||||
@retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device
|
||||
@retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device
|
||||
drivers on the DevicePath.
|
||||
@retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.
|
||||
**/
|
||||
@@ -188,7 +188,7 @@ BootManagerPolicyConnectDevicePath (
|
||||
Manager connect a class of devices.
|
||||
|
||||
If Class is EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID then the Boot Manager will
|
||||
use platform policy to connect consoles. Some platforms may restrict the
|
||||
use platform policy to connect consoles. Some platforms may restrict the
|
||||
number of consoles connected as they attempt to fast boot, and calling
|
||||
ConnectDeviceClass() with a Class value of EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID
|
||||
must connect the set of consoles that follow the Boot Manager platform policy,
|
||||
@@ -206,7 +206,7 @@ BootManagerPolicyConnectDevicePath (
|
||||
application that called ConnectDeviceClass() may need to use the published
|
||||
protocols to establish the network connection. The Boot Manager can optionally
|
||||
have a policy to establish a network connection.
|
||||
|
||||
|
||||
If Class is EFI_BOOT_MANAGER_POLICY_CONNECT_ALL_GUID then the Boot Manager
|
||||
will connect all UEFI drivers using the UEFI Boot Service
|
||||
EFI_BOOT_SERVICES.ConnectController(). If the Boot Manager has policy
|
||||
@@ -223,7 +223,7 @@ BootManagerPolicyConnectDevicePath (
|
||||
@retval EFI_DEVICE_ERROR Devices were not connected due to an error.
|
||||
@retval EFI_NOT_FOUND The Class is not supported by the platform.
|
||||
@retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.
|
||||
**/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BootManagerPolicyConnectDeviceClass (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This module produces Boot Manager Policy protocol.
|
||||
#
|
||||
# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -18,7 +18,7 @@
|
||||
MODULE_UNI_FILE = BootManagerPolicyDxe.uni
|
||||
FILE_GUID = E622443C-284E-4b47-A984-FD66B482DAC0
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = BootManagerPolicyInitialize
|
||||
|
||||
#
|
||||
|
@@ -1,12 +1,12 @@
|
||||
// /** @file
|
||||
// This module produces Boot Manager Policy protocol.
|
||||
//
|
||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// This module produces Boot Manager Policy protocol.
|
||||
//
|
||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Boot Manager Policy DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -40,7 +40,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <IndustryStandard/PeImage.h>
|
||||
#include "Common/CommonHeader.h"
|
||||
|
||||
#ifdef MDE_CPU_IA32
|
||||
#ifdef MDE_CPU_IA32
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
@@ -79,7 +79,7 @@ typedef union {
|
||||
UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
|
||||
UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
|
||||
UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page
|
||||
UINT64 MustBe1:1; // Must be 1
|
||||
UINT64 MustBe1:1; // Must be 1
|
||||
UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write
|
||||
UINT64 Available:3; // Available for use by system software
|
||||
UINT64 PAT:1; //
|
||||
@@ -103,7 +103,7 @@ typedef union {
|
||||
UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
|
||||
UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
|
||||
UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page
|
||||
UINT64 MustBe1:1; // Must be 1
|
||||
UINT64 MustBe1:1; // Must be 1
|
||||
UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write
|
||||
UINT64 Available:3; // Available for use by system software
|
||||
UINT64 PAT:1; //
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# This external input must be validated carefully to avoid security issue like
|
||||
# buffer overflow, integer overflow.
|
||||
#
|
||||
# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
@@ -39,7 +39,7 @@
|
||||
[Sources]
|
||||
UefiCapsule.c
|
||||
Capsule.h
|
||||
Common/CapsuleCoalesce.c
|
||||
Common/CapsuleCoalesce.c
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
@@ -70,8 +70,8 @@
|
||||
[Ppis]
|
||||
gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
|
||||
gEfiPeiCapsulePpiGuid ## PRODUCES
|
||||
|
||||
[Ppis.IA32]
|
||||
|
||||
[Ppis.IA32]
|
||||
gEfiPeiLoadFilePpiGuid ## SOMETIMES_CONSUMES
|
||||
|
||||
[Pcd.IA32]
|
||||
|
@@ -6,14 +6,14 @@
|
||||
// This external input must be validated carefully to avoid security issue like
|
||||
// buffer overflow, integer overflow.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions
|
||||
// of the BSD License which accompanies this distribution. The
|
||||
// full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// CapsulePei Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions
|
||||
@@ -14,8 +14,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Firmware Update PEI Module"
|
||||
|
||||
|
||||
|
@@ -3,20 +3,20 @@
|
||||
//
|
||||
// The X64 entrypoint to process capsule in long mode.
|
||||
// This module is built as X64.
|
||||
//
|
||||
//
|
||||
// Caution: This module requires additional review when modified.
|
||||
// This driver will have external input - capsule image.
|
||||
// This external input must be validated carefully to avoid security issue like
|
||||
// buffer overflow, integer overflow.
|
||||
//
|
||||
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions
|
||||
// of the BSD License which accompanies this distribution. The
|
||||
// full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// CapsuleX64 Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions
|
||||
@@ -14,8 +14,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Firmware Update PEI Module over 4GB"
|
||||
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
into memory.
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -45,7 +45,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@param MemSize The size of the block of memory pointed to by MemBase
|
||||
@param DataSize How big a free block we want to find
|
||||
|
||||
@return A pointer to a memory block of at least DataSize that lies somewhere
|
||||
@return A pointer to a memory block of at least DataSize that lies somewhere
|
||||
between MemBase and (MemBase + MemSize). The memory pointed to does not
|
||||
contain any of the capsule block descriptors or capsule blocks pointed to
|
||||
by the BlockList.
|
||||
@@ -75,7 +75,7 @@ FindFreeMem (
|
||||
@param MemSize size of the system memory pointed to by MemBase
|
||||
|
||||
@retval NULL could not relocate the descriptors
|
||||
@retval Pointer to the base of the successfully-relocated block descriptors.
|
||||
@retval Pointer to the base of the successfully-relocated block descriptors.
|
||||
|
||||
**/
|
||||
EFI_CAPSULE_BLOCK_DESCRIPTOR *
|
||||
@@ -93,7 +93,7 @@ RelocateBlockDescriptors (
|
||||
@param CapsuleHeader The pointer to EFI_CAPSULE_HEADER
|
||||
|
||||
@retval FALSE Capsule is OK
|
||||
@retval TRUE Capsule is corrupted
|
||||
@retval TRUE Capsule is corrupted
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
@@ -153,7 +153,7 @@ GetCapsuleInfo (
|
||||
@param MemSize The size of the block of memory pointed to by MemBase
|
||||
@param DataSize How big a free block we want to find
|
||||
|
||||
@return A pointer to a memory block of at least DataSize that lies somewhere
|
||||
@return A pointer to a memory block of at least DataSize that lies somewhere
|
||||
between MemBase and (MemBase + MemSize). The memory pointed to does not
|
||||
contain any of the capsule block descriptors or capsule blocks pointed to
|
||||
by the BlockList.
|
||||
@@ -321,7 +321,7 @@ ValidateCapsuleIntegrity (
|
||||
// * The first capsule header flag
|
||||
// * The first capsule header HeaderSize
|
||||
// * Below check will be done in ValidateCapsuleByMemoryResource()
|
||||
// Length > MAX_ADDRESS
|
||||
// Length > MAX_ADDRESS
|
||||
// Ptr + sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR) > MAX_ADDRESS
|
||||
// DataBlock + Length > MAX_ADDRESS
|
||||
//
|
||||
@@ -450,7 +450,7 @@ ValidateCapsuleIntegrity (
|
||||
@param MemSize size of the system memory pointed to by MemBase
|
||||
|
||||
@retval NULL could not relocate the descriptors
|
||||
@retval Pointer to the base of the successfully-relocated block descriptors.
|
||||
@retval Pointer to the base of the successfully-relocated block descriptors.
|
||||
|
||||
**/
|
||||
EFI_CAPSULE_BLOCK_DESCRIPTOR *
|
||||
@@ -737,7 +737,7 @@ GetCapsuleInfo (
|
||||
@param CapsuleHeader The pointer to EFI_CAPSULE_HEADER
|
||||
|
||||
@retval FALSE Capsule is OK
|
||||
@retval TRUE Capsule is corrupted
|
||||
@retval TRUE Capsule is corrupted
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
@@ -769,7 +769,7 @@ IsCapsuleCorrupted (
|
||||
capsule gets coalesced. This can be useful in narrowing down
|
||||
where capsule data corruption occurs.
|
||||
|
||||
The test pattern mode fills in memory with a counting UINT32 value.
|
||||
The test pattern mode fills in memory with a counting UINT32 value.
|
||||
If the capsule is not divided up in a multiple of 4-byte blocks, then
|
||||
things get messy doing the check. Therefore there are some cases
|
||||
here where we just give up and skip the pre-coalesce check.
|
||||
@@ -865,7 +865,7 @@ EFI_STATUS
|
||||
BuildCapsuleDescriptors (
|
||||
IN EFI_PHYSICAL_ADDRESS *BlockListBuffer,
|
||||
IN MEMORY_RESOURCE_DESCRIPTOR *MemoryResource,
|
||||
OUT EFI_CAPSULE_BLOCK_DESCRIPTOR **BlockDescriptorList
|
||||
OUT EFI_CAPSULE_BLOCK_DESCRIPTOR **BlockDescriptorList
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
@@ -908,7 +908,7 @@ BuildCapsuleDescriptors (
|
||||
}
|
||||
Index ++;
|
||||
}
|
||||
|
||||
|
||||
if (HeadBlock != NULL) {
|
||||
*BlockDescriptorList = HeadBlock;
|
||||
return EFI_SUCCESS;
|
||||
@@ -930,7 +930,7 @@ BuildCapsuleDescriptors (
|
||||
| ------------------------- | |
|
||||
| | Capsule [0] | | |
|
||||
| ------------------------- | |
|
||||
| Capsule Image | |
|
||||
| Capsule Image | |
|
||||
CapsuleImageBase-->+---------------------------+
|
||||
| ------------------------- | |
|
||||
| | CapsuleOffset[Num-1] | | |
|
||||
@@ -1004,9 +1004,9 @@ CapsuleDataCoalesce (
|
||||
UINT8 *DestPtr;
|
||||
UINTN DestLength;
|
||||
UINT8 *RelocPtr;
|
||||
UINTN CapsuleTimes;
|
||||
UINT64 SizeLeft;
|
||||
UINT64 CapsuleImageSize;
|
||||
UINTN CapsuleTimes;
|
||||
UINT64 SizeLeft;
|
||||
UINT64 CapsuleImageSize;
|
||||
UINTN CapsuleSize;
|
||||
UINTN CapsuleNumber;
|
||||
UINTN DescriptorsSize;
|
||||
@@ -1265,7 +1265,7 @@ CapsuleDataCoalesce (
|
||||
//
|
||||
//Here is the end of the current capsule image.
|
||||
//
|
||||
CapsuleBeginFlag = TRUE;
|
||||
CapsuleBeginFlag = TRUE;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Capsule update PEIM for UEFI2.0
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -133,7 +133,7 @@ Create4GPageTables (
|
||||
IN EFI_PHYSICAL_ADDRESS PageTablesAddress,
|
||||
IN BOOLEAN Page1GSupport
|
||||
)
|
||||
{
|
||||
{
|
||||
UINT8 PhysicalAddressBits;
|
||||
EFI_PHYSICAL_ADDRESS PageAddress;
|
||||
UINTN IndexOfPml4Entries;
|
||||
@@ -172,7 +172,7 @@ Create4GPageTables (
|
||||
}
|
||||
|
||||
//
|
||||
// Pre-allocate big pages to avoid later allocations.
|
||||
// Pre-allocate big pages to avoid later allocations.
|
||||
//
|
||||
BigPageAddress = (UINTN) PageTablesAddress;
|
||||
|
||||
@@ -201,7 +201,7 @@ Create4GPageTables (
|
||||
|
||||
if (Page1GSupport) {
|
||||
PageDirectory1GEntry = (VOID *) PageDirectoryPointerEntry;
|
||||
|
||||
|
||||
for (IndexOfPageDirectoryEntries = 0; IndexOfPageDirectoryEntries < 512; IndexOfPageDirectoryEntries++, PageDirectory1GEntry++, PageAddress += SIZE_1GB) {
|
||||
//
|
||||
// Fill in the Page Directory entries
|
||||
@@ -216,7 +216,7 @@ Create4GPageTables (
|
||||
//
|
||||
// Each Directory Pointer entries points to a page of Page Directory entires.
|
||||
// So allocate space for them and fill them in in the IndexOfPageDirectoryEntries loop.
|
||||
//
|
||||
//
|
||||
PageDirectoryEntry = (VOID *) BigPageAddress;
|
||||
BigPageAddress += SIZE_4KB;
|
||||
|
||||
@@ -360,7 +360,7 @@ Thunk32To64 (
|
||||
if ((UINTN) ReturnContext->ReturnStatus != 0) {
|
||||
Status = ENCODE_ERROR ((UINTN) ReturnContext->ReturnStatus);
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ ModeSwitch (
|
||||
|
||||
ZeroMem (&Context, sizeof (SWITCH_32_TO_64_CONTEXT));
|
||||
ZeroMem (&ReturnContext, sizeof (SWITCH_64_TO_32_CONTEXT));
|
||||
|
||||
|
||||
MemoryBase64 = (UINT64) (UINTN) *MemoryBase;
|
||||
MemorySize64 = (UINT64) (UINTN) *MemorySize;
|
||||
MemoryEnd64 = MemoryBase64 + MemorySize64;
|
||||
@@ -409,7 +409,7 @@ ModeSwitch (
|
||||
Page1GSupport = IsPage1GSupport ();
|
||||
|
||||
//
|
||||
// Merge memory range reserved for stack and page table
|
||||
// Merge memory range reserved for stack and page table
|
||||
//
|
||||
if (LongModeBuffer->StackBaseAddress < LongModeBuffer->PageTableAddress) {
|
||||
ReservedRangeBase = LongModeBuffer->StackBaseAddress;
|
||||
@@ -462,14 +462,14 @@ ModeSwitch (
|
||||
// Will save the return status of processing capsule
|
||||
//
|
||||
ReturnContext.ReturnStatus = 0;
|
||||
|
||||
|
||||
//
|
||||
// Save original GDT
|
||||
//
|
||||
AsmReadGdtr ((IA32_DESCRIPTOR *)&ReturnContext.Gdtr);
|
||||
|
||||
|
||||
Status = Thunk32To64 (LongModeBuffer->PageTableAddress, &Context, &ReturnContext);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
*MemoryBase = (VOID *) (UINTN) MemoryBase64;
|
||||
*MemorySize = (UINTN) MemorySize64;
|
||||
@@ -685,7 +685,7 @@ MergeMemoryResourceDescriptor (
|
||||
if (NewMemoryResourceEntry != MemoryResourceEntry) {
|
||||
NewMemoryResourceEntry->ResourceLength += NextMemoryResourceEntry->ResourceLength;
|
||||
}
|
||||
|
||||
|
||||
NextMemoryResourceEntry = NextMemoryResourceEntry + 1;
|
||||
}
|
||||
|
||||
@@ -743,7 +743,7 @@ BuildMemoryResourceDescriptor (
|
||||
Status = PeiServicesAllocatePool ((1 + 1) * sizeof (MEMORY_RESOURCE_DESCRIPTOR), (VOID **) &MemoryResource);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ZeroMem (MemoryResource, (1 + 1) * sizeof (MEMORY_RESOURCE_DESCRIPTOR));
|
||||
|
||||
|
||||
MemoryResource[0].PhysicalStart = 0;
|
||||
MemoryResource[0].ResourceLength = LShiftU64 (1, GetPhysicalAddressBits ());
|
||||
DEBUG ((EFI_D_INFO, "MemoryResource[0x0] - Start(0x%0lx) Length(0x%0lx)\n",
|
||||
@@ -828,7 +828,7 @@ GetCapsuleDescriptors (
|
||||
CapsuleVarName[0] = 0;
|
||||
ValidIndex = 0;
|
||||
CapsuleDataPtr64 = 0;
|
||||
|
||||
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEfiPeiReadOnlyVariable2PpiGuid,
|
||||
0,
|
||||
@@ -885,7 +885,7 @@ GetCapsuleDescriptors (
|
||||
if (EFI_ERROR (Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If this BlockList has been linked before, skip this variable
|
||||
//
|
||||
@@ -901,7 +901,7 @@ GetCapsuleDescriptors (
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Cache BlockList which has been processed
|
||||
//
|
||||
@@ -909,7 +909,7 @@ GetCapsuleDescriptors (
|
||||
Index ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -949,7 +949,7 @@ CapsuleCoalesce (
|
||||
UINTN VariableCount;
|
||||
CHAR16 CapsuleVarName[30];
|
||||
CHAR16 *TempVarName;
|
||||
EFI_PHYSICAL_ADDRESS CapsuleDataPtr64;
|
||||
EFI_PHYSICAL_ADDRESS CapsuleDataPtr64;
|
||||
EFI_STATUS Status;
|
||||
EFI_BOOT_MODE BootMode;
|
||||
EFI_PEI_READ_ONLY_VARIABLE2_PPI *PPIVariableServices;
|
||||
@@ -973,11 +973,11 @@ CapsuleCoalesce (
|
||||
//
|
||||
Status = PeiServicesGetBootMode (&BootMode);
|
||||
if (EFI_ERROR (Status) || (BootMode != BOOT_ON_FLASH_UPDATE)) {
|
||||
DEBUG ((EFI_D_ERROR, "Boot mode is not correct for capsule update path.\n"));
|
||||
DEBUG ((EFI_D_ERROR, "Boot mode is not correct for capsule update path.\n"));
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// User may set the same ScatterGatherList with several different variables,
|
||||
// so cache all ScatterGatherList for check later.
|
||||
@@ -1022,9 +1022,9 @@ CapsuleCoalesce (
|
||||
VariableCount++;
|
||||
Index++;
|
||||
}
|
||||
|
||||
|
||||
DEBUG ((EFI_D_INFO,"Capsule variable count = %d\n", VariableCount));
|
||||
|
||||
|
||||
//
|
||||
// The last entry is the end flag.
|
||||
//
|
||||
@@ -1037,9 +1037,9 @@ CapsuleCoalesce (
|
||||
DEBUG ((EFI_D_ERROR, "AllocatePages Failed!, Status = %x\n", Status));
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
ZeroMem (VariableArrayAddress, (VariableCount + 1) * sizeof (EFI_PHYSICAL_ADDRESS));
|
||||
|
||||
|
||||
//
|
||||
// Find out if we actually have a capsule.
|
||||
// GetCapsuleDescriptors depends on variable PPI, so it should run in 32-bit environment.
|
||||
@@ -1068,7 +1068,7 @@ CapsuleCoalesce (
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
Status = FindCapsuleCoalesceImage (&CoalesceImageEntryPoint, &CoalesceImageMachineType);
|
||||
if ((EFI_ERROR (Status)) || (CoalesceImageMachineType != EFI_IMAGE_MACHINE_X64)) {
|
||||
DEBUG ((EFI_D_ERROR, "Fail to find CapsuleX64 module in FV!\n"));
|
||||
@@ -1090,13 +1090,13 @@ CapsuleCoalesce (
|
||||
//
|
||||
Status = CapsuleDataCoalesce (PeiServices, (EFI_PHYSICAL_ADDRESS *)(UINTN)VariableArrayAddress, MemoryResource, MemoryBase, MemorySize);
|
||||
#endif
|
||||
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Capsule Coalesce Status = %r!\n", Status));
|
||||
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
DEBUG ((EFI_D_ERROR, "There is not enough memory to process capsule!\n"));
|
||||
}
|
||||
|
||||
|
||||
if (Status == EFI_NOT_FOUND) {
|
||||
DEBUG ((EFI_D_ERROR, "Fail to parse capsule descriptor in memory!\n"));
|
||||
REPORT_STATUS_CODE (
|
||||
@@ -1129,9 +1129,9 @@ CheckCapsuleUpdate (
|
||||
return Status;
|
||||
}
|
||||
/**
|
||||
This function will look at a capsule and determine if it's a test pattern.
|
||||
This function will look at a capsule and determine if it's a test pattern.
|
||||
If it is, then it will verify it and emit an error message if corruption is detected.
|
||||
|
||||
|
||||
@param PeiServices Standard pei services pointer
|
||||
@param CapsuleBase Base address of coalesced capsule, which is preceeded
|
||||
by private data. Very implementation specific.
|
||||
@@ -1220,7 +1220,7 @@ CreateState (
|
||||
UINT32 Index;
|
||||
EFI_PHYSICAL_ADDRESS BaseAddress;
|
||||
UINT64 Length;
|
||||
|
||||
|
||||
PrivateData = (EFI_CAPSULE_PEIM_PRIVATE_DATA *) CapsuleBase;
|
||||
if (PrivateData->Signature != EFI_CAPSULE_PEIM_PRIVATE_DATA_SIGNATURE) {
|
||||
return EFI_VOLUME_CORRUPTED;
|
||||
@@ -1276,7 +1276,7 @@ CreateState (
|
||||
|
||||
BuildCvHob (BaseAddress, Length);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The X64 entrypoint is used to process capsule in long mode.
|
||||
|
||||
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -165,7 +165,7 @@ PageFaultHandler (
|
||||
//
|
||||
// Get the IDT Descriptor.
|
||||
//
|
||||
AsmReadIdtr ((IA32_DESCRIPTOR *) &Idtr);
|
||||
AsmReadIdtr ((IA32_DESCRIPTOR *) &Idtr);
|
||||
//
|
||||
// Then get page fault context by IDT Descriptor.
|
||||
//
|
||||
@@ -233,7 +233,7 @@ _ModuleEntryPoint (
|
||||
//
|
||||
// Save the IA32 IDT Descriptor
|
||||
//
|
||||
AsmReadIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr);
|
||||
AsmReadIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr);
|
||||
|
||||
//
|
||||
// Setup X64 IDT table
|
||||
@@ -241,7 +241,7 @@ _ModuleEntryPoint (
|
||||
ZeroMem (PageFaultIdtTable.IdtEntryTable, sizeof (IA32_IDT_GATE_DESCRIPTOR) * EXCEPTION_VECTOR_NUMBER);
|
||||
X64Idtr.Base = (UINTN) PageFaultIdtTable.IdtEntryTable;
|
||||
X64Idtr.Limit = (UINT16) (sizeof (IA32_IDT_GATE_DESCRIPTOR) * EXCEPTION_VECTOR_NUMBER - 1);
|
||||
AsmWriteIdtr ((IA32_DESCRIPTOR *) &X64Idtr);
|
||||
AsmWriteIdtr ((IA32_DESCRIPTOR *) &X64Idtr);
|
||||
|
||||
//
|
||||
// Setup the default CPU exception handlers
|
||||
@@ -272,7 +272,7 @@ _ModuleEntryPoint (
|
||||
(VOID **) (UINTN) EntrypointContext->MemoryBase64Ptr,
|
||||
(UINTN *) (UINTN) EntrypointContext->MemorySize64Ptr
|
||||
);
|
||||
|
||||
|
||||
ReturnContext->ReturnStatus = Status;
|
||||
|
||||
DEBUG ((
|
||||
@@ -290,8 +290,8 @@ _ModuleEntryPoint (
|
||||
//
|
||||
// Restore IA32 IDT table
|
||||
//
|
||||
AsmWriteIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr);
|
||||
|
||||
AsmWriteIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr);
|
||||
|
||||
//
|
||||
// Finish to coalesce capsule, and return to 32-bit mode.
|
||||
//
|
||||
@@ -301,8 +301,8 @@ _ModuleEntryPoint (
|
||||
(UINT32) (UINTN) EntrypointContext,
|
||||
(UINT32) (UINTN) ReturnContext,
|
||||
(UINT32) (EntrypointContext->StackBufferBase + EntrypointContext->StackBufferLength)
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
//
|
||||
// Should never be here.
|
||||
//
|
||||
|
@@ -1,18 +1,18 @@
|
||||
## @file
|
||||
# Capsule Runtime Driver produces two UEFI capsule runtime services: (UpdateCapsule, QueryCapsuleCapabilities).
|
||||
#
|
||||
# It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
# It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
# the capsule runtime services are ready.
|
||||
#
|
||||
# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
// the capsule runtime services are ready.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// CapsuleRuntimeDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Runtime Firmware Update DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
Capsule Runtime Driver produces two UEFI capsule runtime services.
|
||||
(UpdateCapsule, QueryCapsuleCapabilities)
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
the capsule runtime services are ready.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -54,10 +54,10 @@ UINT32 mMaxSizeNonPopulateCapsule = 0;
|
||||
@retval EFI_INVALID_PARAMETER CapsuleCount is Zero.
|
||||
@retval EFI_INVALID_PARAMETER For across reset capsule image, ScatterGatherList is NULL.
|
||||
@retval EFI_UNSUPPORTED CapsuleImage is not recognized by the firmware.
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
|
||||
is compatible with this platform but is not capable of being submitted or processed
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
|
||||
is compatible with this platform but is not capable of being submitted or processed
|
||||
in runtime. The caller may resubmit the capsule prior to ExitBootServices().
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
|
||||
the capsule is compatible with this platform but there are insufficient resources to process.
|
||||
|
||||
**/
|
||||
@@ -75,8 +75,8 @@ UpdateCapsule (
|
||||
BOOLEAN NeedReset;
|
||||
BOOLEAN InitiateReset;
|
||||
CHAR16 CapsuleVarName[30];
|
||||
CHAR16 *TempVarName;
|
||||
|
||||
CHAR16 *TempVarName;
|
||||
|
||||
//
|
||||
// Capsule Count can't be less than one.
|
||||
//
|
||||
@@ -107,7 +107,7 @@ UpdateCapsule (
|
||||
}
|
||||
|
||||
//
|
||||
// Check FMP capsule flag
|
||||
// Check FMP capsule flag
|
||||
//
|
||||
if (CompareGuid(&CapsuleHeader->CapsuleGuid, &gEfiFmpCapsuleGuid)
|
||||
&& (CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0 ) {
|
||||
@@ -115,7 +115,7 @@ UpdateCapsule (
|
||||
}
|
||||
|
||||
//
|
||||
// Check Capsule image without populate flag by firmware support capsule function
|
||||
// Check Capsule image without populate flag by firmware support capsule function
|
||||
//
|
||||
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
|
||||
Status = SupportCapsuleImage (CapsuleHeader);
|
||||
@@ -136,7 +136,7 @@ UpdateCapsule (
|
||||
// Platform specific update for the non-reset capsule image.
|
||||
//
|
||||
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET) == 0) {
|
||||
if (EfiAtRuntime ()) {
|
||||
if (EfiAtRuntime ()) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
Status = ProcessCapsuleImage(CapsuleHeader);
|
||||
@@ -151,7 +151,7 @@ UpdateCapsule (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// After launching all capsules who has no reset flag, if no more capsules claims
|
||||
// for a system reset just return.
|
||||
@@ -162,7 +162,7 @@ UpdateCapsule (
|
||||
|
||||
//
|
||||
// ScatterGatherList is only referenced if the capsules are defined to persist across
|
||||
// system reset.
|
||||
// system reset.
|
||||
//
|
||||
if (ScatterGatherList == (EFI_PHYSICAL_ADDRESS) (UINTN) NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@@ -195,7 +195,7 @@ UpdateCapsule (
|
||||
|
||||
//
|
||||
// ScatterGatherList is only referenced if the capsules are defined to persist across
|
||||
// system reset. Set its value into NV storage to let pre-boot driver to pick it up
|
||||
// system reset. Set its value into NV storage to let pre-boot driver to pick it up
|
||||
// after coming through a system reset.
|
||||
//
|
||||
Status = EfiSetVariable (
|
||||
@@ -213,7 +213,7 @@ UpdateCapsule (
|
||||
if(InitiateReset) {
|
||||
//
|
||||
// Firmware that encounters a capsule which has the CAPSULE_FLAGS_INITIATE_RESET Flag set in its header
|
||||
// will initiate a reset of the platform which is compatible with the passed-in capsule request and will
|
||||
// will initiate a reset of the platform which is compatible with the passed-in capsule request and will
|
||||
// not return back to the caller.
|
||||
//
|
||||
EfiResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
@@ -261,7 +261,7 @@ QueryCapsuleCapabilities (
|
||||
if (CapsuleCount < 1) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Check whether input parameter is valid
|
||||
//
|
||||
@@ -290,7 +290,7 @@ QueryCapsuleCapabilities (
|
||||
}
|
||||
|
||||
//
|
||||
// Check FMP capsule flag
|
||||
// Check FMP capsule flag
|
||||
//
|
||||
if (CompareGuid(&CapsuleHeader->CapsuleGuid, &gEfiFmpCapsuleGuid)
|
||||
&& (CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0 ) {
|
||||
@@ -309,7 +309,7 @@ QueryCapsuleCapabilities (
|
||||
}
|
||||
|
||||
//
|
||||
// Find out whether there is any capsule defined to persist across system reset.
|
||||
// Find out whether there is any capsule defined to persist across system reset.
|
||||
//
|
||||
for (ArrayNumber = 0; ArrayNumber < CapsuleCount ; ArrayNumber++) {
|
||||
CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
|
||||
@@ -344,10 +344,10 @@ QueryCapsuleCapabilities (
|
||||
|
||||
This code installs UEFI capsule runtime service.
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCCESS UEFI Capsule Runtime Services are installed successfully.
|
||||
@retval EFI_SUCCESS UEFI Capsule Runtime Services are installed successfully.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -363,14 +363,14 @@ CapsuleServiceInitialize (
|
||||
mMaxSizeNonPopulateCapsule = PcdGet32(PcdMaxSizeNonPopulateCapsule);
|
||||
|
||||
//
|
||||
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are
|
||||
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are
|
||||
// put above 4GB, so capsule PEI will transfer to long mode to get capsule data.
|
||||
// The page table and stack is used to transfer processor mode from IA32 to long mode.
|
||||
// Create the base address of page table and stack, and save them into variable.
|
||||
// This is not needed when capsule with reset type is not supported.
|
||||
//
|
||||
SaveLongModeContext ();
|
||||
|
||||
|
||||
//
|
||||
// Install capsule runtime services into UEFI runtime service tables.
|
||||
//
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
Capsule Runtime Driver produces two UEFI capsule runtime services.
|
||||
(UpdateCapsule, QueryCapsuleCapabilities)
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
the capsule runtime services are ready.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials are licensed and made available
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Create the variable to save the base address of page table and stack
|
||||
for transferring into long mode in IA32 capsule PEI.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -42,7 +42,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This function allocates EfiReservedMemoryType below 4G memory address.
|
||||
|
||||
@param Size Size of memory to allocate.
|
||||
|
||||
|
||||
@return Allocated Address for output.
|
||||
|
||||
**/
|
||||
@@ -164,14 +164,14 @@ PrepareContextForCapsulePei (
|
||||
|
||||
LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
|
||||
ASSERT (LongModeBuffer.PageTableAddress != 0);
|
||||
|
||||
|
||||
//
|
||||
// Allocate stack
|
||||
//
|
||||
LongModeBuffer.StackSize = PcdGet32 (PcdCapsulePeiLongModeStackSize);
|
||||
LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize));
|
||||
ASSERT (LongModeBuffer.StackBaseAddress != 0);
|
||||
|
||||
ASSERT (LongModeBuffer.StackBaseAddress != 0);
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
EFI_CAPSULE_LONG_MODE_BUFFER_NAME,
|
||||
&gEfiCapsuleVendorGuid,
|
||||
@@ -190,7 +190,7 @@ PrepareContextForCapsulePei (
|
||||
VariableLockCapsuleLongModeBufferVariable,
|
||||
NULL,
|
||||
&Registration
|
||||
);
|
||||
);
|
||||
} else {
|
||||
DEBUG ((EFI_D_ERROR, "FATAL ERROR: CapsuleLongModeBuffer cannot be saved: %r. Capsule in PEI may fail!\n", Status));
|
||||
gBS->FreePages (LongModeBuffer.StackBaseAddress, EFI_SIZE_TO_PAGES (LongModeBuffer.StackSize));
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Console Platform DXE Driver, install Console Device Guids and update Console
|
||||
Environment Variables.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -80,7 +80,7 @@ InitializeConPlatform(
|
||||
|
||||
|
||||
/**
|
||||
Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle.
|
||||
Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test.
|
||||
@@ -108,7 +108,7 @@ ConPlatformTextInDriverBindingSupported (
|
||||
|
||||
|
||||
/**
|
||||
Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle.
|
||||
Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test.
|
||||
@@ -136,7 +136,7 @@ ConPlatformTextOutDriverBindingSupported (
|
||||
|
||||
|
||||
/**
|
||||
Test to see if the specified protocol is supported on ControllerHandle.
|
||||
Test to see if the specified protocol is supported on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test.
|
||||
@@ -202,9 +202,9 @@ ConPlatformDriverBindingSupported (
|
||||
Start this driver on ControllerHandle by opening Simple Text Input Protocol,
|
||||
reading Device Path, and installing Console In Devcice GUID on ControllerHandle.
|
||||
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
console environment variables ConInDev.
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
@@ -334,9 +334,9 @@ ConPlatformTextInDriverBindingStart (
|
||||
reading Device Path, and installing Console Out Devcic GUID, Standard Error
|
||||
Device GUID on ControllerHandle.
|
||||
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
console environment variables ConOutDev, ErrOutDev.
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
@@ -450,7 +450,7 @@ ConPlatformTextOutDriverBindingStart (
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// If it is not a hot-plug device, append the device path to
|
||||
// If it is not a hot-plug device, append the device path to
|
||||
// the ConOutDev and ErrOutDev environment variable.
|
||||
// For GOP device path, append the sibling device path as well.
|
||||
//
|
||||
@@ -511,7 +511,7 @@ ConPlatformTextOutDriverBindingStart (
|
||||
}
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle by removing Console In Devcice GUID
|
||||
Stop this driver on ControllerHandle by removing Console In Devcice GUID
|
||||
and closing the Simple Text Input protocol on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@@ -585,7 +585,7 @@ ConPlatformTextInDriverBindingStop (
|
||||
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle by removing Console Out Devcice GUID
|
||||
Stop this driver on ControllerHandle by removing Console Out Devcice GUID
|
||||
and closing the Simple Text Output protocol on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@@ -714,7 +714,7 @@ ConPlatformUnInstallProtocol (
|
||||
@param Name String part of EFI variable name
|
||||
|
||||
@return Dynamically allocated memory that contains a copy of the EFI variable.
|
||||
Caller is repsoncible freeing the buffer. Return NULL means Variable
|
||||
Caller is repsoncible freeing the buffer. Return NULL means Variable
|
||||
was not read.
|
||||
|
||||
**/
|
||||
@@ -922,7 +922,7 @@ ConPlatformMatchDevicePaths (
|
||||
}
|
||||
|
||||
/**
|
||||
Update console environment variables.
|
||||
Update console environment variables.
|
||||
|
||||
@param VariableName Console environment variables, ConOutDev, ConInDev
|
||||
ErrOutDev, ConIn ,ConOut or ErrOut.
|
||||
@@ -958,7 +958,7 @@ ConPlatformUpdateDeviceVariable (
|
||||
if (Operation != Delete) {
|
||||
//
|
||||
// Match specified DevicePath in Console Variable.
|
||||
//
|
||||
//
|
||||
Status = ConPlatformMatchDevicePaths (
|
||||
VariableDevicePath,
|
||||
DevicePath,
|
||||
@@ -1052,7 +1052,7 @@ IsHotPlugDevice (
|
||||
while (!IsDevicePathEnd (CheckDevicePath)) {
|
||||
//
|
||||
// Check device whether is hot plug device or not throught Device Path
|
||||
//
|
||||
//
|
||||
if ((DevicePathType (CheckDevicePath) == MESSAGING_DEVICE_PATH) &&
|
||||
(DevicePathSubType (CheckDevicePath) == MSG_USB_DP ||
|
||||
DevicePathSubType (CheckDevicePath) == MSG_USB_CLASS_DP ||
|
||||
@@ -1069,7 +1069,7 @@ IsHotPlugDevice (
|
||||
//
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
CheckDevicePath = NextDevicePathNode (CheckDevicePath);
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for Console Platfrom DXE Driver.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -56,7 +56,7 @@ typedef enum {
|
||||
} CONPLATFORM_VAR_OPERATION;
|
||||
|
||||
/**
|
||||
Test to see if specific protocol could be supported on the ControllerHandle.
|
||||
Test to see if specific protocol could be supported on the ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test.
|
||||
@@ -74,7 +74,7 @@ ConPlatformDriverBindingSupported (
|
||||
);
|
||||
|
||||
/**
|
||||
Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle.
|
||||
Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test.
|
||||
@@ -94,7 +94,7 @@ ConPlatformTextInDriverBindingSupported (
|
||||
);
|
||||
|
||||
/**
|
||||
Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle.
|
||||
Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test.
|
||||
@@ -119,9 +119,9 @@ ConPlatformTextOutDriverBindingSupported (
|
||||
Start this driver on ControllerHandle by opening Simple Text Input Protocol,
|
||||
reading Device Path, and installing Console In Devcice GUID on ControllerHandle.
|
||||
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
console environment variables ConInDev.
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
@@ -147,9 +147,9 @@ ConPlatformTextInDriverBindingStart (
|
||||
reading Device Path, and installing Console Out Devcic GUID, Standard Error
|
||||
Device GUID on ControllerHandle.
|
||||
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
If this devcie is not one hot-plug devce, append its device path into the
|
||||
console environment variables ConOutDev, StdErrDev.
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
@@ -169,7 +169,7 @@ ConPlatformTextOutDriverBindingStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle by removing Console In Devcice GUID
|
||||
Stop this driver on ControllerHandle by removing Console In Devcice GUID
|
||||
and closing the Simple Text Input protocol on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@@ -192,7 +192,7 @@ ConPlatformTextInDriverBindingStop (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle by removing Console Out Devcice GUID
|
||||
Stop this driver on ControllerHandle by removing Console Out Devcice GUID
|
||||
and closing the Simple Text Output protocol on ControllerHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@@ -236,7 +236,7 @@ ConPlatformUnInstallProtocol (
|
||||
@param Name String part of EFI variable name
|
||||
|
||||
@return Dynamically allocated memory that contains a copy of the EFI variable.
|
||||
Caller is repsoncible freeing the buffer. Return NULL means Variable
|
||||
Caller is repsoncible freeing the buffer. Return NULL means Variable
|
||||
was not read.
|
||||
|
||||
**/
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# Console Platfrom DXE Driver that specifies whether device can be used as console
|
||||
# input/output device or error output device and update global variables accordingly.
|
||||
#
|
||||
# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -96,4 +96,4 @@
|
||||
gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
ConPlatformDxeExtra.uni
|
||||
ConPlatformDxeExtra.uni
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// ConPlatformDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Console Platform DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for ConSplitter driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -225,7 +225,7 @@ ConSplitterComponentNameGetDriverName (
|
||||
This->SupportedLanguages,
|
||||
mConSplitterDriverNameTable,
|
||||
DriverName,
|
||||
(BOOLEAN)((This == &gConSplitterConInComponentName) ||
|
||||
(BOOLEAN)((This == &gConSplitterConInComponentName) ||
|
||||
(This == &gConSplitterSimplePointerComponentName) ||
|
||||
(This == &gConSplitterAbsolutePointerComponentName) ||
|
||||
(This == &gConSplitterConOutComponentName) ||
|
||||
|
@@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "ConSplitter.h"
|
||||
|
||||
//
|
||||
// Identify if ConIn is connected in PcdConInConnectOnDemand enabled mode.
|
||||
// Identify if ConIn is connected in PcdConInConnectOnDemand enabled mode.
|
||||
// default not connect
|
||||
//
|
||||
BOOLEAN mConInIsConnect = FALSE;
|
||||
@@ -567,7 +567,7 @@ ConSplitterDriverEntry(
|
||||
&mStdErr.TextOut,
|
||||
NULL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR (Status)) {
|
||||
//
|
||||
// Update the EFI System Table with new virtual console
|
||||
// and update the pointer to Text Output protocol.
|
||||
@@ -576,7 +576,7 @@ ConSplitterDriverEntry(
|
||||
gST->StdErr = &mStdErr.TextOut;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Update the CRC32 in the EFI System Table header
|
||||
//
|
||||
@@ -2298,7 +2298,7 @@ ConSplitterGrowMapTable (
|
||||
Size = Private->CurrentNumberOfConsoles * sizeof (INT32);
|
||||
Index = 0;
|
||||
SrcAddress = OldTextOutModeMap;
|
||||
NewStepSize = NewSize / sizeof(INT32);
|
||||
NewStepSize = NewSize / sizeof(INT32);
|
||||
// If Private->CurrentNumberOfConsoles is not zero and OldTextOutModeMap
|
||||
// is not NULL, it indicates that the original TextOutModeMap is not enough
|
||||
// for the new console devices and has been enlarged by CONSOLE_SPLITTER_ALLOC_UNIT columns.
|
||||
@@ -2972,7 +2972,7 @@ Done:
|
||||
//
|
||||
// Force GraphicsOutput mode to be set,
|
||||
//
|
||||
|
||||
|
||||
Mode = &Private->GraphicsOutputModeBuffer[CurrentIndex];
|
||||
if ((GraphicsOutput != NULL) &&
|
||||
(Mode->HorizontalResolution == CurrentGraphicsOutputMode->Info->HorizontalResolution) &&
|
||||
@@ -3051,7 +3051,7 @@ ConsplitterSetConsoleOutMode (
|
||||
MaxMode = (UINTN) (TextOut->Mode->MaxMode);
|
||||
|
||||
MaxModeInfo.Column = 0;
|
||||
MaxModeInfo.Row = 0;
|
||||
MaxModeInfo.Row = 0;
|
||||
ModeInfo.Column = PcdGet32 (PcdConOutColumn);
|
||||
ModeInfo.Row = PcdGet32 (PcdConOutRow);
|
||||
|
||||
@@ -3191,7 +3191,7 @@ ConSplitterTextOutAddDevice (
|
||||
|
||||
DeviceStatus = EFI_DEVICE_ERROR;
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
|
||||
|
||||
//
|
||||
// This device display mode will be added into Graphics Ouput modes.
|
||||
//
|
||||
@@ -3361,7 +3361,7 @@ ConSplitterTextOutDeleteDevice (
|
||||
Private->VirtualHandle,
|
||||
&gEfiUgaDrawProtocolGuid,
|
||||
&Private->UgaDraw
|
||||
);
|
||||
);
|
||||
} else if (!FeaturePcdGet (PcdConOutUgaSupport)) {
|
||||
Status = gBS->UninstallProtocolInterface (
|
||||
Private->VirtualHandle,
|
||||
@@ -3536,7 +3536,7 @@ ConSplitterTextInPrivateReadKeyStroke (
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
EFI_KEY_DATA KeyData;
|
||||
|
||||
|
||||
//
|
||||
// Return the first saved non-NULL key.
|
||||
//
|
||||
@@ -3616,7 +3616,7 @@ ConSplitterTextInReadKeyStroke (
|
||||
// Signal ConnectConIn event on first call in Lazy ConIn mode
|
||||
//
|
||||
if (!mConInIsConnect && PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
gBS->SignalEvent (Private->ConnectConInEvent);
|
||||
mConInIsConnect = TRUE;
|
||||
}
|
||||
@@ -3810,7 +3810,7 @@ ConSplitterTextInReadKeyStrokeEx (
|
||||
// Signal ConnectConIn event on first call in Lazy ConIn mode
|
||||
//
|
||||
if (!mConInIsConnect && PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
gBS->SignalEvent (Private->ConnectConInEvent);
|
||||
mConInIsConnect = TRUE;
|
||||
}
|
||||
@@ -3877,7 +3877,7 @@ ConSplitterTextInReadKeyStrokeEx (
|
||||
for (Index = 0; Index < Private->CurrentNumberOfKeys; Index++) {
|
||||
CopyMem (&Private->KeyQueue[Index].KeyState, &KeyState, sizeof (EFI_KEY_STATE));
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Return the first saved key.
|
||||
//
|
||||
@@ -4642,7 +4642,7 @@ ConSplitterTextOutOutputString (
|
||||
Private->TextOutMode.CursorRow = Private->TextOutList[0].TextOut->Mode->CursorRow;
|
||||
} else {
|
||||
//
|
||||
// When there is no real console devices in system,
|
||||
// When there is no real console devices in system,
|
||||
// update cursor position for the virtual device in consplitter.
|
||||
//
|
||||
Private->TextOut.QueryMode (
|
||||
@@ -4650,28 +4650,28 @@ ConSplitterTextOutOutputString (
|
||||
Private->TextOutMode.Mode,
|
||||
&MaxColumn,
|
||||
&MaxRow
|
||||
);
|
||||
);
|
||||
for (; *WString != CHAR_NULL; WString++) {
|
||||
switch (*WString) {
|
||||
case CHAR_BACKSPACE:
|
||||
if (Private->TextOutMode.CursorColumn == 0 && Private->TextOutMode.CursorRow > 0) {
|
||||
Private->TextOutMode.CursorRow--;
|
||||
Private->TextOutMode.CursorColumn = (INT32) (MaxColumn - 1);
|
||||
Private->TextOutMode.CursorColumn = (INT32) (MaxColumn - 1);
|
||||
} else if (Private->TextOutMode.CursorColumn > 0) {
|
||||
Private->TextOutMode.CursorColumn--;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case CHAR_LINEFEED:
|
||||
if (Private->TextOutMode.CursorRow < (INT32) (MaxRow - 1)) {
|
||||
Private->TextOutMode.CursorRow++;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case CHAR_CARRIAGE_RETURN:
|
||||
Private->TextOutMode.CursorColumn = 0;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
if (Private->TextOutMode.CursorColumn < (INT32) (MaxColumn - 1)) {
|
||||
Private->TextOutMode.CursorColumn++;
|
||||
|
@@ -10,7 +10,7 @@
|
||||
# Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSupport should be
|
||||
# set to TRUE.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -92,7 +92,7 @@
|
||||
## TO_START
|
||||
gEfiSimpleTextInputExProtocolGuid
|
||||
## PRODUCES
|
||||
## TO_START
|
||||
## TO_START
|
||||
gEfiSimpleTextOutProtocolGuid
|
||||
## SOMETIMES_PRODUCES
|
||||
## SOMETIMES_CONSUMES
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// ConSplitterDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Console Splitter DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Support for Graphics output spliter.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -58,7 +58,7 @@ ConSplitterGraphicsOutputQueryMode (
|
||||
Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
||||
|
||||
GraphicsOutput = NULL;
|
||||
|
||||
|
||||
if (Private->CurrentNumberOfGraphicsOutput == 1) {
|
||||
//
|
||||
// Find the only one GraphicsOutput.
|
||||
@@ -70,7 +70,7 @@ ConSplitterGraphicsOutputQueryMode (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (GraphicsOutput != NULL) {
|
||||
//
|
||||
// If only one physical GOP device exist, return its information.
|
||||
@@ -79,7 +79,7 @@ ConSplitterGraphicsOutputQueryMode (
|
||||
return Status;
|
||||
} else {
|
||||
//
|
||||
// If 2 more phyiscal GOP device exist or GOP protocol does not exist,
|
||||
// If 2 more phyiscal GOP device exist or GOP protocol does not exist,
|
||||
// return GOP information (PixelFormat is PixelBltOnly) created in ConSplitterAddGraphicsOutputMode ().
|
||||
//
|
||||
*Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
|
||||
@@ -191,7 +191,7 @@ ConSplitterGraphicsOutputSetMode (
|
||||
This->Mode->FrameBufferSize = PhysicalGraphicsOutput->Mode->FrameBufferSize;
|
||||
} else {
|
||||
//
|
||||
// If 2 more phyiscal GOP device exist or GOP protocol does not exist,
|
||||
// If 2 more phyiscal GOP device exist or GOP protocol does not exist,
|
||||
// return GOP information (PixelFormat is PixelBltOnly) created in ConSplitterAddGraphicsOutputMode ().
|
||||
//
|
||||
CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);
|
||||
@@ -273,7 +273,7 @@ ConSplitterGraphicsOutputBlt (
|
||||
if (This == NULL || ((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
||||
|
||||
ReturnStatus = EFI_SUCCESS;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This is the main routine for initializing the Graphics Console support routines.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -245,8 +245,8 @@ InitializeGraphicsConsoleTextMode (
|
||||
UINTN ValidCount;
|
||||
UINTN ValidIndex;
|
||||
UINTN MaxColumns;
|
||||
UINTN MaxRows;
|
||||
|
||||
UINTN MaxRows;
|
||||
|
||||
if ((TextModeCount == NULL) || (TextModeData == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ InitializeGraphicsConsoleTextMode (
|
||||
//
|
||||
// Mode 0 and mode 1 is for 80x25, 80x50 according to UEFI spec.
|
||||
//
|
||||
ValidCount = 0;
|
||||
ValidCount = 0;
|
||||
|
||||
NewModeBuffer[ValidCount].Columns = 80;
|
||||
NewModeBuffer[ValidCount].Rows = 25;
|
||||
@@ -295,20 +295,20 @@ InitializeGraphicsConsoleTextMode (
|
||||
NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
|
||||
NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
|
||||
NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (NewModeBuffer[ValidCount].Columns * EFI_GLYPH_WIDTH)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
ValidCount++;
|
||||
|
||||
if ((MaxColumns >= 80) && (MaxRows >= 50)) {
|
||||
NewModeBuffer[ValidCount].Columns = 80;
|
||||
NewModeBuffer[ValidCount].Rows = 50;
|
||||
NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (80 * EFI_GLYPH_WIDTH)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
}
|
||||
NewModeBuffer[ValidCount].GopWidth = HorizontalResolution;
|
||||
NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
|
||||
NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
|
||||
ValidCount++;
|
||||
|
||||
|
||||
//
|
||||
// Start from mode 2 to put the valid mode other than 80x25 and 80x50 in the output mode buffer.
|
||||
//
|
||||
@@ -340,14 +340,14 @@ InitializeGraphicsConsoleTextMode (
|
||||
ValidCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DEBUG_CODE (
|
||||
for (Index = 0; Index < ValidCount; Index++) {
|
||||
DEBUG ((EFI_D_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n",
|
||||
Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows));
|
||||
DEBUG ((EFI_D_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n",
|
||||
Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows));
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Return valid mode count and mode information buffer.
|
||||
//
|
||||
@@ -388,9 +388,9 @@ GraphicsConsoleControllerDriverStart (
|
||||
UINTN MaxMode;
|
||||
UINT32 ModeNumber;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;
|
||||
UINTN SizeOfInfo;
|
||||
UINTN SizeOfInfo;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||
|
||||
|
||||
ModeNumber = 0;
|
||||
|
||||
//
|
||||
@@ -442,9 +442,9 @@ GraphicsConsoleControllerDriverStart (
|
||||
if ((HorizontalResolution == 0x0) || (VerticalResolution == 0x0)) {
|
||||
//
|
||||
// Find the highest resolution which GOP supports.
|
||||
//
|
||||
//
|
||||
MaxMode = Private->GraphicsOutput->Mode->MaxMode;
|
||||
|
||||
|
||||
for (ModeIndex = 0; ModeIndex < MaxMode; ModeIndex++) {
|
||||
Status = Private->GraphicsOutput->QueryMode (
|
||||
Private->GraphicsOutput,
|
||||
@@ -581,7 +581,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
Status = GraphicsConsoleConOutOutputString (&Private->SimpleTextOutput, (CHAR16 *)L"Graphics Console Started\n\r");
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Error;
|
||||
}
|
||||
}
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
//
|
||||
@@ -915,7 +915,7 @@ GraphicsConsoleConOutOutputString (
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
//
|
||||
// Current mode
|
||||
@@ -1305,7 +1305,7 @@ GraphicsConsoleConOutSetMode (
|
||||
Status = EFI_UNSUPPORTED;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
ModeData = &(Private->ModeData[ModeNumber]);
|
||||
|
||||
if (ModeData->Columns <= 0 && ModeData->Rows <= 0) {
|
||||
@@ -1443,7 +1443,7 @@ GraphicsConsoleConOutSetMode (
|
||||
This->Mode->CursorColumn = 0;
|
||||
This->Mode->CursorRow = 0;
|
||||
|
||||
FlushCursor (This);
|
||||
FlushCursor (This);
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
@@ -1527,7 +1527,7 @@ GraphicsConsoleConOutClearScreen (
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground;
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
|
||||
EFI_TPL OldTpl;
|
||||
|
||||
|
||||
if (This->Mode->Mode == -1) {
|
||||
//
|
||||
// If current mode is not valid, return error.
|
||||
@@ -1876,11 +1876,11 @@ DrawUnicodeWeightAtCursorN (
|
||||
|
||||
/**
|
||||
Flush the cursor on the screen.
|
||||
|
||||
|
||||
If CursorVisible is FALSE, nothing to do and return directly.
|
||||
If CursorVisible is TRUE,
|
||||
If CursorVisible is TRUE,
|
||||
i) If the cursor shows on screen, it will be erased.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for GraphicsConsole driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -209,7 +209,7 @@ GraphicsConsoleComponentNameGetControllerName (
|
||||
|
||||
/**
|
||||
Reset the text output device hardware and optionally run diagnostics.
|
||||
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.Reset().
|
||||
If ExtendeVerification is TRUE, then perform dependent Graphics Console
|
||||
device reset, and set display mode to mode 0.
|
||||
@@ -235,7 +235,7 @@ GraphicsConsoleConOutReset (
|
||||
/**
|
||||
Write a Unicode string to the output device.
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.OutputString().
|
||||
Implements SIMPLE_TEXT_OUTPUT.OutputString().
|
||||
The Unicode string will be converted to Glyphs and will be
|
||||
sent to the Graphics Console.
|
||||
|
||||
@@ -262,7 +262,7 @@ GraphicsConsoleConOutOutputString (
|
||||
);
|
||||
|
||||
/**
|
||||
Verifies that all characters in a Unicode string can be output to the
|
||||
Verifies that all characters in a Unicode string can be output to the
|
||||
target device.
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.TestString().
|
||||
@@ -316,7 +316,7 @@ GraphicsConsoleConOutQueryMode (
|
||||
|
||||
/**
|
||||
Sets the output device(s) to a specified mode.
|
||||
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.SetMode().
|
||||
Set the Graphics Console to a specified mode. In this driver, we only support mode 0.
|
||||
|
||||
@@ -324,7 +324,7 @@ GraphicsConsoleConOutQueryMode (
|
||||
@param ModeNumber The text mode to set.
|
||||
|
||||
@retval EFI_SUCCESS The requested text mode is set.
|
||||
@retval EFI_DEVICE_ERROR The requested text mode cannot be set because of
|
||||
@retval EFI_DEVICE_ERROR The requested text mode cannot be set because of
|
||||
Graphics Console device error.
|
||||
@retval EFI_UNSUPPORTED The text mode number is not valid.
|
||||
|
||||
@@ -344,7 +344,7 @@ GraphicsConsoleConOutSetMode (
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Attribute The attribute to set. Bits 0..3 are the foreground
|
||||
color, and bits 4..6 are the background color.
|
||||
color, and bits 4..6 are the background color.
|
||||
All other bits are undefined and must be zero.
|
||||
|
||||
@retval EFI_SUCCESS The requested attribute is set.
|
||||
@@ -360,7 +360,7 @@ GraphicsConsoleConOutSetAttribute (
|
||||
);
|
||||
|
||||
/**
|
||||
Clears the output device(s) display to the currently selected background
|
||||
Clears the output device(s) display to the currently selected background
|
||||
color.
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.ClearScreen().
|
||||
@@ -451,10 +451,10 @@ GraphicsConsoleControllerDriverSupported (
|
||||
|
||||
|
||||
/**
|
||||
Start this driver on Controller by opening Graphics Output protocol or
|
||||
Start this driver on Controller by opening Graphics Output protocol or
|
||||
UGA Draw protocol, and installing Simple Text Out protocol on Controller.
|
||||
(UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Controller Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
@@ -473,10 +473,10 @@ GraphicsConsoleControllerDriverStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on Controller by removing Simple Text Out protocol
|
||||
Stop this driver on Controller by removing Simple Text Out protocol
|
||||
and closing the Graphics Output Protocol or UGA Draw protocol on Controller.
|
||||
(UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
|
||||
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Controller Handle of device to stop driver on
|
||||
@@ -485,7 +485,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
||||
|
||||
@retval EFI_SUCCESS This driver is removed Controller.
|
||||
@retval EFI_NOT_STARTED Simple Text Out protocol could not be found the
|
||||
@retval EFI_NOT_STARTED Simple Text Out protocol could not be found the
|
||||
Controller.
|
||||
@retval other This driver was not removed from this device.
|
||||
|
||||
@@ -503,9 +503,9 @@ GraphicsConsoleControllerDriverStop (
|
||||
/**
|
||||
Locate HII Database protocol and HII Font protocol.
|
||||
|
||||
@retval EFI_SUCCESS HII Database protocol and HII Font protocol
|
||||
@retval EFI_SUCCESS HII Database protocol and HII Font protocol
|
||||
are located successfully.
|
||||
@return other Failed to locate HII Database protocol or
|
||||
@return other Failed to locate HII Database protocol or
|
||||
HII Font protocol.
|
||||
|
||||
**/
|
||||
@@ -554,11 +554,11 @@ DrawUnicodeWeightAtCursorN (
|
||||
|
||||
/**
|
||||
Flush the cursor on the screen.
|
||||
|
||||
|
||||
If CursorVisible is FALSE, nothing to do and return directly.
|
||||
If CursorVisible is TRUE,
|
||||
If CursorVisible is TRUE,
|
||||
i) If the cursor shows on screen, it will be erased.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
@@ -575,17 +575,17 @@ FlushCursor (
|
||||
for the Graphics Console device based on Graphics Output Protocol.
|
||||
|
||||
If yes, set the graphic device's current mode to this specific mode.
|
||||
|
||||
|
||||
@param GraphicsOutput Graphics Output Protocol instance pointer.
|
||||
@param HorizontalResolution User defined horizontal resolution
|
||||
@param VerticalResolution User defined vertical resolution.
|
||||
@param CurrentModeNumber Current specific mode to be check.
|
||||
|
||||
@retval EFI_SUCCESS The mode is supported.
|
||||
@retval EFI_UNSUPPORTED The specific mode is out of range of graphics
|
||||
@retval EFI_UNSUPPORTED The specific mode is out of range of graphics
|
||||
device supported.
|
||||
@retval other The specific mode does not support user defined
|
||||
resolution or failed to set the current mode to the
|
||||
@retval other The specific mode does not support user defined
|
||||
resolution or failed to set the current mode to the
|
||||
specific mode on graphics device.
|
||||
|
||||
**/
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#
|
||||
# This driver will install Simple Text Output protocol by consuming Graphices Output
|
||||
# protocol or UGA Draw protocol on graphic devices.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// GraphicsConsoleDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Graphics Console DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of translation upon PC ANSI.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -47,8 +47,8 @@ AnsiRawDataToUnicode (
|
||||
or valid text graphics.
|
||||
|
||||
@param TerminalDevice The terminal device.
|
||||
@param WString The input string.
|
||||
|
||||
@param WString The input string.
|
||||
|
||||
@retval EFI_UNSUPPORTED If not all input characters are valid.
|
||||
@retval EFI_SUCCESS If all input characters are valid.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for Terminal driver.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -1090,7 +1090,7 @@ UnicodeFiFoInsertOneKey (
|
||||
|
||||
/**
|
||||
Remove one pre-fetched key out of the Unicode FIFO buffer.
|
||||
The caller should guarantee that Unicode FIFO buffer is not empty
|
||||
The caller should guarantee that Unicode FIFO buffer is not empty
|
||||
by IsUnicodeFiFoEmpty ().
|
||||
|
||||
@param TerminalDevice Terminal driver private structure.
|
||||
@@ -1292,10 +1292,10 @@ VTUTF8TestString (
|
||||
Translate one Unicode character into VT-UTF8 characters.
|
||||
|
||||
UTF8 Encoding Table
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
|
||||
|
||||
@param Unicode Unicode character need translating.
|
||||
@@ -1331,10 +1331,10 @@ GetOneValidUtf8Char (
|
||||
Translate VT-UTF8 characters into one Unicode character.
|
||||
|
||||
UTF8 Encoding Table
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
|
||||
|
||||
@param Utf8Char VT-UTF8 character set needs translating.
|
||||
|
@@ -632,7 +632,7 @@ KeyNotifyProcessHandler (
|
||||
while (TRUE) {
|
||||
//
|
||||
// Enter critical section
|
||||
//
|
||||
//
|
||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
HasKey = EfiKeyFiFoForNotifyRemoveOneKey (TerminalDevice->EfiKeyFiFoForNotify, &Key);
|
||||
CopyMem (&KeyData.Key, &Key, sizeof (EFI_INPUT_KEY));
|
||||
@@ -1128,7 +1128,7 @@ UnicodeFiFoInsertOneKey (
|
||||
|
||||
/**
|
||||
Remove one pre-fetched key out of the Unicode FIFO buffer.
|
||||
The caller should guarantee that Unicode FIFO buffer is not empty
|
||||
The caller should guarantee that Unicode FIFO buffer is not empty
|
||||
by IsUnicodeFiFoEmpty ().
|
||||
|
||||
@param TerminalDevice Terminal driver private structure.
|
||||
@@ -1304,10 +1304,10 @@ UnicodeToEfiKeyFlushState (
|
||||
There is one special input sequence that will force the system to reset.
|
||||
This is ESC R ESC r ESC R.
|
||||
|
||||
Note: current implementation support terminal types include: PC ANSI, VT100+/VTUTF8, VT100.
|
||||
Note: current implementation support terminal types include: PC ANSI, VT100+/VTUTF8, VT100.
|
||||
The table below is not same with UEFI Spec 2.3 Appendix B Table 201(not support ANSI X3.64 /
|
||||
DEC VT200-500 and extra support PC ANSI, VT100)since UEFI Table 201 is just an example.
|
||||
|
||||
|
||||
Symbols used in table below
|
||||
===========================
|
||||
ESC = 0x1B
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL protocol.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -451,7 +451,7 @@ TerminalConOutQueryMode (
|
||||
//
|
||||
// Get Terminal device data structure pointer.
|
||||
//
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
*Columns = TerminalDevice->TerminalConsoleModeData[ModeNumber].Columns;
|
||||
*Rows = TerminalDevice->TerminalConsoleModeData[ModeNumber].Rows;
|
||||
|
||||
@@ -469,7 +469,7 @@ TerminalConOutQueryMode (
|
||||
@param ModeNumber The text mode to set.
|
||||
|
||||
@retval EFI_SUCCESS The requested text mode is set.
|
||||
@retval EFI_DEVICE_ERROR The requested text mode cannot be set
|
||||
@retval EFI_DEVICE_ERROR The requested text mode cannot be set
|
||||
because of serial device error.
|
||||
@retval EFI_UNSUPPORTED The text mode number is not valid.
|
||||
|
||||
@@ -911,7 +911,7 @@ TerminalIsValidTextGraphics (
|
||||
Detects if a valid ASCII char.
|
||||
|
||||
@param Ascii An ASCII character.
|
||||
|
||||
|
||||
@retval TRUE If it is a valid ASCII character.
|
||||
@retval FALSE If it is not a valid ASCII character.
|
||||
|
||||
@@ -935,7 +935,7 @@ TerminalIsValidAscii (
|
||||
Detects if a valid EFI control character.
|
||||
|
||||
@param CharC An input EFI Control character.
|
||||
|
||||
|
||||
@retval TRUE If it is a valid EFI control character.
|
||||
@retval FALSE If it is not a valid EFI control character.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// TerminalDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Terminal DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of translation upon VT-UTF8.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -177,10 +177,10 @@ GetOneValidUtf8Char (
|
||||
Translate VT-UTF8 characters into one Unicode character.
|
||||
|
||||
UTF8 Encoding Table
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
|
||||
|
||||
@param Utf8Char VT-UTF8 character set needs translating.
|
||||
@@ -250,10 +250,10 @@ Utf8ToUnicode (
|
||||
Translate one Unicode character into VT-UTF8 characters.
|
||||
|
||||
UTF8 Encoding Table
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding
|
||||
0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx
|
||||
8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx
|
||||
12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx
|
||||
|
||||
|
||||
@param Unicode Unicode character need translating.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Definitions and prototypes for DebugPort driver.
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -83,15 +83,15 @@ typedef struct {
|
||||
#define IS_UART_DEVICEPATH(dp) (DevicePathType (dp) == MESSAGING_DEVICE_PATH && DevicePathSubType (dp) == MSG_UART_DP)
|
||||
|
||||
/**
|
||||
Debug Port Driver entry point.
|
||||
Debug Port Driver entry point.
|
||||
|
||||
Reads DebugPort variable to determine what device and settings to use as the
|
||||
debug port. Binds exclusively to SerialIo. Reverts to defaults if no variable
|
||||
is found.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES Fails to allocate memory for device.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
@@ -105,7 +105,7 @@ InitializeDebugPortDriver (
|
||||
);
|
||||
|
||||
/**
|
||||
Checks to see if there's not already a DebugPort interface somewhere.
|
||||
Checks to see if there's not already a DebugPort interface somewhere.
|
||||
|
||||
If there's a DEBUGPORT variable, the device path must match exactly. If there's
|
||||
no DEBUGPORT variable, then device path is not checked and does not matter.
|
||||
@@ -144,7 +144,7 @@ DebugPortSupported (
|
||||
|
||||
@retval EFI_SUCCESS This driver is added to ControllerHandle.
|
||||
@retval EFI_OUT_OF_RESOURCES Fails to allocate memory for device.
|
||||
@retval others Some error occurs.
|
||||
@retval others Some error occurs.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -316,7 +316,7 @@ DebugPortComponentNameGetControllerName (
|
||||
|
||||
The port itself should be fine since it was set up during initialization.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
@return EFI_SUCCESS Always.
|
||||
|
||||
@@ -337,8 +337,8 @@ DebugPortReset (
|
||||
On output, the amount of data actually written.
|
||||
@param Buffer Pointer to buffer to read.
|
||||
|
||||
@retval EFI_SUCCESS
|
||||
@retval others
|
||||
@retval EFI_SUCCESS
|
||||
@retval others
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -386,7 +386,7 @@ DebugPortWrite (
|
||||
DebugPort interface
|
||||
@retval EFI_DEVICE_ERROR A hardware failure occured... (from SerialIo)
|
||||
|
||||
**/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DebugPortPoll (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// DebugPortDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Debug Port DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Top level C file for debug support driver. Contains initialization function.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -24,14 +24,14 @@ EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupportProtocolInterface = {
|
||||
|
||||
|
||||
/**
|
||||
Debug Support Driver entry point.
|
||||
Debug Support Driver entry point.
|
||||
|
||||
Checks to see if there's not already a Debug Support protocol installed for
|
||||
Checks to see if there's not already a Debug Support protocol installed for
|
||||
the selected processor before installing it.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval EFI_ALREADY_STARTED Debug Support protocol is installed already.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
@@ -105,7 +105,7 @@ InitializeDebugSupportDriver (
|
||||
LoadedImageProtocolPtr->Unload = PlUnloadDebugSupportDriver;
|
||||
|
||||
//
|
||||
// Call hook for processor specific initialization
|
||||
// Call hook for processor specific initialization
|
||||
//
|
||||
Status = PlInitializeDebugSupportDriver ();
|
||||
ASSERT (!EFI_ERROR (Status));
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// DebugSupportDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Debug Support DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Generic debug support macros, typedefs and prototypes for IA32/x64.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -90,8 +90,8 @@ Vect2Desc (
|
||||
);
|
||||
|
||||
/**
|
||||
Initializes driver's handler registration database.
|
||||
|
||||
Initializes driver's handler registration database.
|
||||
|
||||
This code executes in boot services context
|
||||
Must be public because it's referenced from DebugSupport.c
|
||||
|
||||
@@ -124,14 +124,14 @@ PlUnloadDebugSupportDriver (
|
||||
|
||||
/**
|
||||
Returns the maximum value that may be used for the ProcessorIndex parameter in
|
||||
RegisterPeriodicCallback() and RegisterExceptionCallback().
|
||||
|
||||
RegisterPeriodicCallback() and RegisterExceptionCallback().
|
||||
|
||||
Hard coded to support only 1 processor for now.
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported
|
||||
processor index is returned. Always 0 returned.
|
||||
|
||||
processor index is returned. Always 0 returned.
|
||||
|
||||
@retval EFI_SUCCESS Always returned with **MaxProcessorIndex set to 0.
|
||||
|
||||
**/
|
||||
@@ -144,17 +144,17 @@ GetMaximumProcessorIndex (
|
||||
|
||||
/**
|
||||
Registers a function to be called back periodically in interrupt context.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor the callback function applies to.
|
||||
@param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main
|
||||
periodic entry point of the debug agent.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -168,17 +168,17 @@ RegisterPeriodicCallback (
|
||||
Registers a function to be called when a given processor exception occurs.
|
||||
|
||||
This code executes in boot services context.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor the callback function applies to.
|
||||
@param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
|
||||
when the processor exception specified by ExceptionType occurs.
|
||||
@param ExceptionType Specifies which processor exception to hook.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
when the processor exception specified by ExceptionType occurs.
|
||||
@param ExceptionType Specifies which processor exception to hook.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -192,14 +192,14 @@ RegisterExceptionCallback (
|
||||
|
||||
/**
|
||||
Invalidates processor instruction cache for a memory range. Subsequent execution in this range
|
||||
causes a fresh memory fetch to retrieve code to be executed.
|
||||
|
||||
causes a fresh memory fetch to retrieve code to be executed.
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor's instruction cache is to be invalidated.
|
||||
@param Start Specifies the physical base of the memory range to be invalidated.
|
||||
@param Start Specifies the physical base of the memory range to be invalidated.
|
||||
@param Length Specifies the minimum number of bytes in the processor's instruction
|
||||
cache to invalidate.
|
||||
|
||||
cache to invalidate.
|
||||
|
||||
@retval EFI_SUCCESS Always returned.
|
||||
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
IA32/x64 generic functions to support Debug Support protocol.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -84,7 +84,7 @@ HookEntry (
|
||||
BOOLEAN OldIntFlagState;
|
||||
|
||||
CreateEntryStub (ExceptionType, (VOID **) &IdtEntryTable[ExceptionType].StubEntry);
|
||||
|
||||
|
||||
//
|
||||
// Disables CPU interrupts and returns the previous interrupt state
|
||||
//
|
||||
@@ -95,12 +95,12 @@ HookEntry (
|
||||
//
|
||||
ReadIdtGateDescriptor (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));
|
||||
//
|
||||
// stores orignal interrupt handle
|
||||
// stores orignal interrupt handle
|
||||
//
|
||||
IdtEntryTable[ExceptionType].OrigVector = (DEBUG_PROC) GetInterruptHandleFromIdt (&(IdtEntryTable[ExceptionType].OrigDesc));
|
||||
|
||||
//
|
||||
// encodes new IDT Gate descriptor by stub entry
|
||||
//
|
||||
// encodes new IDT Gate descriptor by stub entry
|
||||
//
|
||||
Vect2Desc (&IdtEntryTable[ExceptionType].NewDesc, IdtEntryTable[ExceptionType].StubEntry);
|
||||
//
|
||||
@@ -154,14 +154,14 @@ UnhookEntry (
|
||||
|
||||
/**
|
||||
Returns the maximum value that may be used for the ProcessorIndex parameter in
|
||||
RegisterPeriodicCallback() and RegisterExceptionCallback().
|
||||
|
||||
RegisterPeriodicCallback() and RegisterExceptionCallback().
|
||||
|
||||
Hard coded to support only 1 processor for now.
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported
|
||||
processor index is returned. Always 0 returned.
|
||||
|
||||
processor index is returned. Always 0 returned.
|
||||
|
||||
@retval EFI_SUCCESS Always returned with **MaxProcessorIndex set to 0.
|
||||
|
||||
**/
|
||||
@@ -178,17 +178,17 @@ GetMaximumProcessorIndex (
|
||||
|
||||
/**
|
||||
Registers a function to be called back periodically in interrupt context.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor the callback function applies to.
|
||||
@param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main
|
||||
periodic entry point of the debug agent.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -205,17 +205,17 @@ RegisterPeriodicCallback (
|
||||
Registers a function to be called when a given processor exception occurs.
|
||||
|
||||
This code executes in boot services context.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor the callback function applies to.
|
||||
@param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
|
||||
when the processor exception specified by ExceptionType occurs.
|
||||
@param ExceptionType Specifies which processor exception to hook.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
when the processor exception specified by ExceptionType occurs.
|
||||
@param ExceptionType Specifies which processor exception to hook.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function was previously registered.
|
||||
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
|
||||
function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -233,14 +233,14 @@ RegisterExceptionCallback (
|
||||
|
||||
/**
|
||||
Invalidates processor instruction cache for a memory range. Subsequent execution in this range
|
||||
causes a fresh memory fetch to retrieve code to be executed.
|
||||
|
||||
causes a fresh memory fetch to retrieve code to be executed.
|
||||
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor's instruction cache is to be invalidated.
|
||||
@param Start Specifies the physical base of the memory range to be invalidated.
|
||||
@param Start Specifies the physical base of the memory range to be invalidated.
|
||||
@param Length Specifies the minimum number of bytes in the processor's instruction
|
||||
cache to invalidate.
|
||||
|
||||
cache to invalidate.
|
||||
|
||||
@retval EFI_SUCCESS Always returned.
|
||||
|
||||
**/
|
||||
@@ -317,8 +317,8 @@ PlUnloadDebugSupportDriver (
|
||||
}
|
||||
|
||||
/**
|
||||
Initializes driver's handler registration database.
|
||||
|
||||
Initializes driver's handler registration database.
|
||||
|
||||
This code executes in boot services context.
|
||||
Must be public because it's referenced from DebugSupport.c
|
||||
|
||||
@@ -352,7 +352,7 @@ PlInitializeDebugSupportDriver (
|
||||
if (IdtEntryTable[ExceptionType].StubEntry == NULL) {
|
||||
goto ErrorCleanup;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Copy Interrupt stub code.
|
||||
//
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
IA32 specific debug support macros, typedefs and prototypes.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
IPF specific types, macros, and definitions for Debug Support Driver.
|
||||
|
||||
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -185,7 +185,7 @@ RegisterPeriodicCallback (
|
||||
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
|
||||
@param ProcessorIndex Specifies which processor the callback function applies to.
|
||||
@param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
|
||||
when the processor exception specified by ExceptionType occurs.
|
||||
when the processor exception specified by ExceptionType occurs.
|
||||
@param ExceptionType Specifies which processor exception to hook.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user