mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
BiosVideo: Minor cleanup
This commit is contained in:
parent
26868e9341
commit
0c7b33ac05
@ -61,64 +61,6 @@ EFI_GRAPHICS_OUTPUT_BLT_PIXEL mVgaColorToGraphicsOutputColor[] = {
|
||||
{0xff, 0xff, 0xff, 0x00} // WHITE
|
||||
};
|
||||
|
||||
/**
|
||||
Install child handle for a detect BiosVideo device and install related protocol
|
||||
into this handle, such as EFI_GRAPHIC_OUTPUT_PROTOCOL.
|
||||
|
||||
@param This Instance pointer of EFI_DRIVER_BINDING_PROTOCOL
|
||||
@param ParentHandle Parent's controller handle
|
||||
@param ParentPciIo Parent's EFI_PCI_IO_PROTOCOL instance pointer
|
||||
@param ParentLegacy8259 Parent's EFI_LEGACY_8259_PROTOCOL instance pointer
|
||||
@param ParentDevicePath Parent's BIOS Video controller device path
|
||||
@param RemainingDevicePath Remaining device path node instance for children.
|
||||
|
||||
@return whether success to create children handle for a VGA device and install
|
||||
related protocol into new children handle.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
BiosVideoChildHandleInstall (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ParentHandle,
|
||||
IN EFI_PCI_IO_PROTOCOL *ParentPciIo,
|
||||
IN EFI_LEGACY_8259_PROTOCOL *ParentLegacy8259,
|
||||
IN THUNK_CONTEXT *ThunkContext,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Deregister an video child handle and free resources
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Controller Video controller handle
|
||||
@param Handle Video child handle
|
||||
|
||||
@return EFI_STATUS
|
||||
|
||||
**/
|
||||
|
||||
EFI_STATUS
|
||||
BiosVideoChildHandleUninstall (
|
||||
EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
EFI_HANDLE Controller,
|
||||
EFI_HANDLE Handle
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Collect the resource from destroyed bios video device.
|
||||
|
||||
@param BiosVideoPrivate Video child device private data structure
|
||||
**/
|
||||
|
||||
VOID
|
||||
BiosVideoDeviceReleaseResource (
|
||||
BIOS_VIDEO_DEV *BiosVideoPrivate
|
||||
)
|
||||
;
|
||||
|
||||
/**
|
||||
Driver Entry Point.
|
||||
|
||||
|
||||
@ -225,6 +225,59 @@ BiosVideoDriverBindingStop (
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
/**
|
||||
Install child handle for a detect BiosVideo device and install related protocol
|
||||
into this handle, such as EFI_GRAPHIC_OUTPUT_PROTOCOL.
|
||||
|
||||
@param This Instance pointer of EFI_DRIVER_BINDING_PROTOCOL
|
||||
@param ParentHandle Parent's controller handle
|
||||
@param ParentPciIo Parent's EFI_PCI_IO_PROTOCOL instance pointer
|
||||
@param ParentLegacy8259 Parent's EFI_LEGACY_8259_PROTOCOL instance pointer
|
||||
@param ParentDevicePath Parent's BIOS Video controller device path
|
||||
@param RemainingDevicePath Remaining device path node instance for children.
|
||||
|
||||
@return whether success to create children handle for a VGA device and install
|
||||
related protocol into new children handle.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
BiosVideoChildHandleInstall (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ParentHandle,
|
||||
IN EFI_PCI_IO_PROTOCOL *ParentPciIo,
|
||||
IN EFI_LEGACY_8259_PROTOCOL *ParentLegacy8259,
|
||||
IN THUNK_CONTEXT *ThunkContext,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
/**
|
||||
Deregister an video child handle and free resources
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Controller Video controller handle
|
||||
@param Handle Video child handle
|
||||
|
||||
@return EFI_STATUS
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
BiosVideoChildHandleUninstall (
|
||||
EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
EFI_HANDLE Controller,
|
||||
EFI_HANDLE Handle
|
||||
);
|
||||
|
||||
/**
|
||||
Collect the resource from destroyed bios video device.
|
||||
|
||||
@param BiosVideoPrivate Video child device private data structure
|
||||
**/
|
||||
VOID
|
||||
BiosVideoDeviceReleaseResource (
|
||||
BIOS_VIDEO_DEV *BiosVideoPrivate
|
||||
);
|
||||
|
||||
//
|
||||
// Private worker functions
|
||||
//
|
||||
|
||||
@ -50,7 +50,3 @@
|
||||
gEfiLegacy8259ProtocolGuid
|
||||
gEfiEdidDiscoveredProtocolGuid
|
||||
gEfiEdidActiveProtocolGuid
|
||||
|
||||
[Guids]
|
||||
gEfiGlobalVariableGuid
|
||||
|
||||
|
||||
@ -14,8 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
#include "BiosVideo.h"
|
||||
|
||||
#define EFI_CPU_EFLAGS_IF 0x200
|
||||
|
||||
/**
|
||||
Initialize legacy environment for BIOS INI caller.
|
||||
|
||||
@ -116,8 +114,6 @@ InitializeInterruptRedirection (
|
||||
for (Index = 0; Index < 8; Index++) {
|
||||
IdtArray[ProtectedModeBaseVector + Index] = ((EFI_SEGMENT (LegacyRegionBase + Index * 4)) << 16) | (EFI_OFFSET (LegacyRegionBase + Index * 4));
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -218,5 +214,3 @@ LegacyBiosInt86 (
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -82,6 +82,7 @@
|
||||
#
|
||||
# Platform
|
||||
#
|
||||
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
|
||||
DuetBdsLib|OpenCorePkg/Library/DuetBdsLib/DuetBdsLib.inf
|
||||
TimerLib|OpenCorePkg/Library/DuetTimerLib/DuetTimerLib.inf
|
||||
#
|
||||
@ -89,8 +90,10 @@
|
||||
#
|
||||
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
|
||||
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
|
||||
FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
|
||||
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
||||
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
||||
MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
|
||||
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||
CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
|
||||
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user