diff --git a/Legacy/BootPlatform/BiosVideo/BiosVideo.c b/Legacy/BootPlatform/BiosVideo/BiosVideo.c index 0d406130dd007410b324336a996d677105c33230..64c1b157807574cb778c94facbebd772aa816a56 100644 --- a/Legacy/BootPlatform/BiosVideo/BiosVideo.c +++ b/Legacy/BootPlatform/BiosVideo/BiosVideo.c @@ -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. diff --git a/Legacy/BootPlatform/BiosVideo/BiosVideo.h b/Legacy/BootPlatform/BiosVideo/BiosVideo.h index f2fa0153ea8d04e6b891c1c2db6566a4fd87f3ab..3caf16f8776bb7a2d143f53ff439c1c51c31c32b 100644 --- a/Legacy/BootPlatform/BiosVideo/BiosVideo.h +++ b/Legacy/BootPlatform/BiosVideo/BiosVideo.h @@ -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 // diff --git a/Legacy/BootPlatform/BiosVideo/BiosVideo.inf b/Legacy/BootPlatform/BiosVideo/BiosVideo.inf index 403eb3e865fac3e94dd7289dff27e951e4a101bf..f6f95e12fb81bd7951e46314ab03c821cde821c5 100644 --- a/Legacy/BootPlatform/BiosVideo/BiosVideo.inf +++ b/Legacy/BootPlatform/BiosVideo/BiosVideo.inf @@ -50,7 +50,3 @@ gEfiLegacy8259ProtocolGuid gEfiEdidDiscoveredProtocolGuid gEfiEdidActiveProtocolGuid - - [Guids] - gEfiGlobalVariableGuid - diff --git a/Legacy/BootPlatform/BiosVideo/LegacyBiosThunk.c b/Legacy/BootPlatform/BiosVideo/LegacyBiosThunk.c index fa134f88472735174ae28530773f37a77a456dd3..752824cf07ab989f657fc28c20ad179e108ccced 100644 --- a/Legacy/BootPlatform/BiosVideo/LegacyBiosThunk.c +++ b/Legacy/BootPlatform/BiosVideo/LegacyBiosThunk.c @@ -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; } - - diff --git a/OpenDuetPkg.dsc b/OpenDuetPkg.dsc index e24d85034fef9b88556e1feb6dea60487cc6c961..0c0191d4b9146a1b8294f90618279e2d4b6b1610 100644 --- a/OpenDuetPkg.dsc +++ b/OpenDuetPkg.dsc @@ -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