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:
@ -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 ();
|
||||||
|
@ -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
|
||||||
@ -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,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
|
||||||
@ -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 = {
|
||||||
@ -184,23 +181,10 @@ EFI_RUNTIME_SERVICES mEfiRuntimeServicesTableTemplate = {
|
|||||||
(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 = {
|
||||||
@ -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
|
||||||
|
@ -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 }
|
||||||
};
|
};
|
||||||
@ -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,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
|
||||||
@ -55,25 +55,6 @@ UINT32 mEventTable[] = {
|
|||||||
//
|
//
|
||||||
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
|
|
||||||
//
|
|
||||||
// 0x00000203 ReadyToBootEvent.
|
|
||||||
//
|
|
||||||
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.
|
// 0x00000000 Generic event without a notification function.
|
||||||
// It can be signaled with SignalEvent() and checked with CheckEvent()
|
// It can be signaled with SignalEvent() and checked with CheckEvent()
|
||||||
@ -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 (
|
||||||
@ -375,26 +329,6 @@ Returns:
|
|||||||
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
|
||||||
//
|
//
|
||||||
|
@ -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,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
|
||||||
@ -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
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
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
|
||||||
@ -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,
|
||||||
@ -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)) {
|
||||||
//
|
//
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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
|
||||||
|
@ -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 (
|
||||||
@ -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 (
|
||||||
|
@ -622,7 +622,6 @@ Done:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
QueryVariableInfo (
|
QueryVariableInfo (
|
||||||
@ -747,7 +746,6 @@ Returns:
|
|||||||
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -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,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
|
||||||
@ -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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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,
|
||||||
@ -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,7 +414,6 @@ 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++) {
|
||||||
@ -429,7 +421,6 @@ Returns:
|
|||||||
}
|
}
|
||||||
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
|
||||||
|
@ -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
|
||||||
@ -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
|
||||||
)
|
)
|
||||||
|
@ -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,
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1134,7 +1134,6 @@ Done:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
QueryVariableInfo (
|
QueryVariableInfo (
|
||||||
@ -1264,7 +1263,6 @@ Returns:
|
|||||||
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -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,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
|
||||||
@ -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,
|
||||||
|
Reference in New Issue
Block a user