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:
@ -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"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user