mirror of https://github.com/acidanthera/audk.git
1. Removed #ifdef EDK_RELEASE_VERSION from all c files for all modules
2. Removed #ifdef EFI_SPECIFICATION_VERSION from all c files for all modules 3. Added comments for file VariableWorker.c git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2495 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6dcb94c713
commit
ce8bd86e8f
|
@ -594,13 +594,8 @@ CheckErrorStatus (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT8 StatusRegister;
|
UINT8 StatusRegister;
|
||||||
|
|
||||||
//#ifdef EFI_DEBUG
|
|
||||||
|
|
||||||
UINT8 ErrorRegister;
|
UINT8 ErrorRegister;
|
||||||
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
StatusRegister = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
|
StatusRegister = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
|
||||||
|
|
||||||
DEBUG_CODE_BEGIN ();
|
DEBUG_CODE_BEGIN ();
|
||||||
|
@ -2221,7 +2216,7 @@ AtaUdmaWrite (
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Perform an ATA Udma operation (Read, ReadExt, Write, WriteExt).
|
Perform an ATA Udma operation (Read, ReadExt, Write, WriteExt).
|
||||||
|
|
||||||
@param[in] *IdeDev
|
@param[in] *IdeDev
|
||||||
pointer pointing to IDE_BLK_IO_DEV data structure, used
|
pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||||
to record all the information of the IDE device.
|
to record all the information of the IDE device.
|
||||||
|
@ -2235,7 +2230,7 @@ AtaUdmaWrite (
|
||||||
|
|
||||||
@param[in] NumberOfBlocks
|
@param[in] NumberOfBlocks
|
||||||
The number of transfer data blocks.
|
The number of transfer data blocks.
|
||||||
|
|
||||||
@param[in] UdmaOp
|
@param[in] UdmaOp
|
||||||
The perform operations could be AtaUdmaReadOp, AtaUdmaReadExOp,
|
The perform operations could be AtaUdmaReadOp, AtaUdmaReadExOp,
|
||||||
AtaUdmaWriteOp, AtaUdmaWriteExOp
|
AtaUdmaWriteOp, AtaUdmaWriteExOp
|
||||||
|
@ -2368,7 +2363,7 @@ DoAtaUdma (
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
ZeroMem ((VOID *) ((UINTN) MemPage), EFI_PAGES_TO_SIZE (PageCount));
|
ZeroMem ((VOID *) ((UINTN) MemPage), EFI_PAGES_TO_SIZE (PageCount));
|
||||||
|
|
||||||
PrdAddr = (IDE_DMA_PRD *) ((UINTN) MemPage);
|
PrdAddr = (IDE_DMA_PRD *) ((UINTN) MemPage);
|
||||||
//
|
//
|
||||||
// To make sure PRD is allocated in one 64K page
|
// To make sure PRD is allocated in one 64K page
|
||||||
|
@ -2387,17 +2382,17 @@ DoAtaUdma (
|
||||||
// Build the PRD table
|
// Build the PRD table
|
||||||
//
|
//
|
||||||
Status = IdeDev->PciIo->Map (
|
Status = IdeDev->PciIo->Map (
|
||||||
IdeDev->PciIo,
|
IdeDev->PciIo,
|
||||||
PciIoProtocolOp,
|
PciIoProtocolOp,
|
||||||
DataBuffer,
|
DataBuffer,
|
||||||
&ByteCount,
|
&ByteCount,
|
||||||
&DeviceAddress,
|
&DeviceAddress,
|
||||||
&Map
|
&Map
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
IdeDev->PciIo->FreeBuffer (IdeDev->PciIo, PageCount, MemPage);
|
IdeDev->PciIo->FreeBuffer (IdeDev->PciIo, PageCount, MemPage);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
PrdBuffer = (VOID *) ((UINTN) DeviceAddress);
|
PrdBuffer = (VOID *) ((UINTN) DeviceAddress);
|
||||||
TempPrdAddr = UsedPrdAddr;
|
TempPrdAddr = UsedPrdAddr;
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
PciDriverOverride.c
|
PciDriverOverride.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
PCI Bus Driver
|
PCI Bus Driver
|
||||||
|
@ -34,7 +34,7 @@ Routine Description:
|
||||||
Initializes a PCI Driver Override Instance
|
Initializes a PCI Driver Override Instance
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
@ -60,7 +60,7 @@ Routine Description:
|
||||||
Get a overriding driver image
|
Get a overriding driver image
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
@ -124,7 +124,7 @@ Routine Description:
|
||||||
Add a overriding driver image
|
Add a overriding driver image
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
@ -143,16 +143,6 @@ Returns:
|
||||||
EFI_IMAGE_NT_HEADERS *PeHdr;
|
EFI_IMAGE_NT_HEADERS *PeHdr;
|
||||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
|
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
|
||||||
PCI_DRIVER_OVERRIDE_LIST *Node;
|
PCI_DRIVER_OVERRIDE_LIST *Node;
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
EFI_DRIVER_OS_HANDOFF_HEADER *DriverOsHandoffHeader;
|
|
||||||
EFI_DRIVER_OS_HANDOFF_HEADER *NewDriverOsHandoffHeader;
|
|
||||||
EFI_DRIVER_OS_HANDOFF *DriverOsHandoff;
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
|
||||||
EFI_HANDLE DeviceHandle;
|
|
||||||
UINTN NumberOfEntries;
|
|
||||||
UINTN Size;
|
|
||||||
UINTN Index;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (DriverImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &LoadedImage);
|
Status = gBS->HandleProtocol (DriverImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &LoadedImage);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
@ -181,114 +171,5 @@ Returns:
|
||||||
if (PeHdr->FileHeader.Machine != EFI_IMAGE_MACHINE_EBC) {
|
if (PeHdr->FileHeader.Machine != EFI_IMAGE_MACHINE_EBC) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
DriverOsHandoffHeader = NULL;
|
|
||||||
Status = EfiGetSystemConfigurationTable (&gEfiUgaIoProtocolGuid, (VOID **) &DriverOsHandoffHeader);
|
|
||||||
if (!EFI_ERROR (Status) && DriverOsHandoffHeader != NULL) {
|
|
||||||
for (Index = 0; Index < DriverOsHandoffHeader->NumberOfEntries; Index++) {
|
|
||||||
DriverOsHandoff = (EFI_DRIVER_OS_HANDOFF *)((UINTN)(DriverOsHandoffHeader) +
|
|
||||||
DriverOsHandoffHeader->HeaderSize +
|
|
||||||
Index * DriverOsHandoffHeader->SizeOfEntries);
|
|
||||||
DevicePath = DriverOsHandoff->DevicePath;
|
|
||||||
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &DevicePath, &DeviceHandle);
|
|
||||||
if (!EFI_ERROR (Status) && DeviceHandle != NULL && IsDevicePathEnd (DevicePath)) {
|
|
||||||
if (DeviceHandle == PciIoDevice->Handle) {
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NumberOfEntries = DriverOsHandoffHeader->NumberOfEntries + 1;
|
|
||||||
} else {
|
|
||||||
NumberOfEntries = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = gBS->AllocatePool (
|
|
||||||
EfiRuntimeServicesData,
|
|
||||||
sizeof (EFI_DRIVER_OS_HANDOFF_HEADER) + NumberOfEntries * sizeof (EFI_DRIVER_OS_HANDOFF),
|
|
||||||
(VOID **) &NewDriverOsHandoffHeader
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (DriverOsHandoffHeader == NULL) {
|
|
||||||
NewDriverOsHandoffHeader->Version = 0;
|
|
||||||
NewDriverOsHandoffHeader->HeaderSize = sizeof (EFI_DRIVER_OS_HANDOFF_HEADER);
|
|
||||||
NewDriverOsHandoffHeader->SizeOfEntries = sizeof (EFI_DRIVER_OS_HANDOFF);
|
|
||||||
NewDriverOsHandoffHeader->NumberOfEntries = (UINT32) NumberOfEntries;
|
|
||||||
} else {
|
|
||||||
gBS->CopyMem (
|
|
||||||
NewDriverOsHandoffHeader,
|
|
||||||
DriverOsHandoffHeader,
|
|
||||||
DriverOsHandoffHeader->HeaderSize + (NumberOfEntries - 1) * DriverOsHandoffHeader->SizeOfEntries
|
|
||||||
);
|
|
||||||
NewDriverOsHandoffHeader->NumberOfEntries = (UINT32) NumberOfEntries;
|
|
||||||
}
|
|
||||||
|
|
||||||
DriverOsHandoff = (EFI_DRIVER_OS_HANDOFF *)((UINTN)NewDriverOsHandoffHeader +
|
|
||||||
NewDriverOsHandoffHeader->HeaderSize +
|
|
||||||
(NumberOfEntries - 1) * NewDriverOsHandoffHeader->SizeOfEntries);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Fill in the EFI_DRIVER_OS_HANDOFF structure
|
|
||||||
//
|
|
||||||
DriverOsHandoff->Type = EfiUgaDriverFromPciRom;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Compute the size of the device path
|
|
||||||
//
|
|
||||||
Size = GetDevicePathSize (PciIoDevice->DevicePath);
|
|
||||||
if (Size == 0) {
|
|
||||||
DriverOsHandoff->DevicePath = NULL;
|
|
||||||
} else {
|
|
||||||
|
|
||||||
//
|
|
||||||
// Allocate space for duplicate device path
|
|
||||||
//
|
|
||||||
Status = gBS->AllocatePool (
|
|
||||||
EfiRuntimeServicesData,
|
|
||||||
Size,
|
|
||||||
(VOID **) &DriverOsHandoff->DevicePath
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
gBS->FreePool (NewDriverOsHandoffHeader);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Make copy of device path
|
|
||||||
//
|
|
||||||
CopyMem (DriverOsHandoff->DevicePath, PciIoDevice->DevicePath, Size);
|
|
||||||
}
|
|
||||||
|
|
||||||
DriverOsHandoff->PciRomSize = (UINT64) PciIoDevice->PciIo.RomSize;
|
|
||||||
Status = gBS->AllocatePool (
|
|
||||||
EfiRuntimeServicesData,
|
|
||||||
(UINTN) DriverOsHandoff->PciRomSize,
|
|
||||||
(VOID **) &DriverOsHandoff->PciRomImage
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
gBS->FreePool (NewDriverOsHandoffHeader);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
gBS->CopyMem (
|
|
||||||
DriverOsHandoff->PciRomImage,
|
|
||||||
PciIoDevice->PciIo.RomImage,
|
|
||||||
(UINTN) DriverOsHandoff->PciRomSize
|
|
||||||
);
|
|
||||||
|
|
||||||
Status = gBS->InstallConfigurationTable (&gEfiUgaIoProtocolGuid, NewDriverOsHandoffHeader);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (DriverOsHandoffHeader != NULL) {
|
|
||||||
gBS->FreePool (DriverOsHandoffHeader);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ EFI_BOOT_SERVICES mBootServices = {
|
||||||
sizeof (EFI_BOOT_SERVICES), // HeaderSize
|
sizeof (EFI_BOOT_SERVICES), // HeaderSize
|
||||||
0, // CRC32
|
0, // CRC32
|
||||||
0 // Reserved
|
0 // Reserved
|
||||||
},
|
},
|
||||||
(EFI_RAISE_TPL) CoreRaiseTpl, // RaiseTPL
|
(EFI_RAISE_TPL) CoreRaiseTpl, // RaiseTPL
|
||||||
(EFI_RESTORE_TPL) CoreRestoreTpl, // RestoreTPL
|
(EFI_RESTORE_TPL) CoreRestoreTpl, // RestoreTPL
|
||||||
(EFI_ALLOCATE_PAGES) CoreAllocatePages, // AllocatePages
|
(EFI_ALLOCATE_PAGES) CoreAllocatePages, // AllocatePages
|
||||||
|
@ -110,11 +110,8 @@ EFI_BOOT_SERVICES mBootServices = {
|
||||||
(EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces
|
(EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces
|
||||||
(EFI_CALCULATE_CRC32) CoreEfiNotAvailableYetArg3, // CalculateCrc32
|
(EFI_CALCULATE_CRC32) CoreEfiNotAvailableYetArg3, // CalculateCrc32
|
||||||
(EFI_COPY_MEM) CopyMem, // CopyMem
|
(EFI_COPY_MEM) CopyMem, // CopyMem
|
||||||
(EFI_SET_MEM) SetMem // SetMem
|
(EFI_SET_MEM) SetMem, // SetMem
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
(EFI_CREATE_EVENT_EX) CoreCreateEventEx // CreateEventEx
|
||||||
,
|
|
||||||
(EFI_CREATE_EVENT_EX) CoreCreateEventEx // CreateEventEx
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_DXE_SERVICES mDxeServices = {
|
EFI_DXE_SERVICES mDxeServices = {
|
||||||
|
@ -174,33 +171,20 @@ EFI_RUNTIME_SERVICES mEfiRuntimeServicesTableTemplate = {
|
||||||
0, // CRC32
|
0, // CRC32
|
||||||
0 // Reserved
|
0 // Reserved
|
||||||
},
|
},
|
||||||
(EFI_GET_TIME) CoreEfiNotAvailableYetArg2, // GetTime
|
(EFI_GET_TIME) CoreEfiNotAvailableYetArg2, // GetTime
|
||||||
(EFI_SET_TIME) CoreEfiNotAvailableYetArg1, // SetTime
|
(EFI_SET_TIME) CoreEfiNotAvailableYetArg1, // SetTime
|
||||||
(EFI_GET_WAKEUP_TIME) CoreEfiNotAvailableYetArg3, // GetWakeupTime
|
(EFI_GET_WAKEUP_TIME) CoreEfiNotAvailableYetArg3, // GetWakeupTime
|
||||||
(EFI_SET_WAKEUP_TIME) CoreEfiNotAvailableYetArg2, // SetWakeupTime
|
(EFI_SET_WAKEUP_TIME) CoreEfiNotAvailableYetArg2, // SetWakeupTime
|
||||||
(EFI_SET_VIRTUAL_ADDRESS_MAP) CoreEfiNotAvailableYetArg4, // SetVirtualAddressMap
|
(EFI_SET_VIRTUAL_ADDRESS_MAP) CoreEfiNotAvailableYetArg4, // SetVirtualAddressMap
|
||||||
(EFI_CONVERT_POINTER) CoreEfiNotAvailableYetArg2, // ConvertPointer
|
(EFI_CONVERT_POINTER) CoreEfiNotAvailableYetArg2, // ConvertPointer
|
||||||
(EFI_GET_VARIABLE) CoreEfiNotAvailableYetArg5, // GetVariable
|
(EFI_GET_VARIABLE) CoreEfiNotAvailableYetArg5, // GetVariable
|
||||||
(EFI_GET_NEXT_VARIABLE_NAME) CoreEfiNotAvailableYetArg3, // GetNextVariableName
|
(EFI_GET_NEXT_VARIABLE_NAME) CoreEfiNotAvailableYetArg3, // GetNextVariableName
|
||||||
(EFI_SET_VARIABLE) CoreEfiNotAvailableYetArg5, // SetVariable
|
(EFI_SET_VARIABLE) CoreEfiNotAvailableYetArg5, // SetVariable
|
||||||
(EFI_GET_NEXT_HIGH_MONO_COUNT) CoreEfiNotAvailableYetArg1, // GetNextHighMonotonicCount
|
(EFI_GET_NEXT_HIGH_MONO_COUNT) CoreEfiNotAvailableYetArg1, // GetNextHighMonotonicCount
|
||||||
(EFI_RESET_SYSTEM) CoreEfiNotAvailableYetArg4 // ResetSystem
|
(EFI_RESET_SYSTEM) CoreEfiNotAvailableYetArg4, // ResetSystem
|
||||||
#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
|
|
||||||
//
|
|
||||||
// This Tiano extension was removed when UEFI 2.0 support was added.
|
|
||||||
// It's now just a protocol.
|
|
||||||
//
|
|
||||||
,
|
|
||||||
(EFI_REPORT_STATUS_CODE) CoreEfiNotAvailableYetArg5 // ReportStatusCode
|
|
||||||
#elif (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
//
|
|
||||||
// New runtime services added by UEFI 2.0
|
|
||||||
//
|
|
||||||
,
|
|
||||||
(EFI_UPDATE_CAPSULE) CoreEfiNotAvailableYetArg3, // UpdateCapsule
|
(EFI_UPDATE_CAPSULE) CoreEfiNotAvailableYetArg3, // UpdateCapsule
|
||||||
(EFI_QUERY_CAPSULE_CAPABILITIES) CoreEfiNotAvailableYetArg4, // QueryCapsuleCapabilities
|
(EFI_QUERY_CAPSULE_CAPABILITIES) CoreEfiNotAvailableYetArg4, // QueryCapsuleCapabilities
|
||||||
(EFI_QUERY_VARIABLE_INFO) CoreEfiNotAvailableYetArg4 // QueryVariableInfo
|
(EFI_QUERY_VARIABLE_INFO) CoreEfiNotAvailableYetArg4 // QueryVariableInfo
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
|
EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
|
||||||
|
@ -212,8 +196,8 @@ EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
|
||||||
// prevent people from having pointer math bugs in their code.
|
// prevent people from having pointer math bugs in their code.
|
||||||
// now you have to use *DescriptorSize to make things work.
|
// now you have to use *DescriptorSize to make things work.
|
||||||
//
|
//
|
||||||
sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),
|
sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),
|
||||||
EFI_MEMORY_DESCRIPTOR_VERSION,
|
EFI_MEMORY_DESCRIPTOR_VERSION,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -224,7 +208,7 @@ EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
|
||||||
EFI_RUNTIME_ARCH_PROTOCOL *gRuntime = &gRuntimeTemplate;
|
EFI_RUNTIME_ARCH_PROTOCOL *gRuntime = &gRuntimeTemplate;
|
||||||
|
|
||||||
//
|
//
|
||||||
// DXE Core Global Variables for the EFI System Table, Boot Services Table,
|
// DXE Core Global Variables for the EFI System Table, Boot Services Table,
|
||||||
// DXE Services Table, and Runtime Services Table
|
// DXE Services Table, and Runtime Services Table
|
||||||
//
|
//
|
||||||
EFI_BOOT_SERVICES *gBS = &mBootServices;
|
EFI_BOOT_SERVICES *gBS = &mBootServices;
|
||||||
|
@ -311,7 +295,7 @@ Returns:
|
||||||
ASSERT (gRT != NULL);
|
ASSERT (gRT != NULL);
|
||||||
|
|
||||||
gST->RuntimeServices = gRT;
|
gST->RuntimeServices = gRT;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Start the Image Services.
|
// Start the Image Services.
|
||||||
//
|
//
|
||||||
|
@ -353,13 +337,6 @@ Returns:
|
||||||
// Initialize the ReportStatusCode with PEI version, if available
|
// Initialize the ReportStatusCode with PEI version, if available
|
||||||
//
|
//
|
||||||
CoreGetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **)&gStatusCode->ReportStatusCode);
|
CoreGetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **)&gStatusCode->ReportStatusCode);
|
||||||
#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
|
|
||||||
//
|
|
||||||
// This Tiano extension was removed when UEFI 2.0 support was added.
|
|
||||||
// It's now just a protocol.
|
|
||||||
//
|
|
||||||
gRT->ReportStatusCode = gStatusCode->ReportStatusCode;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Report Status Code here for DXE_ENTRY_POINT once it is available
|
// Report Status Code here for DXE_ENTRY_POINT once it is available
|
||||||
|
@ -386,22 +363,22 @@ Returns:
|
||||||
Status = CoreInitializeEventServices ();
|
Status = CoreInitializeEventServices ();
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the Protocols that were passed in from PEI to DXE through GUIDed HOBs
|
// Get the Protocols that were passed in from PEI to DXE through GUIDed HOBs
|
||||||
//
|
//
|
||||||
// These Protocols are not architectural. This implementation is sharing code between
|
// These Protocols are not architectural. This implementation is sharing code between
|
||||||
// PEI and DXE in order to save FLASH space. These Protocols could also be implemented
|
// PEI and DXE in order to save FLASH space. These Protocols could also be implemented
|
||||||
// as part of the DXE Core. However, that would also require the DXE Core to be ported
|
// as part of the DXE Core. However, that would also require the DXE Core to be ported
|
||||||
// each time a different CPU is used, a different Decompression algorithm is used, or a
|
// each time a different CPU is used, a different Decompression algorithm is used, or a
|
||||||
// different Image type is used. By placing these Protocols in PEI, the DXE Core remains
|
// different Image type is used. By placing these Protocols in PEI, the DXE Core remains
|
||||||
// generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform,
|
// generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform,
|
||||||
// and from CPU to CPU.
|
// and from CPU to CPU.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
// Publish the EFI, Tiano, and Custom Decompress protocols for use by other DXE components
|
// Publish the EFI, Tiano, and Custom Decompress protocols for use by other DXE components
|
||||||
//
|
//
|
||||||
Status = CoreInstallMultipleProtocolInterfaces (
|
Status = CoreInstallMultipleProtocolInterfaces (
|
||||||
&mDecompressHandle,
|
&mDecompressHandle,
|
||||||
&gEfiDecompressProtocolGuid, &gEfiDecompress,
|
&gEfiDecompressProtocolGuid, &gEfiDecompress,
|
||||||
|
@ -430,7 +407,7 @@ Returns:
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Produce the Section Extraction Protocol
|
// Produce the Section Extraction Protocol
|
||||||
//
|
//
|
||||||
Status = InitializeSectionExtraction (gDxeCoreImageHandle, gST);
|
Status = InitializeSectionExtraction (gDxeCoreImageHandle, gST);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -455,7 +432,7 @@ Returns:
|
||||||
DEBUG_CODE_BEGIN ();
|
DEBUG_CODE_BEGIN ();
|
||||||
CoreDisplayMissingArchProtocols ();
|
CoreDisplayMissingArchProtocols ();
|
||||||
DEBUG_CODE_END ();
|
DEBUG_CODE_END ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Assert if the Architectural Protocols are not present.
|
// Assert if the Architectural Protocols are not present.
|
||||||
//
|
//
|
||||||
|
@ -477,7 +454,7 @@ Returns:
|
||||||
// Transfer control to the BDS Architectural Protocol
|
// Transfer control to the BDS Architectural Protocol
|
||||||
//
|
//
|
||||||
gBds->Entry (gBds);
|
gBds->Entry (gBds);
|
||||||
|
|
||||||
//
|
//
|
||||||
// BDS should never return
|
// BDS should never return
|
||||||
//
|
//
|
||||||
|
@ -561,7 +538,7 @@ Routine Description:
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Arg1 - Undefined
|
Arg1 - Undefined
|
||||||
|
|
||||||
Arg2 - Undefined
|
Arg2 - Undefined
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -595,9 +572,9 @@ Routine Description:
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Arg1 - Undefined
|
Arg1 - Undefined
|
||||||
|
|
||||||
Arg2 - Undefined
|
Arg2 - Undefined
|
||||||
|
|
||||||
Arg3 - Undefined
|
Arg3 - Undefined
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -632,11 +609,11 @@ Routine Description:
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Arg1 - Undefined
|
Arg1 - Undefined
|
||||||
|
|
||||||
Arg2 - Undefined
|
Arg2 - Undefined
|
||||||
|
|
||||||
Arg3 - Undefined
|
Arg3 - Undefined
|
||||||
|
|
||||||
Arg4 - Undefined
|
Arg4 - Undefined
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -672,13 +649,13 @@ Routine Description:
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Arg1 - Undefined
|
Arg1 - Undefined
|
||||||
|
|
||||||
Arg2 - Undefined
|
Arg2 - Undefined
|
||||||
|
|
||||||
Arg3 - Undefined
|
Arg3 - Undefined
|
||||||
|
|
||||||
Arg4 - Undefined
|
Arg4 - Undefined
|
||||||
|
|
||||||
Arg5 - Undefined
|
Arg5 - Undefined
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -729,7 +706,7 @@ Returns:
|
||||||
if (GuidHob == NULL) {
|
if (GuidHob == NULL) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer = GET_GUID_HOB_DATA (GuidHob);
|
Buffer = GET_GUID_HOB_DATA (GuidHob);
|
||||||
ASSERT (Buffer != NULL);
|
ASSERT (Buffer != NULL);
|
||||||
|
|
||||||
|
@ -763,14 +740,14 @@ Returns:
|
||||||
UINT32 Crc;
|
UINT32 Crc;
|
||||||
|
|
||||||
Hdr->CRC32 = 0;
|
Hdr->CRC32 = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then
|
// If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then
|
||||||
// Crc will come back as zero if we set it to zero here
|
// Crc will come back as zero if we set it to zero here
|
||||||
//
|
//
|
||||||
Crc = 0;
|
Crc = 0;
|
||||||
gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);
|
gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);
|
||||||
Hdr->CRC32 = Crc;
|
Hdr->CRC32 = Crc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -853,12 +830,12 @@ Returns:
|
||||||
//
|
//
|
||||||
SetMem (gBS, sizeof (EFI_BOOT_SERVICES), 0);
|
SetMem (gBS, sizeof (EFI_BOOT_SERVICES), 0);
|
||||||
gBS = NULL;
|
gBS = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update the AtRuntime field in Runtiem AP.
|
// Update the AtRuntime field in Runtiem AP.
|
||||||
//
|
//
|
||||||
gRuntime->AtRuntime = TRUE;
|
gRuntime->AtRuntime = TRUE;
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -43,25 +43,14 @@ ARCHITECTURAL_PROTOCOL_ENTRY mArchProtocols[] = {
|
||||||
{ &gEfiRuntimeArchProtocolGuid, (VOID **)&gRuntime, NULL, NULL, FALSE },
|
{ &gEfiRuntimeArchProtocolGuid, (VOID **)&gRuntime, NULL, NULL, FALSE },
|
||||||
{ &gEfiVariableArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
{ &gEfiVariableArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
||||||
{ &gEfiVariableWriteArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
{ &gEfiVariableWriteArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
#ifndef MDE_CPU_IPF
|
#ifndef MDE_CPU_IPF
|
||||||
//
|
//
|
||||||
// UEFI 2.0 added support for Capsule services. DXE CIS ??? Added support for this AP
|
// UEFI 2.0 added support for Capsule services. DXE CIS ??? Added support for this AP
|
||||||
//
|
//
|
||||||
{ &gEfiCapsuleArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE},
|
{ &gEfiCapsuleArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE},
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
{ &gEfiMonotonicCounterArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
{ &gEfiMonotonicCounterArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
||||||
{ &gEfiResetArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
{ &gEfiResetArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
||||||
#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
|
|
||||||
//
|
|
||||||
// The ReportStatusCode Runtime service is in conflict with the UEFI 2.0 specificaiton
|
|
||||||
// Thus gEfiStatusCodeRuntimeProtocolGuid becomes a normal protocol in UEFI 2.0 systems
|
|
||||||
// It is only included if the EFI 1.10 with Tiano extensions is enabled for backward
|
|
||||||
// compatability
|
|
||||||
//
|
|
||||||
{ &gEfiStatusCodeRuntimeProtocolGuid, (VOID **)&gStatusCode, NULL, NULL, FALSE },
|
|
||||||
#endif
|
|
||||||
{ &gEfiRealTimeClockArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
{ &gEfiRealTimeClockArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
|
||||||
{ NULL, (VOID **)NULL, NULL, NULL, FALSE }
|
{ NULL, (VOID **)NULL, NULL, NULL, FALSE }
|
||||||
};
|
};
|
||||||
|
@ -182,7 +171,7 @@ Returns:
|
||||||
CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));
|
CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));
|
||||||
InsertTailList (&gRuntime->EventHead, Link);
|
InsertTailList (&gRuntime->EventHead, Link);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Clean up gRuntimeTemplate
|
// Clean up gRuntimeTemplate
|
||||||
//
|
//
|
||||||
|
@ -271,9 +260,7 @@ static const GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = {
|
||||||
{ &gEfiRuntimeArchProtocolGuid, (CHAR16 *)L"Runtime" },
|
{ &gEfiRuntimeArchProtocolGuid, (CHAR16 *)L"Runtime" },
|
||||||
{ &gEfiVariableArchProtocolGuid, (CHAR16 *)L"Variable" },
|
{ &gEfiVariableArchProtocolGuid, (CHAR16 *)L"Variable" },
|
||||||
{ &gEfiVariableWriteArchProtocolGuid, (CHAR16 *)L"Variable Write" },
|
{ &gEfiVariableWriteArchProtocolGuid, (CHAR16 *)L"Variable Write" },
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
{ &gEfiCapsuleArchProtocolGuid, (CHAR16 *)L"Capsule" },
|
{ &gEfiCapsuleArchProtocolGuid, (CHAR16 *)L"Capsule" },
|
||||||
#endif
|
|
||||||
{ &gEfiMonotonicCounterArchProtocolGuid, (CHAR16 *)L"Monotonic Counter" },
|
{ &gEfiMonotonicCounterArchProtocolGuid, (CHAR16 *)L"Monotonic Counter" },
|
||||||
{ &gEfiResetArchProtocolGuid, (CHAR16 *)L"Reset" },
|
{ &gEfiResetArchProtocolGuid, (CHAR16 *)L"Reset" },
|
||||||
// { &gEfiStatusCodeRuntimeProtocolGuid, (CHAR16 *)L"Status Code" },
|
// { &gEfiStatusCodeRuntimeProtocolGuid, (CHAR16 *)L"Status Code" },
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ Module Name:
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
EFI Event support
|
EFI Event support
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,17 +37,17 @@ UINT32 mEventTable[] = {
|
||||||
//
|
//
|
||||||
EFI_EVENT_TIMER,
|
EFI_EVENT_TIMER,
|
||||||
//
|
//
|
||||||
// 0x00000100 Generic event with a notification function that
|
// 0x00000100 Generic event with a notification function that
|
||||||
// can be waited on with CheckEvent() or WaitForEvent()
|
// can be waited on with CheckEvent() or WaitForEvent()
|
||||||
//
|
//
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EFI_EVENT_NOTIFY_WAIT,
|
||||||
//
|
//
|
||||||
// 0x00000200 Generic event with a notification function that
|
// 0x00000200 Generic event with a notification function that
|
||||||
// is queue when the event is signaled with SignalEvent()
|
// is queue when the event is signaled with SignalEvent()
|
||||||
//
|
//
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EFI_EVENT_NOTIFY_SIGNAL,
|
||||||
//
|
//
|
||||||
// 0x00000201 ExitBootServicesEvent.
|
// 0x00000201 ExitBootServicesEvent.
|
||||||
//
|
//
|
||||||
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
//
|
//
|
||||||
|
@ -55,33 +55,14 @@ UINT32 mEventTable[] = {
|
||||||
//
|
//
|
||||||
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
//
|
//
|
||||||
// 0x00000203 ReadyToBootEvent.
|
// 0x00000000 Generic event without a notification function.
|
||||||
//
|
// It can be signaled with SignalEvent() and checked with CheckEvent()
|
||||||
EFI_EVENT_SIGNAL_READY_TO_BOOT,
|
|
||||||
//
|
|
||||||
// 0x00000204 LegacyBootEvent.
|
|
||||||
//
|
|
||||||
EFI_EVENT_SIGNAL_LEGACY_BOOT,
|
|
||||||
//
|
|
||||||
// 0x00000603 Signal all ReadyToBootEvents.
|
|
||||||
//
|
|
||||||
EFI_EVENT_NOTIFY_SIGNAL_ALL | EFI_EVENT_SIGNAL_READY_TO_BOOT,
|
|
||||||
//
|
|
||||||
// 0x00000604 Signal all LegacyBootEvents.
|
|
||||||
//
|
|
||||||
EFI_EVENT_NOTIFY_SIGNAL_ALL | EFI_EVENT_SIGNAL_LEGACY_BOOT,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
|
||||||
// 0x00000000 Generic event without a notification function.
|
|
||||||
// It can be signaled with SignalEvent() and checked with CheckEvent()
|
|
||||||
// or WaitForEvent().
|
// or WaitForEvent().
|
||||||
//
|
//
|
||||||
0x00000000,
|
0x00000000,
|
||||||
//
|
//
|
||||||
// 0x80000100 Timer event with a notification function that can be
|
// 0x80000100 Timer event with a notification function that can be
|
||||||
// waited on with CheckEvent() or WaitForEvent()
|
// waited on with CheckEvent() or WaitForEvent()
|
||||||
//
|
//
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_WAIT,
|
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_WAIT,
|
||||||
|
@ -149,7 +130,7 @@ Routine Description:
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - Always return success
|
EFI_SUCCESS - Always return success
|
||||||
|
@ -163,7 +144,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreInitializeTimer ();
|
CoreInitializeTimer ();
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,12 +157,12 @@ CoreDispatchEventNotifies (
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Dispatches all pending events.
|
Dispatches all pending events.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Priority - The task priority level of event notifications to dispatch
|
Priority - The task priority level of event notifications to dispatch
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
@ -190,7 +171,7 @@ Returns:
|
||||||
{
|
{
|
||||||
IEVENT *Event;
|
IEVENT *Event;
|
||||||
LIST_ENTRY *Head;
|
LIST_ENTRY *Head;
|
||||||
|
|
||||||
CoreAcquireEventLock ();
|
CoreAcquireEventLock ();
|
||||||
ASSERT (gEventQueueLock.OwnerTpl == Priority);
|
ASSERT (gEventQueueLock.OwnerTpl == Priority);
|
||||||
Head = &gEventQueue[Priority];
|
Head = &gEventQueue[Priority];
|
||||||
|
@ -199,7 +180,7 @@ Returns:
|
||||||
// Dispatch all the pending notifications
|
// Dispatch all the pending notifications
|
||||||
//
|
//
|
||||||
while (!IsListEmpty (Head)) {
|
while (!IsListEmpty (Head)) {
|
||||||
|
|
||||||
Event = CR (Head->ForwardLink, IEVENT, NotifyLink, EVENT_SIGNATURE);
|
Event = CR (Head->ForwardLink, IEVENT, NotifyLink, EVENT_SIGNATURE);
|
||||||
RemoveEntryList (&Event->NotifyLink);
|
RemoveEntryList (&Event->NotifyLink);
|
||||||
|
|
||||||
|
@ -214,7 +195,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreReleaseEventLock ();
|
CoreReleaseEventLock ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Notify this event
|
// Notify this event
|
||||||
//
|
//
|
||||||
|
@ -246,7 +227,7 @@ Routine Description:
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Event - The Event to notify
|
Event - The Event to notify
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
@ -268,7 +249,7 @@ Returns:
|
||||||
Event->NotifyLink.ForwardLink = NULL;
|
Event->NotifyLink.ForwardLink = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Queue the event to the pending notification list
|
// Queue the event to the pending notification list
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -289,7 +270,7 @@ Routine Description:
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
EventGroup - The list to signal
|
EventGroup - The list to signal
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
@ -313,33 +294,6 @@ Returns:
|
||||||
CoreReleaseEventLock ();
|
CoreReleaseEventLock ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
|
|
||||||
static
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
EventNotifySignalAllNullEvent (
|
|
||||||
IN EFI_EVENT Event,
|
|
||||||
IN VOID *Context
|
|
||||||
)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// This null event is a size efficent way to enusre that
|
|
||||||
// EFI_EVENT_NOTIFY_SIGNAL_ALL is error checked correctly.
|
|
||||||
// EFI_EVENT_NOTIFY_SIGNAL_ALL is now mapped into
|
|
||||||
// CreateEventEx() and this function is used to make the
|
|
||||||
// old error checking in CreateEvent() for Tiano extensions
|
|
||||||
// function.
|
|
||||||
//
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
CoreCreateEvent (
|
CoreCreateEvent (
|
||||||
|
@ -368,42 +322,22 @@ Returns:
|
||||||
EFI_OUT_OF_RESOURCES - The event could not be allocated
|
EFI_OUT_OF_RESOURCES - The event could not be allocated
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_GUID *GuidPtr;
|
EFI_GUID *GuidPtr;
|
||||||
EFI_EVENT_NOTIFY Function;
|
EFI_EVENT_NOTIFY Function;
|
||||||
|
|
||||||
GuidPtr = NULL;
|
GuidPtr = NULL;
|
||||||
Function = NotifyFunction;
|
Function = NotifyFunction;
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
//
|
|
||||||
// Clear EFI_EVENT_NOFITY_SIGNAL_ALL (Tiano extension) as all events in the
|
|
||||||
// EventGroup now have this property. So we need to filter it out.
|
|
||||||
//
|
|
||||||
if (Type & EFI_EVENT_NOTIFY_SIGNAL_ALL) {
|
|
||||||
Type &= ~EFI_EVENT_NOTIFY_SIGNAL_ALL;
|
|
||||||
Function = EventNotifySignalAllNullEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Map the Tiano extensions Events to CreateEventEx form
|
|
||||||
//
|
|
||||||
if (Type == EFI_EVENT_SIGNAL_READY_TO_BOOT) {
|
|
||||||
GuidPtr = &gEfiEventReadyToBootGuid;
|
|
||||||
} else if (Type == EFI_EVENT_SIGNAL_LEGACY_BOOT) {
|
|
||||||
GuidPtr = &gEfiEventLegacyBootGuid
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Convert EFI 1.10 Events to thier UEFI 2.0 CreateEventEx mapping
|
// Convert EFI 1.10 Events to thier UEFI 2.0 CreateEventEx mapping
|
||||||
//
|
//
|
||||||
if (Type == EVENT_SIGNAL_EXIT_BOOT_SERVICES) {
|
if (Type == EVENT_SIGNAL_EXIT_BOOT_SERVICES) {
|
||||||
GuidPtr = &gEfiEventExitBootServicesGuid;
|
GuidPtr = &gEfiEventExitBootServicesGuid;
|
||||||
} else if (Type == EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
|
} else if (Type == EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
|
||||||
GuidPtr = &gEfiEventVirtualAddressChangeGuid;
|
GuidPtr = &gEfiEventVirtualAddressChangeGuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CoreCreateEventEx (Type, NotifyTpl, Function, NotifyContext, GuidPtr, Event);
|
return CoreCreateEventEx (Type, NotifyTpl, Function, NotifyContext, GuidPtr, Event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,8 +403,8 @@ Returns:
|
||||||
//
|
//
|
||||||
// Check for an invalid NotifyFunction or NotifyTpl
|
// Check for an invalid NotifyFunction or NotifyTpl
|
||||||
//
|
//
|
||||||
if ((NotifyFunction == NULL) ||
|
if ((NotifyFunction == NULL) ||
|
||||||
(NotifyTpl < EFI_TPL_APPLICATION) ||
|
(NotifyTpl < EFI_TPL_APPLICATION) ||
|
||||||
(NotifyTpl >= EFI_TPL_HIGH_LEVEL)) {
|
(NotifyTpl >= EFI_TPL_HIGH_LEVEL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
@ -488,7 +422,7 @@ Returns:
|
||||||
// Allcoate and initialize a new event structure.
|
// Allcoate and initialize a new event structure.
|
||||||
//
|
//
|
||||||
Status = CoreAllocatePool (
|
Status = CoreAllocatePool (
|
||||||
(Type & EFI_EVENT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
|
(Type & EFI_EVENT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
|
||||||
sizeof (IEVENT),
|
sizeof (IEVENT),
|
||||||
(VOID **)&IEvent
|
(VOID **)&IEvent
|
||||||
);
|
);
|
||||||
|
@ -500,7 +434,7 @@ Returns:
|
||||||
|
|
||||||
IEvent->Signature = EVENT_SIGNATURE;
|
IEvent->Signature = EVENT_SIGNATURE;
|
||||||
IEvent->Type = Type;
|
IEvent->Type = Type;
|
||||||
|
|
||||||
IEvent->NotifyTpl = NotifyTpl;
|
IEvent->NotifyTpl = NotifyTpl;
|
||||||
IEvent->NotifyFunction = NotifyFunction;
|
IEvent->NotifyFunction = NotifyFunction;
|
||||||
IEvent->NotifyContext = (VOID *)NotifyContext;
|
IEvent->NotifyContext = (VOID *)NotifyContext;
|
||||||
|
@ -524,16 +458,16 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreAcquireEventLock ();
|
CoreAcquireEventLock ();
|
||||||
|
|
||||||
if ((Type & EFI_EVENT_NOTIFY_SIGNAL) != 0x00000000) {
|
if ((Type & EFI_EVENT_NOTIFY_SIGNAL) != 0x00000000) {
|
||||||
//
|
//
|
||||||
// The Event's NotifyFunction must be queued whenever the event is signaled
|
// The Event's NotifyFunction must be queued whenever the event is signaled
|
||||||
//
|
//
|
||||||
InsertHeadList (&gEventSignalQueue, &IEvent->SignalLink);
|
InsertHeadList (&gEventSignalQueue, &IEvent->SignalLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreReleaseEventLock ();
|
CoreReleaseEventLock ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Done
|
// Done
|
||||||
//
|
//
|
||||||
|
@ -552,15 +486,15 @@ CoreSignalEvent (
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Signals the event. Queues the event to be notified if needed
|
Signals the event. Queues the event to be notified if needed
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
UserEvent - The event to signal
|
UserEvent - The event to signal
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_INVALID_PARAMETER - Parameters are not valid.
|
EFI_INVALID_PARAMETER - Parameters are not valid.
|
||||||
|
|
||||||
EFI_SUCCESS - The event was signaled.
|
EFI_SUCCESS - The event was signaled.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -592,8 +526,8 @@ Returns:
|
||||||
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
|
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
|
||||||
if (Event->ExFlag) {
|
if (Event->ExFlag) {
|
||||||
//
|
//
|
||||||
// The CreateEventEx() style requires all members of the Event Group
|
// The CreateEventEx() style requires all members of the Event Group
|
||||||
// to be signaled.
|
// to be signaled.
|
||||||
//
|
//
|
||||||
CoreReleaseEventLock ();
|
CoreReleaseEventLock ();
|
||||||
CoreNotifySignalList (&Event->EventGroup);
|
CoreNotifySignalList (&Event->EventGroup);
|
||||||
|
@ -619,11 +553,11 @@ CoreCheckEvent (
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Check the status of an event
|
Check the status of an event
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
UserEvent - The event to check
|
UserEvent - The event to check
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The event is in the signaled state
|
EFI_SUCCESS - The event is in the signaled state
|
||||||
|
@ -697,17 +631,17 @@ CoreWaitForEvent (
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Stops execution until an event is signaled.
|
Stops execution until an event is signaled.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
NumberOfEvents - The number of events in the UserEvents array
|
NumberOfEvents - The number of events in the UserEvents array
|
||||||
UserEvents - An array of EFI_EVENT
|
UserEvents - An array of EFI_EVENT
|
||||||
UserIndex - Pointer to the index of the event which satisfied the wait condition
|
UserIndex - Pointer to the index of the event which satisfied the wait condition
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The event indicated by Index was signaled.
|
EFI_SUCCESS - The event indicated by Index was signaled.
|
||||||
EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
|
EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
|
||||||
Event was not a valid type
|
Event was not a valid type
|
||||||
EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
|
EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
|
||||||
|
|
||||||
|
@ -725,7 +659,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
||||||
for(Index = 0; Index < NumberOfEvents; Index++) {
|
for(Index = 0; Index < NumberOfEvents; Index++) {
|
||||||
|
|
||||||
Status = CoreCheckEvent (UserEvents[Index]);
|
Status = CoreCheckEvent (UserEvents[Index]);
|
||||||
|
@ -742,7 +676,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// This was the location of the Idle loop callback in EFI 1.x reference
|
// This was the location of the Idle loop callback in EFI 1.x reference
|
||||||
// code. We don't have that concept in this base at this point.
|
// code. We don't have that concept in this base at this point.
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -757,15 +691,15 @@ CoreCloseEvent (
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Closes an event and frees the event structure.
|
Closes an event and frees the event structure.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
UserEvent - Event to close
|
UserEvent - Event to close
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_INVALID_PARAMETER - Parameters are not valid.
|
EFI_INVALID_PARAMETER - Parameters are not valid.
|
||||||
|
|
||||||
EFI_SUCCESS - The event has been closed
|
EFI_SUCCESS - The event has been closed
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -796,11 +730,11 @@ Returns:
|
||||||
//
|
//
|
||||||
// If the event is queued somewhere, remove it
|
// If the event is queued somewhere, remove it
|
||||||
//
|
//
|
||||||
|
|
||||||
if (Event->RuntimeData.Link.ForwardLink != NULL) {
|
if (Event->RuntimeData.Link.ForwardLink != NULL) {
|
||||||
RemoveEntryList (&Event->RuntimeData.Link);
|
RemoveEntryList (&Event->RuntimeData.Link);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Event->NotifyLink.ForwardLink != NULL) {
|
if (Event->NotifyLink.ForwardLink != NULL) {
|
||||||
RemoveEntryList (&Event->NotifyLink);
|
RemoveEntryList (&Event->NotifyLink);
|
||||||
}
|
}
|
||||||
|
|
|
@ -877,14 +877,6 @@ DEVICE_PATH_STRING_TABLE DevPathTable[] = {
|
||||||
DevPathMediaProtocol
|
DevPathMediaProtocol
|
||||||
},
|
},
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
{
|
|
||||||
MEDIA_DEVICE_PATH,
|
|
||||||
MEDIA_FV_FILEPATH_DP,
|
|
||||||
DevPathFvFilePath
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
{
|
||||||
BBS_DEVICE_PATH,
|
BBS_DEVICE_PATH,
|
||||||
BBS_BBS_DP,
|
BBS_BBS_DP,
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ EfiGetTime (
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Returns the current time and date information, and the time-keeping
|
Returns the current time and date information, and the time-keeping
|
||||||
capabilities of the hardware platform.
|
capabilities of the hardware platform.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -214,11 +214,11 @@ Arguments:
|
||||||
|
|
||||||
VariableNameSize - The size of the VariableName buffer.
|
VariableNameSize - The size of the VariableName buffer.
|
||||||
VariableName - On input, supplies the last VariableName that was returned
|
VariableName - On input, supplies the last VariableName that was returned
|
||||||
by GetNextVariableName().
|
by GetNextVariableName().
|
||||||
On output, returns the Nullterminated Unicode string of the
|
On output, returns the Nullterminated Unicode string of the
|
||||||
current variable.
|
current variable.
|
||||||
VendorGuid - On input, supplies the last VendorGuid that was returned by
|
VendorGuid - On input, supplies the last VendorGuid that was returned by
|
||||||
GetNextVariableName().
|
GetNextVariableName().
|
||||||
On output, returns the VendorGuid of the current variable.
|
On output, returns the VendorGuid of the current variable.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -332,7 +332,7 @@ Arguments:
|
||||||
|
|
||||||
ListHead - Head of linked list to convert
|
ListHead - Head of linked list to convert
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
|
|
||||||
|
@ -411,15 +411,11 @@ EfiUpdateCapsule (
|
||||||
IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
|
IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
return mRT->UpdateCapsule (
|
return mRT->UpdateCapsule (
|
||||||
CapsuleHeaderArray,
|
CapsuleHeaderArray,
|
||||||
CapsuleCount,
|
CapsuleCount,
|
||||||
ScatterGatherList
|
ScatterGatherList
|
||||||
);
|
);
|
||||||
#else
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -431,16 +427,12 @@ EfiQueryCapsuleCapabilities (
|
||||||
OUT EFI_RESET_TYPE *ResetType
|
OUT EFI_RESET_TYPE *ResetType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
return mRT->QueryCapsuleCapabilities (
|
return mRT->QueryCapsuleCapabilities (
|
||||||
CapsuleHeaderArray,
|
CapsuleHeaderArray,
|
||||||
CapsuleCount,
|
CapsuleCount,
|
||||||
MaximumCapsuleSize,
|
MaximumCapsuleSize,
|
||||||
ResetType
|
ResetType
|
||||||
);
|
);
|
||||||
#else
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -453,14 +445,10 @@ EfiQueryVariableInfo (
|
||||||
OUT UINT64 *MaximumVariableSize
|
OUT UINT64 *MaximumVariableSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
return mRT->QueryVariableInfo (
|
return mRT->QueryVariableInfo (
|
||||||
Attributes,
|
Attributes,
|
||||||
MaximumVariableStorageSize,
|
MaximumVariableStorageSize,
|
||||||
RemainingVariableStorageSize,
|
RemainingVariableStorageSize,
|
||||||
MaximumVariableSize
|
MaximumVariableSize
|
||||||
);
|
);
|
||||||
#else
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
/**@file
|
/**@file
|
||||||
Console Splitter Driver. Any Handle that attatched
|
Console Splitter Driver. Any Handle that attatched
|
||||||
EFI_CONSOLE_IDENTIFIER_PROTOCOL can be bound by this driver.
|
EFI_CONSOLE_IDENTIFIER_PROTOCOL can be bound by this driver.
|
||||||
|
|
||||||
So far it works like any other driver by opening a SimpleTextIn and/or
|
So far it works like any other driver by opening a SimpleTextIn and/or
|
||||||
SimpleTextOut protocol with EFI_OPEN_PROTOCOL_BY_DRIVER attributes. The big
|
SimpleTextOut protocol with EFI_OPEN_PROTOCOL_BY_DRIVER attributes. The big
|
||||||
difference is this driver does not layer a protocol on the passed in
|
difference is this driver does not layer a protocol on the passed in
|
||||||
handle, or construct a child handle like a standard device or bus driver.
|
handle, or construct a child handle like a standard device or bus driver.
|
||||||
This driver produces three virtual handles as children, one for console input
|
This driver produces three virtual handles as children, one for console input
|
||||||
splitter, one for console output splitter and one for error output splitter.
|
splitter, one for console output splitter and one for error output splitter.
|
||||||
EFI_CONSOLE_SPLIT_PROTOCOL will be attatched onto each virtual handle to
|
EFI_CONSOLE_SPLIT_PROTOCOL will be attatched onto each virtual handle to
|
||||||
identify the splitter type.
|
identify the splitter type.
|
||||||
|
|
||||||
Each virtual handle, that supports both the EFI_CONSOLE_SPLIT_PROTOCOL
|
Each virtual handle, that supports both the EFI_CONSOLE_SPLIT_PROTOCOL
|
||||||
and Console I/O protocol, will be produced in the driver entry point.
|
and Console I/O protocol, will be produced in the driver entry point.
|
||||||
The virtual handle are added on driver entry and never removed.
|
The virtual handle are added on driver entry and never removed.
|
||||||
Such design ensures sytem function well during none console device situation.
|
Such design ensures sytem function well during none console device situation.
|
||||||
|
|
||||||
Copyright (c) 2006 Intel Corporation. <BR>
|
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "ConSplitter.h"
|
#include "ConSplitter.h"
|
||||||
|
@ -104,18 +104,6 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
|
||||||
0,
|
0,
|
||||||
FALSE,
|
FALSE,
|
||||||
},
|
},
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
{
|
|
||||||
ConSpliterUgaDrawGetMode,
|
|
||||||
ConSpliterUgaDrawSetMode,
|
|
||||||
ConSpliterUgaDrawBlt
|
|
||||||
},
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
(EFI_UGA_PIXEL *) NULL,
|
|
||||||
#else
|
|
||||||
{
|
{
|
||||||
ConSpliterGraphicsOutputQueryMode,
|
ConSpliterGraphicsOutputQueryMode,
|
||||||
ConSpliterGraphicsOutputSetMode,
|
ConSpliterGraphicsOutputSetMode,
|
||||||
|
@ -126,7 +114,6 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
|
||||||
(TEXT_OUT_GOP_MODE *) NULL,
|
(TEXT_OUT_GOP_MODE *) NULL,
|
||||||
0,
|
0,
|
||||||
TRUE,
|
TRUE,
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
ConSpliterConsoleControlGetMode,
|
ConSpliterConsoleControlGetMode,
|
||||||
ConSpliterConsoleControlSetMode,
|
ConSpliterConsoleControlSetMode,
|
||||||
|
@ -170,18 +157,6 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
|
||||||
0,
|
0,
|
||||||
FALSE,
|
FALSE,
|
||||||
},
|
},
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
{
|
|
||||||
ConSpliterUgaDrawGetMode,
|
|
||||||
ConSpliterUgaDrawSetMode,
|
|
||||||
ConSpliterUgaDrawBlt
|
|
||||||
},
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
(EFI_UGA_PIXEL *) NULL,
|
|
||||||
#else
|
|
||||||
{
|
{
|
||||||
ConSpliterGraphicsOutputQueryMode,
|
ConSpliterGraphicsOutputQueryMode,
|
||||||
ConSpliterGraphicsOutputSetMode,
|
ConSpliterGraphicsOutputSetMode,
|
||||||
|
@ -192,7 +167,6 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
|
||||||
(TEXT_OUT_GOP_MODE *) NULL,
|
(TEXT_OUT_GOP_MODE *) NULL,
|
||||||
0,
|
0,
|
||||||
TRUE,
|
TRUE,
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
ConSpliterConsoleControlGetMode,
|
ConSpliterConsoleControlGetMode,
|
||||||
ConSpliterConsoleControlSetMode,
|
ConSpliterConsoleControlSetMode,
|
||||||
|
@ -259,12 +233,12 @@ ConSplitterDriverEntry (
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Intialize a virtual console device to act as an agrigator of physical console
|
Intialize a virtual console device to act as an agrigator of physical console
|
||||||
devices.
|
devices.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
ImageHandle - (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
ImageHandle - (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
||||||
SystemTable - (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
SystemTable - (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -318,23 +292,6 @@ Returns:
|
||||||
//
|
//
|
||||||
Status = ConSplitterTextOutConstructor (&mConOut);
|
Status = ConSplitterTextOutConstructor (&mConOut);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
//
|
|
||||||
// In EFI mode, UGA Draw protocol is installed
|
|
||||||
//
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
|
||||||
&mConOut.VirtualHandle,
|
|
||||||
&gEfiSimpleTextOutProtocolGuid,
|
|
||||||
&mConOut.TextOut,
|
|
||||||
&gEfiUgaDrawProtocolGuid,
|
|
||||||
&mConOut.UgaDraw,
|
|
||||||
&gEfiConsoleControlProtocolGuid,
|
|
||||||
&mConOut.ConsoleControl,
|
|
||||||
&gEfiPrimaryConsoleOutDeviceGuid,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
#else
|
|
||||||
//
|
//
|
||||||
// In UEFI mode, Graphics Output Protocol is installed on virtual handle.
|
// In UEFI mode, Graphics Output Protocol is installed on virtual handle.
|
||||||
//
|
//
|
||||||
|
@ -350,7 +307,6 @@ Returns:
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
|
@ -388,7 +344,7 @@ Arguments:
|
||||||
|
|
||||||
ConInPrivate - A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA structure.
|
ConInPrivate - A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA structure.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_OUT_OF_RESOURCES - Out of resources.
|
EFI_OUT_OF_RESOURCES - Out of resources.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -485,12 +441,6 @@ ConSplitterTextOutConstructor (
|
||||||
ConOutPrivate->TextOutQueryData[0].Rows = 25;
|
ConOutPrivate->TextOutQueryData[0].Rows = 25;
|
||||||
DevNullTextOutSetMode (ConOutPrivate, 0);
|
DevNullTextOutSetMode (ConOutPrivate, 0);
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
//
|
|
||||||
// Setup the DevNullUgaDraw to 800 x 600 x 32 bits per pixel
|
|
||||||
//
|
|
||||||
ConSpliterUgaDrawSetMode (&ConOutPrivate->UgaDraw, 800, 600, 32, 60);
|
|
||||||
#else
|
|
||||||
//
|
//
|
||||||
// Setup resource for mode information in Graphics Output Protocol interface
|
// Setup resource for mode information in Graphics Output Protocol interface
|
||||||
//
|
//
|
||||||
|
@ -526,7 +476,6 @@ ConSplitterTextOutConstructor (
|
||||||
//
|
//
|
||||||
ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff;
|
ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff;
|
||||||
ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0);
|
ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0);
|
||||||
#endif
|
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -732,7 +681,7 @@ ConSplitterStart (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Start ConSplitter on ControllerHandle, and create the virtual
|
Start ConSplitter on ControllerHandle, and create the virtual
|
||||||
agrogated console device on first call Start for a SimpleTextIn handle.
|
agrogated console device on first call Start for a SimpleTextIn handle.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -793,7 +742,7 @@ ConSplitterConInDriverBindingStart (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Start ConSplitter on ControllerHandle, and create the virtual
|
Start ConSplitter on ControllerHandle, and create the virtual
|
||||||
agrogated console device on first call Start for a SimpleTextIn handle.
|
agrogated console device on first call Start for a SimpleTextIn handle.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -840,7 +789,7 @@ ConSplitterSimplePointerDriverBindingStart (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Start ConSplitter on ControllerHandle, and create the virtual
|
Start ConSplitter on ControllerHandle, and create the virtual
|
||||||
agrogated console device on first call Start for a SimpleTextIn handle.
|
agrogated console device on first call Start for a SimpleTextIn handle.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -882,7 +831,7 @@ ConSplitterConOutDriverBindingStart (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Start ConSplitter on ControllerHandle, and create the virtual
|
Start ConSplitter on ControllerHandle, and create the virtual
|
||||||
agrogated console device on first call Start for a SimpleTextIn handle.
|
agrogated console device on first call Start for a SimpleTextIn handle.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -946,21 +895,6 @@ Returns:
|
||||||
Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput, UgaDraw);
|
Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput, UgaDraw);
|
||||||
ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
|
ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
//
|
|
||||||
// Match the UGA mode data of ConOut with the current mode
|
|
||||||
//
|
|
||||||
if (UgaDraw != NULL) {
|
|
||||||
UgaDraw->GetMode (
|
|
||||||
UgaDraw,
|
|
||||||
&mConOut.UgaHorizontalResolution,
|
|
||||||
&mConOut.UgaVerticalResolution,
|
|
||||||
&mConOut.UgaColorDepth,
|
|
||||||
&mConOut.UgaRefreshRate
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -974,7 +908,7 @@ ConSplitterStdErrDriverBindingStart (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Start ConSplitter on ControllerHandle, and create the virtual
|
Start ConSplitter on ControllerHandle, and create the virtual
|
||||||
agrogated console device on first call Start for a SimpleTextIn handle.
|
agrogated console device on first call Start for a SimpleTextIn handle.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -1930,7 +1864,6 @@ Returns:
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ConSplitterAddGraphicsOutputMode (
|
ConSplitterAddGraphicsOutputMode (
|
||||||
|
@ -2116,7 +2049,6 @@ Returns:
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ConSplitterTextOutAddDevice (
|
ConSplitterTextOutAddDevice (
|
||||||
|
@ -2207,21 +2139,15 @@ Returns:
|
||||||
MaxMode = Private->TextOutMode.MaxMode;
|
MaxMode = Private->TextOutMode.MaxMode;
|
||||||
ASSERT (MaxMode >= 1);
|
ASSERT (MaxMode >= 1);
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
if ((GraphicsOutput != NULL) || (UgaDraw != NULL)) {
|
if ((GraphicsOutput != NULL) || (UgaDraw != NULL)) {
|
||||||
ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);
|
ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Private->ConsoleOutputMode == EfiConsoleControlScreenGraphics && GraphicsOutput != NULL) {
|
if (Private->ConsoleOutputMode == EfiConsoleControlScreenGraphics && GraphicsOutput != NULL) {
|
||||||
//
|
//
|
||||||
// We just added a new UGA device in graphics mode
|
// We just added a new UGA device in graphics mode
|
||||||
//
|
//
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
DevNullGopSync (Private, GraphicsOutput, UgaDraw);
|
DevNullGopSync (Private, GraphicsOutput, UgaDraw);
|
||||||
#else
|
|
||||||
DevNullUgaSync (Private, UgaDraw);
|
|
||||||
#endif
|
|
||||||
} else if ((CurrentMode >= 0) && ((GraphicsOutput != NULL) || (UgaDraw != NULL)) && (CurrentMode < Private->TextOutMode.MaxMode)) {
|
} else if ((CurrentMode >= 0) && ((GraphicsOutput != NULL) || (UgaDraw != NULL)) && (CurrentMode < Private->TextOutMode.MaxMode)) {
|
||||||
//
|
//
|
||||||
// The new console supports the same mode of the current console so sync up
|
// The new console supports the same mode of the current console so sync up
|
||||||
|
@ -2351,7 +2277,7 @@ ConSplitterTextInReset (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The device was reset.
|
EFI_SUCCESS - The device was reset.
|
||||||
EFI_DEVICE_ERROR - The device is not functioning properly and could
|
EFI_DEVICE_ERROR - The device is not functioning properly and could
|
||||||
not be reset.
|
not be reset.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -2390,7 +2316,7 @@ ConSplitterTextInPrivateReadKeyStroke (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -2400,7 +2326,7 @@ ConSplitterTextInPrivateReadKeyStroke (
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The keystroke information was returned.
|
EFI_SUCCESS - The keystroke information was returned.
|
||||||
EFI_NOT_READY - There was no keystroke data availiable.
|
EFI_NOT_READY - There was no keystroke data availiable.
|
||||||
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
||||||
hardware errors.
|
hardware errors.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -2462,14 +2388,14 @@ ConSpliterConsoleControlLockStdInEvent (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
This timer event will fire when StdIn is locked. It will check the key
|
This timer event will fire when StdIn is locked. It will check the key
|
||||||
sequence on StdIn to see if it matches the password. Any error in the
|
sequence on StdIn to see if it matches the password. Any error in the
|
||||||
password will cause the check to reset. As long a mConIn.PasswordEnabled is
|
password will cause the check to reset. As long a mConIn.PasswordEnabled is
|
||||||
TRUE the StdIn splitter will not report any input.
|
TRUE the StdIn splitter will not report any input.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
(Standard EFI_EVENT_NOTIFY)
|
(Standard EFI_EVENT_NOTIFY)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
None
|
None
|
||||||
|
|
||||||
|
@ -2546,7 +2472,7 @@ ConSpliterConsoleControlLockStdIn (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
If Password is NULL unlock the password state variable and set the event
|
If Password is NULL unlock the password state variable and set the event
|
||||||
timer. If the Password is too big return an error. If the Password is valid
|
timer. If the Password is too big return an error. If the Password is valid
|
||||||
Copy the Password and enable state variable and then arm the periodic timer
|
Copy the Password and enable state variable and then arm the periodic timer
|
||||||
|
|
||||||
|
@ -2589,7 +2515,7 @@ ConSplitterTextInReadKeyStroke (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||||
If the ConIn is password locked make it look like no keystroke is availible
|
If the ConIn is password locked make it look like no keystroke is availible
|
||||||
|
|
||||||
|
@ -2600,7 +2526,7 @@ ConSplitterTextInReadKeyStroke (
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The keystroke information was returned.
|
EFI_SUCCESS - The keystroke information was returned.
|
||||||
EFI_NOT_READY - There was no keystroke data availiable.
|
EFI_NOT_READY - There was no keystroke data availiable.
|
||||||
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
||||||
hardware errors.
|
hardware errors.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -2632,7 +2558,7 @@ Routine Description:
|
||||||
This event agregates all the events of the ConIn devices in the spliter.
|
This event agregates all the events of the ConIn devices in the spliter.
|
||||||
If the ConIn is password locked then return.
|
If the ConIn is password locked then return.
|
||||||
If any events of physical ConIn devices are signaled, signal the ConIn
|
If any events of physical ConIn devices are signaled, signal the ConIn
|
||||||
spliter event. This will cause the calling code to call
|
spliter event. This will cause the calling code to call
|
||||||
ConSplitterTextInReadKeyStroke ().
|
ConSplitterTextInReadKeyStroke ().
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -2692,7 +2618,7 @@ ConSplitterSimplePointerReset (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The device was reset.
|
EFI_SUCCESS - The device was reset.
|
||||||
EFI_DEVICE_ERROR - The device is not functioning properly and could
|
EFI_DEVICE_ERROR - The device is not functioning properly and could
|
||||||
not be reset.
|
not be reset.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -2735,17 +2661,17 @@ ConSplitterSimplePointerPrivateGetState (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
State -
|
State -
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The keystroke information was returned.
|
EFI_SUCCESS - The keystroke information was returned.
|
||||||
EFI_NOT_READY - There was no keystroke data availiable.
|
EFI_NOT_READY - There was no keystroke data availiable.
|
||||||
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
||||||
hardware errors.
|
hardware errors.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -2814,18 +2740,18 @@ ConSplitterSimplePointerGetState (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||||
If the ConIn is password locked make it look like no keystroke is availible
|
If the ConIn is password locked make it look like no keystroke is availible
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
State -
|
State -
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The keystroke information was returned.
|
EFI_SUCCESS - The keystroke information was returned.
|
||||||
EFI_NOT_READY - There was no keystroke data availiable.
|
EFI_NOT_READY - There was no keystroke data availiable.
|
||||||
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
EFI_DEVICE_ERROR - The keydtroke information was not returned due to
|
||||||
hardware errors.
|
hardware errors.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -2857,7 +2783,7 @@ Routine Description:
|
||||||
This event agregates all the events of the ConIn devices in the spliter.
|
This event agregates all the events of the ConIn devices in the spliter.
|
||||||
If the ConIn is password locked then return.
|
If the ConIn is password locked then return.
|
||||||
If any events of physical ConIn devices are signaled, signal the ConIn
|
If any events of physical ConIn devices are signaled, signal the ConIn
|
||||||
spliter event. This will cause the calling code to call
|
spliter event. This will cause the calling code to call
|
||||||
ConSplitterTextInReadKeyStroke ().
|
ConSplitterTextInReadKeyStroke ().
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -2913,7 +2839,7 @@ ConSplitterTextOutReset (
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
ExtendedVerification - Driver may perform more exhaustive verfication
|
ExtendedVerification - Driver may perform more exhaustive verfication
|
||||||
operation of the device during reset.
|
operation of the device during reset.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -2971,17 +2897,17 @@ ConSplitterTextOutOutputString (
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
String - The NULL-terminated Unicode string to be displayed on the output
|
String - The NULL-terminated Unicode string to be displayed on the output
|
||||||
device(s). All output devices must also support the Unicode
|
device(s). All output devices must also support the Unicode
|
||||||
drawing defined in this file.
|
drawing defined in this file.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The string was output to the device.
|
EFI_SUCCESS - The string was output to the device.
|
||||||
EFI_DEVICE_ERROR - The device reported an error while attempting to output
|
EFI_DEVICE_ERROR - The device reported an error while attempting to output
|
||||||
the text.
|
the text.
|
||||||
EFI_UNSUPPORTED - The output device's mode is not currently in a
|
EFI_UNSUPPORTED - The output device's mode is not currently in a
|
||||||
defined text mode.
|
defined text mode.
|
||||||
EFI_WARN_UNKNOWN_GLYPH - This warning code indicates that some of the
|
EFI_WARN_UNKNOWN_GLYPH - This warning code indicates that some of the
|
||||||
characters in the Unicode string could not be
|
characters in the Unicode string could not be
|
||||||
rendered and were skipped.
|
rendered and were skipped.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -3048,7 +2974,7 @@ ConSplitterTextOutTestString (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
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.
|
target device.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -3058,8 +2984,8 @@ ConSplitterTextOutTestString (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The device(s) are capable of rendering the output string.
|
EFI_SUCCESS - The device(s) are capable of rendering the output string.
|
||||||
EFI_UNSUPPORTED - Some of the characters in the Unicode string cannot be
|
EFI_UNSUPPORTED - Some of the characters in the Unicode string cannot be
|
||||||
rendered by one or more of the output devices mapped
|
rendered by one or more of the output devices mapped
|
||||||
by the EFI handle.
|
by the EFI handle.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -3115,7 +3041,7 @@ ConSplitterTextOutQueryMode (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The requested mode information was returned.
|
EFI_SUCCESS - The requested mode information was returned.
|
||||||
EFI_DEVICE_ERROR - The device had an error and could not
|
EFI_DEVICE_ERROR - The device had an error and could not
|
||||||
complete the request.
|
complete the request.
|
||||||
EFI_UNSUPPORTED - The mode number was not valid.
|
EFI_UNSUPPORTED - The mode number was not valid.
|
||||||
|
|
||||||
|
@ -3132,7 +3058,7 @@ ConSplitterTextOutQueryMode (
|
||||||
if ( (ModeNumber > (UINTN)(((UINT32)-1)>>1)) ) {
|
if ( (ModeNumber > (UINTN)(((UINT32)-1)>>1)) ) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((INT32) ModeNumber >= This->Mode->MaxMode) {
|
if ((INT32) ModeNumber >= This->Mode->MaxMode) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
@ -3165,7 +3091,7 @@ ConSplitterTextOutSetMode (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The requested text mode was set.
|
EFI_SUCCESS - The requested text mode was set.
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
EFI_DEVICE_ERROR - The device had an error and
|
||||||
could not complete the request.
|
could not complete the request.
|
||||||
EFI_UNSUPPORTED - The mode number was not valid.
|
EFI_UNSUPPORTED - The mode number was not valid.
|
||||||
|
|
||||||
|
@ -3251,7 +3177,7 @@ ConSplitterTextOutSetAttribute (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The attribute was set.
|
EFI_SUCCESS - The attribute was set.
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
EFI_DEVICE_ERROR - The device had an error and
|
||||||
could not complete the request.
|
could not complete the request.
|
||||||
EFI_UNSUPPORTED - The attribute requested is not defined.
|
EFI_UNSUPPORTED - The attribute requested is not defined.
|
||||||
|
|
||||||
|
@ -3269,7 +3195,7 @@ ConSplitterTextOutSetAttribute (
|
||||||
//
|
//
|
||||||
if ( (Attribute > (UINTN)(((UINT32)-1)>>1)) ) {
|
if ( (Attribute > (UINTN)(((UINT32)-1)>>1)) ) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// return the worst status met
|
// return the worst status met
|
||||||
|
@ -3300,7 +3226,7 @@ ConSplitterTextOutClearScreen (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Clears the output device(s) display to the currently selected background
|
Clears the output device(s) display to the currently selected background
|
||||||
color.
|
color.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -3308,7 +3234,7 @@ ConSplitterTextOutClearScreen (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The operation completed successfully.
|
EFI_SUCCESS - The operation completed successfully.
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
EFI_DEVICE_ERROR - The device had an error and
|
||||||
could not complete the request.
|
could not complete the request.
|
||||||
EFI_UNSUPPORTED - The output device is not in a valid text mode.
|
EFI_UNSUPPORTED - The output device is not in a valid text mode.
|
||||||
|
|
||||||
|
@ -3362,9 +3288,9 @@ ConSplitterTextOutSetCursorPosition (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The operation completed successfully.
|
EFI_SUCCESS - The operation completed successfully.
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
EFI_DEVICE_ERROR - The device had an error and
|
||||||
could not complete the request.
|
could not complete the request.
|
||||||
EFI_UNSUPPORTED - The output device is not in a valid text mode, or the
|
EFI_UNSUPPORTED - The output device is not in a valid text mode, or the
|
||||||
cursor position is invalid for the current mode.
|
cursor position is invalid for the current mode.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -3424,7 +3350,7 @@ ConSplitterTextOutEnableCursor (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The operation completed successfully.
|
EFI_SUCCESS - The operation completed successfully.
|
||||||
EFI_DEVICE_ERROR - The device had an error and could not complete the
|
EFI_DEVICE_ERROR - The device had an error and could not complete the
|
||||||
request, or the device does not support changing
|
request, or the device does not support changing
|
||||||
the cursor mode.
|
the cursor mode.
|
||||||
EFI_UNSUPPORTED - The output device is not in a valid text mode.
|
EFI_UNSUPPORTED - The output device is not in a valid text mode.
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
ConSplitterGraphics.c
|
ConSplitterGraphics.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
@ -96,7 +96,7 @@ ConSpliterConsoleControlSetMode (
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
Mode - Mode to set the
|
Mode - Mode to set the
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Mode information returned.
|
EFI_SUCCESS - Mode information returned.
|
||||||
|
@ -118,7 +118,7 @@ ConSpliterConsoleControlSetMode (
|
||||||
|
|
||||||
//
|
//
|
||||||
// Judge current mode with wanted mode at first.
|
// Judge current mode with wanted mode at first.
|
||||||
//
|
//
|
||||||
if (Private->ConsoleOutputMode == Mode) {
|
if (Private->ConsoleOutputMode == Mode) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -147,11 +147,7 @@ ConSpliterConsoleControlSetMode (
|
||||||
//
|
//
|
||||||
if ((Mode == EfiConsoleControlScreenGraphics) &&((TextAndGop->GraphicsOutput != NULL) || (TextAndGop->UgaDraw != NULL))) {
|
if ((Mode == EfiConsoleControlScreenGraphics) &&((TextAndGop->GraphicsOutput != NULL) || (TextAndGop->UgaDraw != NULL))) {
|
||||||
TextAndGop->TextOutEnabled = FALSE;
|
TextAndGop->TextOutEnabled = FALSE;
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
DevNullGopSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);
|
DevNullGopSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);
|
||||||
#else
|
|
||||||
DevNullUgaSync (Private, TextAndGop->UgaDraw);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +158,6 @@ ConSpliterConsoleControlSetMode (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputQueryMode (
|
ConSpliterGraphicsOutputQueryMode (
|
||||||
|
@ -374,7 +369,7 @@ DevNullGraphicsOutputBlt (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN SrcY;
|
UINTN SrcY;
|
||||||
BOOLEAN Forward;
|
BOOLEAN Forward;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltPtr;
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltPtr;
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ScreenPtr;
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ScreenPtr;
|
||||||
|
@ -658,396 +653,6 @@ DevNullGopSync (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
ConSpliterUgaDrawGetMode (
|
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
|
||||||
OUT UINT32 *HorizontalResolution,
|
|
||||||
OUT UINT32 *VerticalResolution,
|
|
||||||
OUT UINT32 *ColorDepth,
|
|
||||||
OUT UINT32 *RefreshRate
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Return the current video mode information.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
HorizontalResolution - Current video horizontal resolution in pixels
|
|
||||||
VerticalResolution - Current video vertical resolution in pixels
|
|
||||||
ColorDepth - Current video color depth in bits per pixel
|
|
||||||
RefreshRate - Current video refresh rate in Hz.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Mode information returned.
|
|
||||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
|
||||||
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
|
||||||
|
|
||||||
if (!(HorizontalResolution && VerticalResolution && RefreshRate && ColorDepth)) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// retrieve private data
|
|
||||||
//
|
|
||||||
Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
|
||||||
|
|
||||||
*HorizontalResolution = Private->UgaHorizontalResolution;
|
|
||||||
*VerticalResolution = Private->UgaVerticalResolution;
|
|
||||||
*ColorDepth = Private->UgaColorDepth;
|
|
||||||
*RefreshRate = Private->UgaRefreshRate;
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
ConSpliterUgaDrawSetMode (
|
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
|
||||||
IN UINT32 HorizontalResolution,
|
|
||||||
IN UINT32 VerticalResolution,
|
|
||||||
IN UINT32 ColorDepth,
|
|
||||||
IN UINT32 RefreshRate
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Return the current video mode information.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
HorizontalResolution - Current video horizontal resolution in pixels
|
|
||||||
VerticalResolution - Current video vertical resolution in pixels
|
|
||||||
ColorDepth - Current video color depth in bits per pixel
|
|
||||||
RefreshRate - Current video refresh rate in Hz.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Mode information returned.
|
|
||||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
|
||||||
EFI_OUT_OF_RESOURCES - Out of resources.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
|
||||||
UINTN Index;
|
|
||||||
EFI_STATUS ReturnStatus;
|
|
||||||
UINTN Size;
|
|
||||||
|
|
||||||
Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
|
||||||
|
|
||||||
//
|
|
||||||
// UgaDevNullSetMode ()
|
|
||||||
//
|
|
||||||
ReturnStatus = EFI_SUCCESS;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Free the old version
|
|
||||||
//
|
|
||||||
FreePool (Private->UgaBlt);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Allocate the virtual Blt buffer
|
|
||||||
//
|
|
||||||
Size = HorizontalResolution * VerticalResolution * sizeof (EFI_UGA_PIXEL);
|
|
||||||
Private->UgaBlt = AllocateZeroPool (Size);
|
|
||||||
if (Private->UgaBlt == NULL) {
|
|
||||||
return EFI_OUT_OF_RESOURCES;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Update the Mode data
|
|
||||||
//
|
|
||||||
Private->UgaHorizontalResolution = HorizontalResolution;
|
|
||||||
Private->UgaVerticalResolution = VerticalResolution;
|
|
||||||
Private->UgaColorDepth = ColorDepth;
|
|
||||||
Private->UgaRefreshRate = RefreshRate;
|
|
||||||
|
|
||||||
if (Private->ConsoleOutputMode != EfiConsoleControlScreenGraphics) {
|
|
||||||
return ReturnStatus;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// return the worst status met
|
|
||||||
//
|
|
||||||
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
|
|
||||||
if (Private->TextOutList[Index].UgaDraw != NULL) {
|
|
||||||
Status = Private->TextOutList[Index].UgaDraw->SetMode (
|
|
||||||
Private->TextOutList[Index].UgaDraw,
|
|
||||||
HorizontalResolution,
|
|
||||||
VerticalResolution,
|
|
||||||
ColorDepth,
|
|
||||||
RefreshRate
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
ReturnStatus = Status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ReturnStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
DevNullUgaBlt (
|
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
|
||||||
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
|
|
||||||
IN EFI_UGA_BLT_OPERATION BltOperation,
|
|
||||||
IN UINTN SourceX,
|
|
||||||
IN UINTN SourceY,
|
|
||||||
IN UINTN DestinationX,
|
|
||||||
IN UINTN DestinationY,
|
|
||||||
IN UINTN Width,
|
|
||||||
IN UINTN Height,
|
|
||||||
IN UINTN Delta OPTIONAL
|
|
||||||
)
|
|
||||||
{
|
|
||||||
UINTN SrcY;
|
|
||||||
BOOLEAN Forward;
|
|
||||||
UINTN Index;
|
|
||||||
EFI_UGA_PIXEL *BltPtr;
|
|
||||||
EFI_UGA_PIXEL *ScreenPtr;
|
|
||||||
UINT32 HorizontalResolution;
|
|
||||||
UINT32 VerticalResolution;
|
|
||||||
|
|
||||||
if ((BltOperation < 0) || (BltOperation >= EfiUgaBltMax)) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Width == 0 || Height == 0) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Delta == 0) {
|
|
||||||
Delta = Width * sizeof (EFI_UGA_PIXEL);
|
|
||||||
}
|
|
||||||
|
|
||||||
HorizontalResolution = Private->UgaHorizontalResolution;
|
|
||||||
VerticalResolution = Private->UgaVerticalResolution;
|
|
||||||
|
|
||||||
//
|
|
||||||
// We need to fill the Virtual Screen buffer with the blt data.
|
|
||||||
//
|
|
||||||
if (BltOperation == EfiUgaVideoToBltBuffer) {
|
|
||||||
//
|
|
||||||
// Video to BltBuffer: Source is Video, destination is BltBuffer
|
|
||||||
//
|
|
||||||
if ((SourceY + Height) > VerticalResolution) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((SourceX + Width) > HorizontalResolution) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + DestinationY * Delta + DestinationX * sizeof (EFI_UGA_PIXEL));
|
|
||||||
ScreenPtr = &Private->UgaBlt[SourceY * HorizontalResolution + SourceX];
|
|
||||||
while (Height) {
|
|
||||||
CopyMem (BltPtr, ScreenPtr, Width * sizeof (EFI_UGA_PIXEL));
|
|
||||||
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltPtr + Delta);
|
|
||||||
ScreenPtr += HorizontalResolution;
|
|
||||||
Height--;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// BltBuffer to Video: Source is BltBuffer, destination is Video
|
|
||||||
//
|
|
||||||
if (DestinationY + Height > VerticalResolution) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (DestinationX + Width > HorizontalResolution) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((BltOperation == EfiUgaVideoToVideo) && (DestinationY > SourceY)) {
|
|
||||||
//
|
|
||||||
// Copy backwards, only care the Video to Video Blt
|
|
||||||
//
|
|
||||||
ScreenPtr = &Private->UgaBlt[(DestinationY + Height - 1) * HorizontalResolution + DestinationX];
|
|
||||||
SrcY = SourceY + Height - 1;
|
|
||||||
Forward = FALSE;
|
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// Copy forwards, for other cases
|
|
||||||
//
|
|
||||||
ScreenPtr = &Private->UgaBlt[DestinationY * HorizontalResolution + DestinationX];
|
|
||||||
SrcY = SourceY;
|
|
||||||
Forward = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (Height != 0) {
|
|
||||||
if (BltOperation == EfiUgaVideoFill) {
|
|
||||||
for (Index = 0; Index < Width; Index++) {
|
|
||||||
ScreenPtr[Index] = *BltBuffer;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (BltOperation == EfiUgaBltBufferToVideo) {
|
|
||||||
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + SrcY * Delta + SourceX * sizeof (EFI_UGA_PIXEL));
|
|
||||||
} else {
|
|
||||||
BltPtr = &Private->UgaBlt[SrcY * HorizontalResolution + SourceX];
|
|
||||||
}
|
|
||||||
|
|
||||||
CopyMem (ScreenPtr, BltPtr, Width * sizeof (EFI_UGA_PIXEL));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Forward) {
|
|
||||||
ScreenPtr += HorizontalResolution;
|
|
||||||
SrcY ++;
|
|
||||||
} else {
|
|
||||||
ScreenPtr -= HorizontalResolution;
|
|
||||||
SrcY --;
|
|
||||||
}
|
|
||||||
Height--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
ConSpliterUgaDrawBlt (
|
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
|
||||||
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
|
|
||||||
IN EFI_UGA_BLT_OPERATION BltOperation,
|
|
||||||
IN UINTN SourceX,
|
|
||||||
IN UINTN SourceY,
|
|
||||||
IN UINTN DestinationX,
|
|
||||||
IN UINTN DestinationY,
|
|
||||||
IN UINTN Width,
|
|
||||||
IN UINTN Height,
|
|
||||||
IN UINTN Delta OPTIONAL
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
The following table defines actions for BltOperations:
|
|
||||||
EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
|
|
||||||
directly to every pixel of the video display rectangle
|
|
||||||
(DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height).
|
|
||||||
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
|
||||||
EfiUgaVideoToBltBuffer - Read data from the video display rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
|
||||||
the BltBuffer rectangle (DestinationX, DestinationY )
|
|
||||||
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
|
||||||
DestinationY is not zero then Delta must be set to the length in bytes
|
|
||||||
of a row in the BltBuffer.
|
|
||||||
EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
|
||||||
video display rectangle (DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
|
||||||
not zero then Delta must be set to the length in bytes of a row in the
|
|
||||||
BltBuffer.
|
|
||||||
EfiUgaVideoToVideo - Copy from the video display rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) .
|
|
||||||
to the video display rectangle (DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height).
|
|
||||||
The BltBuffer and Delta are not used in this mode.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
BltBuffer - Buffer containing data to blit into video buffer. This
|
|
||||||
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
|
||||||
BltOperation - Operation to perform on BlitBuffer and video memory
|
|
||||||
SourceX - X coordinate of source for the BltBuffer.
|
|
||||||
SourceY - Y coordinate of source for the BltBuffer.
|
|
||||||
DestinationX - X coordinate of destination for the BltBuffer.
|
|
||||||
DestinationY - Y coordinate of destination for the BltBuffer.
|
|
||||||
Width - Width of rectangle in BltBuffer in pixels.
|
|
||||||
Height - Hight of rectangle in BltBuffer in pixels.
|
|
||||||
Delta -
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Blt operation completed.
|
|
||||||
EFI_INVALID_PARAMETER - BltOperation is not valid.
|
|
||||||
EFI_DEVICE_ERROR - A hardware error occured writting to the video
|
|
||||||
buffer.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
|
||||||
UINTN Index;
|
|
||||||
EFI_STATUS ReturnStatus;
|
|
||||||
|
|
||||||
Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Sync up DevNull UGA device
|
|
||||||
//
|
|
||||||
ReturnStatus = DevNullUgaBlt (
|
|
||||||
Private,
|
|
||||||
BltBuffer,
|
|
||||||
BltOperation,
|
|
||||||
SourceX,
|
|
||||||
SourceY,
|
|
||||||
DestinationX,
|
|
||||||
DestinationY,
|
|
||||||
Width,
|
|
||||||
Height,
|
|
||||||
Delta
|
|
||||||
);
|
|
||||||
if (Private->ConsoleOutputMode != EfiConsoleControlScreenGraphics) {
|
|
||||||
return ReturnStatus;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// return the worst status met
|
|
||||||
//
|
|
||||||
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
|
|
||||||
if (Private->TextOutList[Index].UgaDraw != NULL) {
|
|
||||||
Status = Private->TextOutList[Index].UgaDraw->Blt (
|
|
||||||
Private->TextOutList[Index].UgaDraw,
|
|
||||||
BltBuffer,
|
|
||||||
BltOperation,
|
|
||||||
SourceX,
|
|
||||||
SourceY,
|
|
||||||
DestinationX,
|
|
||||||
DestinationY,
|
|
||||||
Width,
|
|
||||||
Height,
|
|
||||||
Delta
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
ReturnStatus = Status;
|
|
||||||
} else if (BltOperation == EfiUgaVideoToBltBuffer) {
|
|
||||||
//
|
|
||||||
// Only need to read the data into buffer one time
|
|
||||||
//
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ReturnStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
DevNullUgaSync (
|
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return UgaDraw->Blt (
|
|
||||||
UgaDraw,
|
|
||||||
Private->UgaBlt,
|
|
||||||
EfiUgaBltBufferToVideo,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
Private->UgaHorizontalResolution,
|
|
||||||
Private->UgaVerticalResolution,
|
|
||||||
Private->UgaHorizontalResolution * sizeof (EFI_UGA_PIXEL)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullTextOutOutputString (
|
DevNullTextOutOutputString (
|
||||||
|
@ -1063,17 +668,17 @@ DevNullTextOutOutputString (
|
||||||
Private - Pointer to the console output splitter's private data. It
|
Private - Pointer to the console output splitter's private data. It
|
||||||
indicates the calling context.
|
indicates the calling context.
|
||||||
WString - The NULL-terminated Unicode string to be displayed on the output
|
WString - The NULL-terminated Unicode string to be displayed on the output
|
||||||
device(s). All output devices must also support the Unicode
|
device(s). All output devices must also support the Unicode
|
||||||
drawing defined in this file.
|
drawing defined in this file.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The string was output to the device.
|
EFI_SUCCESS - The string was output to the device.
|
||||||
EFI_DEVICE_ERROR - The device reported an error while attempting to
|
EFI_DEVICE_ERROR - The device reported an error while attempting to
|
||||||
output the text.
|
output the text.
|
||||||
EFI_UNSUPPORTED - The output device's mode is not currently in a
|
EFI_UNSUPPORTED - The output device's mode is not currently in a
|
||||||
defined text mode.
|
defined text mode.
|
||||||
EFI_WARN_UNKNOWN_GLYPH - This warning code indicates that some of the
|
EFI_WARN_UNKNOWN_GLYPH - This warning code indicates that some of the
|
||||||
characters in the Unicode string could not be
|
characters in the Unicode string could not be
|
||||||
rendered and were skipped.
|
rendered and were skipped.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -1285,7 +890,7 @@ DevNullTextOutSetMode (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The requested text mode was set.
|
EFI_SUCCESS - The requested text mode was set.
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
EFI_DEVICE_ERROR - The device had an error and
|
||||||
could not complete the request.
|
could not complete the request.
|
||||||
EFI_UNSUPPORTED - The mode number was not valid.
|
EFI_UNSUPPORTED - The mode number was not valid.
|
||||||
EFI_OUT_OF_RESOURCES - Out of resources.
|
EFI_OUT_OF_RESOURCES - Out of resources.
|
||||||
|
@ -1314,7 +919,7 @@ DevNullTextOutSetMode (
|
||||||
Private->TextOutMode.Mode = (INT32) ModeNumber;
|
Private->TextOutMode.Mode = (INT32) ModeNumber;
|
||||||
Private->DevNullColumns = Column;
|
Private->DevNullColumns = Column;
|
||||||
Private->DevNullRows = Row;
|
Private->DevNullRows = Row;
|
||||||
|
|
||||||
if (Private->DevNullScreen != NULL) {
|
if (Private->DevNullScreen != NULL) {
|
||||||
FreePool (Private->DevNullScreen);
|
FreePool (Private->DevNullScreen);
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +953,7 @@ DevNullTextOutClearScreen (
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Clears the output device(s) display to the currently selected background
|
Clears the output device(s) display to the currently selected background
|
||||||
color.
|
color.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -1356,7 +961,7 @@ DevNullTextOutClearScreen (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The operation completed successfully.
|
EFI_SUCCESS - The operation completed successfully.
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
EFI_DEVICE_ERROR - The device had an error and
|
||||||
could not complete the request.
|
could not complete the request.
|
||||||
EFI_UNSUPPORTED - The output device is not in a valid text mode.
|
EFI_UNSUPPORTED - The output device is not in a valid text mode.
|
||||||
|
|
||||||
|
@ -1412,9 +1017,9 @@ DevNullTextOutSetCursorPosition (
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The operation completed successfully.
|
EFI_SUCCESS - The operation completed successfully.
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
EFI_DEVICE_ERROR - The device had an error and
|
||||||
could not complete the request.
|
could not complete the request.
|
||||||
EFI_UNSUPPORTED - The output device is not in a valid text mode, or the
|
EFI_UNSUPPORTED - The output device is not in a valid text mode, or the
|
||||||
cursor position is invalid for the current mode.
|
cursor position is invalid for the current mode.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -1437,22 +1042,22 @@ DevNullTextOutEnableCursor (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
|
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
|
||||||
In this driver, the cursor cannot be hidden.
|
In this driver, the cursor cannot be hidden.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Private - Indicates the calling context.
|
Private - Indicates the calling context.
|
||||||
|
|
||||||
Visible - If TRUE, the cursor is set to be visible, If FALSE, the cursor
|
Visible - If TRUE, the cursor is set to be visible, If FALSE, the cursor
|
||||||
is set to be invisible.
|
is set to be invisible.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The request is valid.
|
EFI_SUCCESS - The request is valid.
|
||||||
|
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
Private->TextOutMode.CursorVisible = Visible;
|
Private->TextOutMode.CursorVisible = Visible;
|
||||||
|
@ -1467,15 +1072,15 @@ DevNullSyncGopStdOut (
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Take the DevNull TextOut device and update the Simple Text Out on every
|
Take the DevNull TextOut device and update the Simple Text Out on every
|
||||||
UGA device.
|
UGA device.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Private - Indicates the calling context.
|
Private - Indicates the calling context.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The request is valid.
|
EFI_SUCCESS - The request is valid.
|
||||||
other - Return status of TextOut->OutputString ()
|
other - Return status of TextOut->OutputString ()
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
|
@ -27,7 +27,7 @@ Revision History
|
||||||
ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
|
ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is a temperary function which will be removed
|
// This is a temperary function which will be removed
|
||||||
// when EfiAcquireLock in UefiLib can handle the
|
// when EfiAcquireLock in UefiLib can handle the
|
||||||
// the call in UEFI Runtimer driver in RT phase.
|
// the call in UEFI Runtimer driver in RT phase.
|
||||||
//
|
//
|
||||||
|
@ -43,7 +43,7 @@ AcquireLockOnlyAtBootTime (
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is a temperary function which will be removed
|
// This is a temperary function which will be removed
|
||||||
// when EfiAcquireLock in UefiLib can handle the
|
// when EfiAcquireLock in UefiLib can handle the
|
||||||
// the call in UEFI Runtimer driver in RT phase.
|
// the call in UEFI Runtimer driver in RT phase.
|
||||||
//
|
//
|
||||||
|
@ -426,7 +426,7 @@ Returns:
|
||||||
Done:
|
Done:
|
||||||
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -485,8 +485,8 @@ Returns:
|
||||||
goto Done;
|
goto Done;
|
||||||
} else if (!EFI_ERROR (Status) && Variable.Volatile && EfiAtRuntime()) {
|
} else if (!EFI_ERROR (Status) && Variable.Volatile && EfiAtRuntime()) {
|
||||||
//
|
//
|
||||||
// If EfiAtRuntime and the variable is Volatile and Runtime Access,
|
// If EfiAtRuntime and the variable is Volatile and Runtime Access,
|
||||||
// the volatile is ReadOnly, and SetVariable should be aborted and
|
// the volatile is ReadOnly, and SetVariable should be aborted and
|
||||||
// return EFI_WRITE_PROTECTED.
|
// return EFI_WRITE_PROTECTED.
|
||||||
//
|
//
|
||||||
Status = EFI_WRITE_PROTECTED;
|
Status = EFI_WRITE_PROTECTED;
|
||||||
|
@ -622,7 +622,6 @@ Done:
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
QueryVariableInfo (
|
QueryVariableInfo (
|
||||||
|
@ -693,7 +692,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);
|
AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);
|
||||||
|
|
||||||
if((Attributes & EFI_VARIABLE_NON_VOLATILE) == 0) {
|
if((Attributes & EFI_VARIABLE_NON_VOLATILE) == 0) {
|
||||||
//
|
//
|
||||||
// Query is Volatile related.
|
// Query is Volatile related.
|
||||||
|
@ -747,7 +746,6 @@ Returns:
|
||||||
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -827,7 +825,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, EFI_TPL_NOTIFY);
|
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, EFI_TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Intialize volatile variable store
|
// Intialize volatile variable store
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ Returns:
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
RuntimeServiceQueryVariableInfo (
|
RuntimeServiceQueryVariableInfo (
|
||||||
|
@ -142,7 +141,6 @@ Returns:
|
||||||
mVariableModuleGlobal->FvbInstance
|
mVariableModuleGlobal->FvbInstance
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -196,9 +194,7 @@ Returns:
|
||||||
SystemTable->RuntimeServices->GetVariable = RuntimeServiceGetVariable;
|
SystemTable->RuntimeServices->GetVariable = RuntimeServiceGetVariable;
|
||||||
SystemTable->RuntimeServices->GetNextVariableName = RuntimeServiceGetNextVariableName;
|
SystemTable->RuntimeServices->GetNextVariableName = RuntimeServiceGetNextVariableName;
|
||||||
SystemTable->RuntimeServices->SetVariable = RuntimeServiceSetVariable;
|
SystemTable->RuntimeServices->SetVariable = RuntimeServiceSetVariable;
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
SystemTable->RuntimeServices->QueryVariableInfo = RuntimeServiceQueryVariableInfo;
|
SystemTable->RuntimeServices->QueryVariableInfo = RuntimeServiceQueryVariableInfo;
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now install the Variable Runtime Architectural Protocol on a new handle
|
// Now install the Variable Runtime Architectural Protocol on a new handle
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -89,7 +89,6 @@ Returns:
|
||||||
);
|
);
|
||||||
return ReturnVal;
|
return ReturnVal;
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
case EsalQueryVariableInfo:
|
case EsalQueryVariableInfo:
|
||||||
ReturnVal.Status = QueryVariableInfo (
|
ReturnVal.Status = QueryVariableInfo (
|
||||||
(UINT32) Arg2,
|
(UINT32) Arg2,
|
||||||
|
@ -100,7 +99,6 @@ Returns:
|
||||||
Global->FvbInstance
|
Global->FvbInstance
|
||||||
);
|
);
|
||||||
return ReturnVal;
|
return ReturnVal;
|
||||||
#endif
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;
|
ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;
|
||||||
|
@ -173,10 +171,8 @@ Returns:
|
||||||
EsalGetNextVariableName,
|
EsalGetNextVariableName,
|
||||||
EsalVariableCommonEntry,
|
EsalVariableCommonEntry,
|
||||||
EsalSetVariable,
|
EsalSetVariable,
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EsalVariableCommonEntry,
|
EsalVariableCommonEntry,
|
||||||
EsalQueryVariableInfo,
|
EsalQueryVariableInfo,
|
||||||
#endif
|
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
Variable.h
|
Variable.h
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -26,7 +26,7 @@ Abstract:
|
||||||
|
|
||||||
//
|
//
|
||||||
// BugBug: We need relcate the head file.
|
// BugBug: We need relcate the head file.
|
||||||
//
|
//
|
||||||
#include <Common/Variable.h>
|
#include <Common/Variable.h>
|
||||||
|
|
||||||
#if defined (MDE_CPU_IPF)
|
#if defined (MDE_CPU_IPF)
|
||||||
|
@ -143,7 +143,6 @@ SetVariable (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
QueryVariableInfo (
|
QueryVariableInfo (
|
||||||
|
@ -155,6 +154,5 @@ QueryVariableInfo (
|
||||||
IN UINT32 Instance
|
IN UINT32 Instance
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -22,24 +22,24 @@ Abstract:
|
||||||
THIS IS VERY DANGEROUS CODE BE VERY CAREFUL IF YOU CHANGE IT
|
THIS IS VERY DANGEROUS CODE BE VERY CAREFUL IF YOU CHANGE IT
|
||||||
|
|
||||||
The transition for calling EFI Runtime functions in physical mode to calling
|
The transition for calling EFI Runtime functions in physical mode to calling
|
||||||
them in virtual mode is very very complex. Every pointer in needs to be
|
them in virtual mode is very very complex. Every pointer in needs to be
|
||||||
converted from physical mode to virtual mode. Be very careful walking linked
|
converted from physical mode to virtual mode. Be very careful walking linked
|
||||||
lists! Then to make it really hard the code it's self needs be relocated into
|
lists! Then to make it really hard the code it's self needs be relocated into
|
||||||
the new virtual address space.
|
the new virtual address space.
|
||||||
|
|
||||||
So here is the concept. The code in this module will never ever be called in
|
So here is the concept. The code in this module will never ever be called in
|
||||||
virtual mode. This is the code that collects the information needed to convert
|
virtual mode. This is the code that collects the information needed to convert
|
||||||
to virtual mode (DXE core registers runtime stuff with this code). Since this
|
to virtual mode (DXE core registers runtime stuff with this code). Since this
|
||||||
code is used to fixup all runtime images, it CAN NOT fix it's self up. So some
|
code is used to fixup all runtime images, it CAN NOT fix it's self up. So some
|
||||||
code has to stay behind and that is us.
|
code has to stay behind and that is us.
|
||||||
|
|
||||||
Also you need to be careful about when you allocate memory, as once we are in
|
Also you need to be careful about when you allocate memory, as once we are in
|
||||||
runtime (including our EVT_SIGNAL_EXIT_BOOT_SERVICES event) you can no longer
|
runtime (including our EVT_SIGNAL_EXIT_BOOT_SERVICES event) you can no longer
|
||||||
allocate memory.
|
allocate memory.
|
||||||
|
|
||||||
Any runtime driver that gets loaded before us will not be callable in virtual
|
Any runtime driver that gets loaded before us will not be callable in virtual
|
||||||
mode. This is due to the fact that the DXE core can not register the info
|
mode. This is due to the fact that the DXE core can not register the info
|
||||||
needed with us. This is good, since it keeps the code in this file from
|
needed with us. This is good, since it keeps the code in this file from
|
||||||
getting registered.
|
getting registered.
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ EFI_RUNTIME_ARCH_PROTOCOL mRuntime = {
|
||||||
// prevent people from having pointer math bugs in their code.
|
// prevent people from having pointer math bugs in their code.
|
||||||
// now you have to use *DescriptorSize to make things work.
|
// now you have to use *DescriptorSize to make things work.
|
||||||
//
|
//
|
||||||
sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),
|
sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),
|
||||||
EFI_MEMORY_DESCRIPTOR_VERSION,
|
EFI_MEMORY_DESCRIPTOR_VERSION,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -136,7 +136,7 @@ Routine Description:
|
||||||
Determines the new virtual address that is to be used on subsequent memory accesses.
|
Determines the new virtual address that is to be used on subsequent memory accesses.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
DebugDisposition - Supplies type information for the pointer being converted.
|
DebugDisposition - Supplies type information for the pointer being converted.
|
||||||
ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed
|
ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed
|
||||||
for the new virtual address mappings being applied.
|
for the new virtual address mappings being applied.
|
||||||
|
@ -234,11 +234,11 @@ RuntimeDriverConvertInternalPointer (
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Determines the new virtual address that is to be used on subsequent memory accesses
|
Determines the new virtual address that is to be used on subsequent memory accesses
|
||||||
for internal pointers.
|
for internal pointers.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed
|
ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed
|
||||||
for the new virtual address mappings being applied.
|
for the new virtual address mappings being applied.
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ Routine Description:
|
||||||
Changes the runtime addressing mode of EFI firmware from physical to virtual.
|
Changes the runtime addressing mode of EFI firmware from physical to virtual.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
MemoryMapSize - The size in bytes of VirtualMap.
|
MemoryMapSize - The size in bytes of VirtualMap.
|
||||||
DescriptorSize - The size in bytes of an entry in the VirtualMap.
|
DescriptorSize - The size in bytes of an entry in the VirtualMap.
|
||||||
DescriptorVersion - The version of the structure entries in VirtualMap.
|
DescriptorVersion - The version of the structure entries in VirtualMap.
|
||||||
|
@ -287,7 +287,7 @@ Returns:
|
||||||
EFI_NOT_FOUND - A virtual address was supplied for an address that is not found
|
EFI_NOT_FOUND - A virtual address was supplied for an address that is not found
|
||||||
in the memory map.
|
in the memory map.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_RUNTIME_EVENT_ENTRY *RuntimeEvent;
|
EFI_RUNTIME_EVENT_ENTRY *RuntimeEvent;
|
||||||
|
@ -298,9 +298,7 @@ Returns:
|
||||||
EFI_DRIVER_OS_HANDOFF_HEADER *DriverOsHandoffHeader;
|
EFI_DRIVER_OS_HANDOFF_HEADER *DriverOsHandoffHeader;
|
||||||
EFI_DRIVER_OS_HANDOFF *DriverOsHandoff;
|
EFI_DRIVER_OS_HANDOFF *DriverOsHandoff;
|
||||||
EFI_PHYSICAL_ADDRESS VirtImageBase;
|
EFI_PHYSICAL_ADDRESS VirtImageBase;
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
EFI_CAPSULE_TABLE *CapsuleTable;
|
||||||
EFI_CAPSULE_TABLE *CapsuleTable;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Can only switch to virtual addresses once the memory map is locked down,
|
// Can only switch to virtual addresses once the memory map is locked down,
|
||||||
|
@ -372,7 +370,7 @@ Returns:
|
||||||
(UINTN) RuntimeImage->ImageSize,
|
(UINTN) RuntimeImage->ImageSize,
|
||||||
RuntimeImage->RelocationData
|
RuntimeImage->RelocationData
|
||||||
);
|
);
|
||||||
|
|
||||||
InvalidateInstructionCacheRange (RuntimeImage->ImageBase, (UINTN)RuntimeImage->ImageSize);
|
InvalidateInstructionCacheRange (RuntimeImage->ImageBase, (UINTN)RuntimeImage->ImageSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,18 +384,13 @@ Returns:
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetWakeupTime);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetWakeupTime);
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetWakeupTime);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetWakeupTime);
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->ResetSystem);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->ResetSystem);
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->ReportStatusCode);
|
|
||||||
#endif
|
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextHighMonotonicCount);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextHighMonotonicCount);
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetVariable);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetVariable);
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetVariable);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetVariable);
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextVariableName);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextVariableName);
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryVariableInfo);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryVariableInfo);
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->UpdateCapsule);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->UpdateCapsule);
|
||||||
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryCapsuleCapabilities);
|
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryCapsuleCapabilities);
|
||||||
#endif
|
|
||||||
RuntimeDriverCalculateEfiHdrCrc (&gRT->Hdr);
|
RuntimeDriverCalculateEfiHdrCrc (&gRT->Hdr);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -421,15 +414,13 @@ Returns:
|
||||||
RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
|
RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
if (CompareGuid (&gEfiCapsuleGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
|
if (CompareGuid (&gEfiCapsuleGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
|
||||||
CapsuleTable = gST->ConfigurationTable[Index].VendorTable;
|
CapsuleTable = gST->ConfigurationTable[Index].VendorTable;
|
||||||
for (Index1 = 0; Index1 < CapsuleTable->CapsuleArrayNumber; Index1++) {
|
for (Index1 = 0; Index1 < CapsuleTable->CapsuleArrayNumber; Index1++) {
|
||||||
RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &CapsuleTable->CapsulePtr[Index1]);
|
RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &CapsuleTable->CapsulePtr[Index1]);
|
||||||
}
|
}
|
||||||
RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
|
RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Convert the runtime fields of the EFI System Table and recompute the CRC-32
|
// Convert the runtime fields of the EFI System Table and recompute the CRC-32
|
||||||
|
@ -512,6 +503,6 @@ Returns:
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -25,12 +25,10 @@ Revision History
|
||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
#include "Colors.h"
|
#include "Colors.h"
|
||||||
|
|
||||||
#ifndef EFI_MAX
|
|
||||||
#define EFI_MAX(_a, _b) ((_a) > (_b) ? (_a) : (_b))
|
#define EFI_MAX(_a, _b) ((_a) > (_b) ? (_a) : (_b))
|
||||||
#endif
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ReadString (
|
ReadString(
|
||||||
IN UI_MENU_OPTION *MenuOption,
|
IN UI_MENU_OPTION *MenuOption,
|
||||||
OUT CHAR16 *StringPtr
|
OUT CHAR16 *StringPtr
|
||||||
)
|
)
|
||||||
|
@ -619,7 +617,7 @@ GetNumericInput (
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine reads a numeric value from the user input.
|
This routine reads a numeric value from the user input.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
|
@ -630,14 +628,14 @@ Arguments:
|
||||||
ManualInput - If the input is manual or not.
|
ManualInput - If the input is manual or not.
|
||||||
|
|
||||||
Tag - Pointer to all the attributes and values associated with a tag.
|
Tag - Pointer to all the attributes and values associated with a tag.
|
||||||
|
|
||||||
Value - Pointer to the numeric value that is going to be read.
|
Value - Pointer to the numeric value that is going to be read.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - If numerical input is read successfully
|
EFI_SUCCESS - If numerical input is read successfully
|
||||||
EFI_DEVICE_ERROR - If operation fails
|
EFI_DEVICE_ERROR - If operation fails
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
|
@ -735,9 +733,9 @@ TheKey2:
|
||||||
Tag->Value = (UINT16) Number;
|
Tag->Value = (UINT16) Number;
|
||||||
*Value = (UINT16) Number;
|
*Value = (UINT16) Number;
|
||||||
UnicodeValueToString (
|
UnicodeValueToString (
|
||||||
FormattedNumber,
|
FormattedNumber,
|
||||||
FALSE,
|
FALSE,
|
||||||
(UINTN) Number,
|
(UINTN) Number,
|
||||||
(sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))
|
(sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))
|
||||||
);
|
);
|
||||||
Number = (UINT16) GetStringWidth (FormattedNumber);
|
Number = (UINT16) GetStringWidth (FormattedNumber);
|
||||||
|
@ -1471,7 +1469,7 @@ TheKey:
|
||||||
} else {
|
} else {
|
||||||
if (Key.ScanCode == SCAN_UP) {
|
if (Key.ScanCode == SCAN_UP) {
|
||||||
TempIndex = Index - 1;
|
TempIndex = Index - 1;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Keep going until meets meaningful tag.
|
// Keep going until meets meaningful tag.
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,27 +1,29 @@
|
||||||
/*++
|
/** @file
|
||||||
|
Variable worker functions.
|
||||||
|
|
||||||
Copyright (c) 2007, Intel Corporation
|
Copyright (c) 2006, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
**/
|
||||||
|
|
||||||
VariableWorker.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Framework PEIM to provide the Variable functionality
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#include <Variable.h>
|
#include <Variable.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get one variable by the index count.
|
||||||
|
|
||||||
|
@param IndexTable The pointer to variable index table.
|
||||||
|
@param Count The index count of variable in index table.
|
||||||
|
|
||||||
|
@return The pointer to variable header indexed by count.
|
||||||
|
|
||||||
|
**/
|
||||||
VARIABLE_HEADER *
|
VARIABLE_HEADER *
|
||||||
GetVariableByIndex (
|
GetVariableByIndex (
|
||||||
IN VARIABLE_INDEX_TABLE *IndexTable,
|
IN VARIABLE_INDEX_TABLE *IndexTable,
|
||||||
|
@ -31,6 +33,17 @@ GetVariableByIndex (
|
||||||
return (VARIABLE_HEADER *) (UINTN) ((((UINT32)IndexTable->Index[Count]) << 2) + ((UINT32)(UINTN)IndexTable->StartPtr & 0xFFFC0000) );
|
return (VARIABLE_HEADER *) (UINTN) ((((UINT32)IndexTable->Index[Count]) << 2) + ((UINT32)(UINTN)IndexTable->StartPtr & 0xFFFC0000) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Record Variable in VariableIndex HOB.
|
||||||
|
|
||||||
|
Record Variable in VariableIndex HOB and update the length of variable index table.
|
||||||
|
|
||||||
|
@param IndexTable The pointer to variable index table.
|
||||||
|
@param Variable The pointer to the variable that will be recorded.
|
||||||
|
|
||||||
|
@retval VOID
|
||||||
|
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
VariableIndexTableUpdate (
|
VariableIndexTableUpdate (
|
||||||
IN OUT VARIABLE_INDEX_TABLE *IndexTable,
|
IN OUT VARIABLE_INDEX_TABLE *IndexTable,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -150,12 +150,32 @@ Returns:
|
||||||
--*/
|
--*/
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get one variable by the index count.
|
||||||
|
|
||||||
|
@param IndexTable The pointer to variable index table.
|
||||||
|
@param Count The index count of variable in index table.
|
||||||
|
|
||||||
|
@return The pointer to variable header indexed by count.
|
||||||
|
|
||||||
|
**/
|
||||||
VARIABLE_HEADER *
|
VARIABLE_HEADER *
|
||||||
GetVariableByIndex (
|
GetVariableByIndex (
|
||||||
IN VARIABLE_INDEX_TABLE *IndexTable,
|
IN VARIABLE_INDEX_TABLE *IndexTable,
|
||||||
IN UINT32 Count
|
IN UINT32 Count
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Record Variable in VariableIndex HOB.
|
||||||
|
|
||||||
|
Record Variable in VariableIndex HOB and update the length of variable index table.
|
||||||
|
|
||||||
|
@param IndexTable The pointer to variable index table.
|
||||||
|
@param Variable The pointer to the variable that will be recorded.
|
||||||
|
|
||||||
|
@retval VOID
|
||||||
|
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
VariableIndexTableUpdate (
|
VariableIndexTableUpdate (
|
||||||
IN OUT VARIABLE_INDEX_TABLE *IndexTable,
|
IN OUT VARIABLE_INDEX_TABLE *IndexTable,
|
||||||
|
|
|
@ -21,7 +21,15 @@ Abstract:
|
||||||
|
|
||||||
#include <Variable.h>
|
#include <Variable.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get one variable by the index count.
|
||||||
|
|
||||||
|
@param IndexTable The pointer to variable index table.
|
||||||
|
@param Count The index count of variable in index table.
|
||||||
|
|
||||||
|
@return The pointer to variable header indexed by count.
|
||||||
|
|
||||||
|
**/
|
||||||
VARIABLE_HEADER *
|
VARIABLE_HEADER *
|
||||||
GetVariableByIndex (
|
GetVariableByIndex (
|
||||||
IN VARIABLE_INDEX_TABLE *IndexTable,
|
IN VARIABLE_INDEX_TABLE *IndexTable,
|
||||||
|
@ -31,6 +39,17 @@ GetVariableByIndex (
|
||||||
return (VARIABLE_HEADER *) (UINTN) (IndexTable->Index[Count] + ((UINTN) IndexTable->StartPtr & 0xFFFF0000));
|
return (VARIABLE_HEADER *) (UINTN) (IndexTable->Index[Count] + ((UINTN) IndexTable->StartPtr & 0xFFFF0000));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Record Variable in VariableIndex HOB.
|
||||||
|
|
||||||
|
Record Variable in VariableIndex HOB and update the length of variable index table.
|
||||||
|
|
||||||
|
@param IndexTable The pointer to variable index table.
|
||||||
|
@param Variable The pointer to the variable that will be recorded.
|
||||||
|
|
||||||
|
@retval VOID
|
||||||
|
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
VariableIndexTableUpdate (
|
VariableIndexTableUpdate (
|
||||||
IN OUT VARIABLE_INDEX_TABLE *IndexTable,
|
IN OUT VARIABLE_INDEX_TABLE *IndexTable,
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ Returns:
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
RuntimeServiceQueryVariableInfo (
|
RuntimeServiceQueryVariableInfo (
|
||||||
|
@ -142,7 +141,6 @@ Returns:
|
||||||
mVariableModuleGlobal->FvbInstance
|
mVariableModuleGlobal->FvbInstance
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -196,9 +194,7 @@ Returns:
|
||||||
SystemTable->RuntimeServices->GetVariable = RuntimeServiceGetVariable;
|
SystemTable->RuntimeServices->GetVariable = RuntimeServiceGetVariable;
|
||||||
SystemTable->RuntimeServices->GetNextVariableName = RuntimeServiceGetNextVariableName;
|
SystemTable->RuntimeServices->GetNextVariableName = RuntimeServiceGetNextVariableName;
|
||||||
SystemTable->RuntimeServices->SetVariable = RuntimeServiceSetVariable;
|
SystemTable->RuntimeServices->SetVariable = RuntimeServiceSetVariable;
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
SystemTable->RuntimeServices->QueryVariableInfo = RuntimeServiceQueryVariableInfo;
|
SystemTable->RuntimeServices->QueryVariableInfo = RuntimeServiceQueryVariableInfo;
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now install the Variable Runtime Architectural Protocol on a new handle
|
// Now install the Variable Runtime Architectural Protocol on a new handle
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -89,7 +89,6 @@ Returns:
|
||||||
);
|
);
|
||||||
return ReturnVal;
|
return ReturnVal;
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
case EsalQueryVariableInfo:
|
case EsalQueryVariableInfo:
|
||||||
ReturnVal.Status = QueryVariableInfo (
|
ReturnVal.Status = QueryVariableInfo (
|
||||||
(UINT32) Arg2,
|
(UINT32) Arg2,
|
||||||
|
@ -100,7 +99,6 @@ Returns:
|
||||||
Global->FvbInstance
|
Global->FvbInstance
|
||||||
);
|
);
|
||||||
return ReturnVal;
|
return ReturnVal;
|
||||||
#endif
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;
|
ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;
|
||||||
|
@ -173,10 +171,8 @@ Returns:
|
||||||
EsalGetNextVariableName,
|
EsalGetNextVariableName,
|
||||||
EsalVariableCommonEntry,
|
EsalVariableCommonEntry,
|
||||||
EsalSetVariable,
|
EsalSetVariable,
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EsalVariableCommonEntry,
|
EsalVariableCommonEntry,
|
||||||
EsalQueryVariableInfo,
|
EsalQueryVariableInfo,
|
||||||
#endif
|
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Revision History
|
||||||
ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
|
ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is a temperary function which will be removed
|
// This is a temperary function which will be removed
|
||||||
// when EfiAcquireLock in UefiLib can handle the
|
// when EfiAcquireLock in UefiLib can handle the
|
||||||
// the call in UEFI Runtimer driver in RT phase.
|
// the call in UEFI Runtimer driver in RT phase.
|
||||||
//
|
//
|
||||||
|
@ -44,7 +44,7 @@ AcquireLockOnlyAtBootTime (
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is a temperary function which will be removed
|
// This is a temperary function which will be removed
|
||||||
// when EfiAcquireLock in UefiLib can handle the
|
// when EfiAcquireLock in UefiLib can handle the
|
||||||
// the call in UEFI Runtimer driver in RT phase.
|
// the call in UEFI Runtimer driver in RT phase.
|
||||||
//
|
//
|
||||||
|
@ -260,7 +260,7 @@ Returns:
|
||||||
|
|
||||||
EfiRaw Variable store status is raw
|
EfiRaw Variable store status is raw
|
||||||
EfiValid Variable store status is valid
|
EfiValid Variable store status is valid
|
||||||
EfiInvalid Variable store status is invalid
|
EfiInvalid Variable store status is invalid
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
|
@ -833,8 +833,8 @@ Returns:
|
||||||
goto Done;
|
goto Done;
|
||||||
} else if (!EFI_ERROR (Status) && Variable.Volatile && EfiAtRuntime()) {
|
} else if (!EFI_ERROR (Status) && Variable.Volatile && EfiAtRuntime()) {
|
||||||
//
|
//
|
||||||
// If EfiAtRuntime and the variable is Volatile and Runtime Access,
|
// If EfiAtRuntime and the variable is Volatile and Runtime Access,
|
||||||
// the volatile is ReadOnly, and SetVariable should be aborted and
|
// the volatile is ReadOnly, and SetVariable should be aborted and
|
||||||
// return EFI_WRITE_PROTECTED.
|
// return EFI_WRITE_PROTECTED.
|
||||||
//
|
//
|
||||||
Status = EFI_WRITE_PROTECTED;
|
Status = EFI_WRITE_PROTECTED;
|
||||||
|
@ -848,11 +848,11 @@ Returns:
|
||||||
goto Done;
|
goto Done;
|
||||||
} else if (Attributes == EFI_VARIABLE_NON_VOLATILE) {
|
} else if (Attributes == EFI_VARIABLE_NON_VOLATILE) {
|
||||||
//
|
//
|
||||||
// Make sure not only EFI_VARIABLE_NON_VOLATILE is set
|
// Make sure not only EFI_VARIABLE_NON_VOLATILE is set
|
||||||
//
|
//
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
goto Done;
|
goto Done;
|
||||||
} else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) ==
|
} else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) ==
|
||||||
EFI_VARIABLE_RUNTIME_ACCESS) {
|
EFI_VARIABLE_RUNTIME_ACCESS) {
|
||||||
//
|
//
|
||||||
// Make sure if runtime bit is set, boot service bit is set also
|
// Make sure if runtime bit is set, boot service bit is set also
|
||||||
|
@ -998,7 +998,7 @@ Returns:
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
Reclaimed = TRUE;
|
Reclaimed = TRUE;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -1084,7 +1084,7 @@ Returns:
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
Reclaimed = TRUE;
|
Reclaimed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1134,7 +1134,6 @@ Done:
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
QueryVariableInfo (
|
QueryVariableInfo (
|
||||||
|
@ -1153,11 +1152,11 @@ Routine Description:
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Attributes Attributes bitmask to specify the type of variables
|
Attributes Attributes bitmask to specify the type of variables
|
||||||
on which to return information.
|
on which to return information.
|
||||||
MaximumVariableStorageSize Pointer to the maximum size of the storage space available
|
MaximumVariableStorageSize Pointer to the maximum size of the storage space available
|
||||||
for the EFI variables associated with the attributes specified.
|
for the EFI variables associated with the attributes specified.
|
||||||
RemainingVariableStorageSize Pointer to the remaining size of the storage space available
|
RemainingVariableStorageSize Pointer to the remaining size of the storage space available
|
||||||
for the EFI variables associated with the attributes specified.
|
for the EFI variables associated with the attributes specified.
|
||||||
MaximumVariableSize Pointer to the maximum size of the individual EFI variables
|
MaximumVariableSize Pointer to the maximum size of the individual EFI variables
|
||||||
associated with the attributes specified.
|
associated with the attributes specified.
|
||||||
|
@ -1200,12 +1199,12 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);
|
AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);
|
||||||
|
|
||||||
if((Attributes & EFI_VARIABLE_NON_VOLATILE) == 0) {
|
if((Attributes & EFI_VARIABLE_NON_VOLATILE) == 0) {
|
||||||
//
|
//
|
||||||
// Query is Volatile related.
|
// Query is Volatile related.
|
||||||
//
|
//
|
||||||
VariableStoreHeader = (VARIABLE_STORE_HEADER *) ((UINTN) Global->VolatileVariableBase);
|
VariableStoreHeader = (VARIABLE_STORE_HEADER *) ((UINTN) Global->VolatileVariableBase);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Query is Non-Volatile related.
|
// Query is Non-Volatile related.
|
||||||
|
@ -1214,7 +1213,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now let's fill *MaximumVariableStorageSize *RemainingVariableStorageSize
|
// Now let's fill *MaximumVariableStorageSize *RemainingVariableStorageSize
|
||||||
// with the storage size (excluding the storage header size).
|
// with the storage size (excluding the storage header size).
|
||||||
//
|
//
|
||||||
*MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER);
|
*MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER);
|
||||||
|
@ -1239,15 +1238,15 @@ Returns:
|
||||||
|
|
||||||
if (EfiAtRuntime ()) {
|
if (EfiAtRuntime ()) {
|
||||||
//
|
//
|
||||||
// we don't take the state of the variables in mind
|
// we don't take the state of the variables in mind
|
||||||
// when calculating RemainingVariableStorageSize,
|
// when calculating RemainingVariableStorageSize,
|
||||||
// since the space occupied by variables not marked with
|
// since the space occupied by variables not marked with
|
||||||
// VAR_ADDED is not allowed to be reclaimed in Runtime.
|
// VAR_ADDED is not allowed to be reclaimed in Runtime.
|
||||||
//
|
//
|
||||||
*RemainingVariableStorageSize -= VariableSize;
|
*RemainingVariableStorageSize -= VariableSize;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Only care about Variables with State VAR_ADDED,because
|
// Only care about Variables with State VAR_ADDED,because
|
||||||
// the space not marked as VAR_ADDED is reclaimable now.
|
// the space not marked as VAR_ADDED is reclaimable now.
|
||||||
//
|
//
|
||||||
if (Variable->State == VAR_ADDED) {
|
if (Variable->State == VAR_ADDED) {
|
||||||
|
@ -1264,7 +1263,6 @@ Returns:
|
||||||
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -1283,9 +1281,9 @@ Arguments:
|
||||||
SystemTable - A pointer to the EFI System Table.
|
SystemTable - A pointer to the EFI System Table.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Status code.
|
Status code.
|
||||||
|
|
||||||
EFI_NOT_FOUND - Variable store area not found.
|
EFI_NOT_FOUND - Variable store area not found.
|
||||||
EFI_UNSUPPORTED - Currently only one non-volatile variable store is supported.
|
EFI_UNSUPPORTED - Currently only one non-volatile variable store is supported.
|
||||||
EFI_SUCCESS - Variable services successfully initialized.
|
EFI_SUCCESS - Variable services successfully initialized.
|
||||||
|
@ -1321,7 +1319,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, EFI_TPL_NOTIFY);
|
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, EFI_TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate memory for volatile variable store
|
// Allocate memory for volatile variable store
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
Variable.h
|
Variable.h
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -26,7 +26,7 @@ Abstract:
|
||||||
|
|
||||||
//
|
//
|
||||||
// BugBug: We need relcate the head file.
|
// BugBug: We need relcate the head file.
|
||||||
//
|
//
|
||||||
#include <Common/Variable.h>
|
#include <Common/Variable.h>
|
||||||
|
|
||||||
#if defined (MDE_CPU_IPF)
|
#if defined (MDE_CPU_IPF)
|
||||||
|
@ -144,7 +144,6 @@ SetVariable (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
QueryVariableInfo (
|
QueryVariableInfo (
|
||||||
|
@ -156,6 +155,5 @@ QueryVariableInfo (
|
||||||
IN UINT32 Instance
|
IN UINT32 Instance
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
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.
|
|
||||||
|
|
||||||
Module Name:
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name:
|
||||||
|
|
||||||
PlatformData.c
|
PlatformData.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Defined the platform specific device path which will be used by
|
Defined the platform specific device path which will be used by
|
||||||
platform Bbd to perform the platform policy connect.
|
platform Bbd to perform the platform policy connect.
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ NT_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath1 = {
|
||||||
},
|
},
|
||||||
gEndEntire
|
gEndEntire
|
||||||
};
|
};
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
NT_PLATFORM_GOP_DEVICE_PATH gGopDevicePath0 = {
|
NT_PLATFORM_GOP_DEVICE_PATH gGopDevicePath0 = {
|
||||||
{
|
{
|
||||||
HARDWARE_DEVICE_PATH,
|
HARDWARE_DEVICE_PATH,
|
||||||
|
@ -106,7 +106,6 @@ NT_PLATFORM_GOP_DEVICE_PATH gGopDevicePath1 = {
|
||||||
},
|
},
|
||||||
gEndEntire
|
gEndEntire
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Platform specific serial device path
|
// Platform specific serial device path
|
||||||
|
@ -204,7 +203,6 @@ BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = {
|
||||||
(EFI_DEVICE_PATH_PROTOCOL *) &gUgaDevicePath1,
|
(EFI_DEVICE_PATH_PROTOCOL *) &gUgaDevicePath1,
|
||||||
(CONSOLE_OUT | CONSOLE_IN)
|
(CONSOLE_OUT | CONSOLE_IN)
|
||||||
},
|
},
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
{
|
{
|
||||||
(EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath0,
|
(EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath0,
|
||||||
(CONSOLE_OUT | CONSOLE_IN)
|
(CONSOLE_OUT | CONSOLE_IN)
|
||||||
|
@ -213,7 +211,6 @@ BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = {
|
||||||
(EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath1,
|
(EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath1,
|
||||||
(CONSOLE_OUT | CONSOLE_IN)
|
(CONSOLE_OUT | CONSOLE_IN)
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
0
|
0
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*+++
|
/*+++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -121,9 +121,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtBusDriverBinding = {
|
||||||
static NT_PCD_ENTRY mPcdEnvironment[] = {
|
static NT_PCD_ENTRY mPcdEnvironment[] = {
|
||||||
PcdToken(PcdWinNtConsole), &gEfiWinNtConsoleGuid,
|
PcdToken(PcdWinNtConsole), &gEfiWinNtConsoleGuid,
|
||||||
PcdToken(PcdWinNtUga), &gEfiWinNtUgaGuid,
|
PcdToken(PcdWinNtUga), &gEfiWinNtUgaGuid,
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
PcdToken(PcdWinNtGop), &gEfiWinNtGopGuid,
|
PcdToken(PcdWinNtGop), &gEfiWinNtGopGuid,
|
||||||
#endif
|
|
||||||
PcdToken(PcdWinNtSerialPort), &gEfiWinNtSerialPortGuid,
|
PcdToken(PcdWinNtSerialPort), &gEfiWinNtSerialPortGuid,
|
||||||
PcdToken(PcdWinNtFileSystem), &gEfiWinNtFileSystemGuid,
|
PcdToken(PcdWinNtFileSystem), &gEfiWinNtFileSystemGuid,
|
||||||
PcdToken(PcdWinNtVirtualDisk), &gEfiWinNtVirtualDisksGuid,
|
PcdToken(PcdWinNtVirtualDisk), &gEfiWinNtVirtualDisksGuid,
|
||||||
|
|
|
@ -975,13 +975,6 @@ DEVICE_PATH_STRING_TABLE DevPathTable[] = {
|
||||||
MEDIA_DEVICE_PATH,
|
MEDIA_DEVICE_PATH,
|
||||||
MEDIA_PROTOCOL_DP,
|
MEDIA_PROTOCOL_DP,
|
||||||
DevPathMediaProtocol,
|
DevPathMediaProtocol,
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
MEDIA_DEVICE_PATH,
|
|
||||||
MEDIA_FV_FILEPATH_DP,
|
|
||||||
DevPathFvFilePath,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BBS_DEVICE_PATH,
|
BBS_DEVICE_PATH,
|
||||||
BBS_BBS_DP,
|
BBS_BBS_DP,
|
||||||
DevPathBssBss,
|
DevPathBssBss,
|
||||||
|
|
Loading…
Reference in New Issue