Migrate XTLDR modules to C++
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtldr/modules/framebuf/includes/framebuf.h
|
||||
* DESCRIPTION: EFI Framebuffer support module header file
|
||||
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||
*/
|
||||
|
||||
#ifndef __XTLDR_MODULES_FRAMEBUF_H
|
||||
#define __XTLDR_MODULES_FRAMEBUF_H
|
||||
|
||||
#include <xtblapi.h>
|
||||
#include <globals.h>
|
||||
|
||||
|
||||
/* FrameBuffer support protocol related routines forward references */
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
FbGetDisplayDriver(OUT PEFI_GRAPHICS_PROTOCOL Protocol);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
FbGetDisplayInformation(OUT PEFI_PHYSICAL_ADDRESS FrameBufferBase,
|
||||
OUT PULONG_PTR FrameBufferSize,
|
||||
OUT PXTBL_FRAMEBUFFER_MODE_INFORMATION ModeInfo);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
FbGetPreferredScreenResolution(OUT PUINT PreferredWidth,
|
||||
OUT PUINT PreferredHeight);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
FbInitializeDisplay();
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
FbSetScreenResolution(IN UINT Width,
|
||||
IN UINT Height);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
FbpFindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address);
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
FbpGetColorMask(IN UINT EfiMask,
|
||||
OUT PUSHORT ColorSize,
|
||||
OUT PUSHORT ColorShift);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
FbpGetModeInfo();
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
FbpGetPixelInformation(IN PEFI_PIXEL_BITMASK PixelsBitMask);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
XtLdrModuleMain(IN EFI_HANDLE ImageHandle,
|
||||
IN PEFI_SYSTEM_TABLE SystemTable);
|
||||
|
||||
#endif /* __XTLDR_MODULES_FRAMEBUF_H */
|
44
xtldr/modules/framebuf/includes/framebuf.hh
Normal file
44
xtldr/modules/framebuf/includes/framebuf.hh
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtldr/modules/framebuf/includes/framebuf.hh
|
||||
* DESCRIPTION: EFI Framebuffer support module header file
|
||||
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||
*/
|
||||
|
||||
#ifndef __XTLDR_MODULES_FRAMEBUF_HH
|
||||
#define __XTLDR_MODULES_FRAMEBUF_HH
|
||||
|
||||
#include <xtblapi.h>
|
||||
|
||||
|
||||
class FrameBuffer
|
||||
{
|
||||
private:
|
||||
STATIC XTBL_FRAMEBUFFER_INFORMATION DisplayInfo;
|
||||
STATIC XTBL_FRAMEBUFFER_PROTOCOL FbProtocol;
|
||||
STATIC PXTBL_LOADER_PROTOCOL XtLdrProtocol;
|
||||
|
||||
public:
|
||||
STATIC XTCDECL EFI_STATUS GetDisplayDriver(OUT PEFI_GRAPHICS_PROTOCOL Protocol);
|
||||
STATIC XTCDECL EFI_STATUS GetDisplayInformation(OUT PEFI_PHYSICAL_ADDRESS FrameBufferBase,
|
||||
OUT PULONG_PTR FrameBufferSize,
|
||||
OUT PXTBL_FRAMEBUFFER_MODE_INFORMATION ModeInfo);
|
||||
STATIC XTCDECL EFI_STATUS GetPreferredScreenResolution(OUT PUINT PreferredWidth,
|
||||
OUT PUINT PreferredHeight);
|
||||
STATIC XTCDECL EFI_STATUS InitializeDisplay();
|
||||
STATIC XTCDECL EFI_STATUS InitializeModule(IN EFI_HANDLE ImageHandle,
|
||||
IN PEFI_SYSTEM_TABLE SystemTable);
|
||||
STATIC XTCDECL EFI_STATUS SetScreenResolution(IN UINT Width,
|
||||
IN UINT Height);
|
||||
|
||||
private:
|
||||
STATIC EFI_STATUS FindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address);
|
||||
STATIC XTCDECL VOID GetColorMask(IN UINT EfiMask,
|
||||
OUT PUSHORT ColorSize,
|
||||
OUT PUSHORT ColorShift);
|
||||
STATIC XTCDECL EFI_STATUS GetModeInformation();
|
||||
STATIC XTCDECL VOID GetPixelInformation(IN PEFI_PIXEL_BITMASK PixelsBitMask);
|
||||
};
|
||||
|
||||
#endif /* __XTLDR_MODULES_FRAMEBUF_HH */
|
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtldr/modules/framebuf/includes/globals.h
|
||||
* DESCRIPTION: EFI Framebuffer module global variables
|
||||
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||
*/
|
||||
|
||||
#ifndef __XTLDR_MODULES_GLOBALS_H
|
||||
#define __XTLDR_MODULES_GLOBALS_H
|
||||
|
||||
#include <xtblapi.h>
|
||||
|
||||
|
||||
/* Framebuffer display information */
|
||||
EXTERN XTBL_FRAMEBUFFER_INFORMATION FbpDisplayInfo;
|
||||
|
||||
/* Framebuffer protocol handler */
|
||||
EXTERN XTBL_FRAMEBUFFER_PROTOCOL FbpFrameBufferProtocol;
|
||||
|
||||
/* XTLDR protocol handler */
|
||||
EXTERN PXTBL_LOADER_PROTOCOL XtLdrProtocol;
|
||||
|
||||
#endif /* __XTLDR_MODULES_GLOBALS_H */
|
Reference in New Issue
Block a user