90 lines
2.7 KiB
C
90 lines
2.7 KiB
C
/**
|
|
* PROJECT: ExectOS
|
|
* COPYRIGHT: See COPYING.md in the top level directory
|
|
* FILE: sdk/xtdk/bmtypes.h
|
|
* DESCRIPTION: XT Boot Manager structures definitions
|
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
|
*/
|
|
|
|
#ifndef __XTDK_BMTYPES_H
|
|
#define __XTDK_BMTYPES_H
|
|
|
|
#include <xttypes.h>
|
|
#include <xtuefi.h>
|
|
|
|
|
|
/* XTLDR directories */
|
|
#define XTBL_LOADER_DIRECTORY L"\\EFI\\BOOT\\XTLDR\\"
|
|
#define XTBL_THEMES_DIRECTORY L"\\EFI\\BOOT\\XTLDR\\THEMES\\"
|
|
|
|
/* XTLDR Debug Port type definitions */
|
|
#define XTBL_DEBUGPORT_SCREEN 1
|
|
#define XTBL_DEBUGPORT_SERIAL 2
|
|
|
|
/* Loader protocol routine pointers */
|
|
typedef EFI_STATUS (*PBL_ALLOCATE_PAGES)(IN UINT64 Size, OUT PEFI_PHYSICAL_ADDRESS Memory);
|
|
typedef EFI_STATUS (*PBL_ALLOCATE_POOL)(IN UINT_PTR Size, OUT PVOID *Memory);
|
|
typedef VOID (*PBL_CONSOLE_CLEAR_SCREEN)();
|
|
typedef VOID (*PBL_CONSOLE_DISABLE_CURSOR)();
|
|
typedef VOID (*PBL_CONSOLE_ENABLE_CURSOR)();
|
|
typedef VOID (*PBL_CONSOLE_PRINT)(IN PUINT16 Format, IN ...);
|
|
typedef VOID (*PBL_DEBUG_PRINT)(IN PUINT16 Format, IN ...);
|
|
typedef EFI_STATUS (*PBL_EXIT_BOOT_SERVICES)(IN UINT_PTR MapKey);
|
|
typedef EFI_STATUS (*PBL_FREE_PAGES)(IN UINT64 Size, IN EFI_PHYSICAL_ADDRESS Memory);
|
|
typedef EFI_STATUS (*PBL_FREE_POOL)(IN PVOID Memory);
|
|
typedef EFI_STATUS (*PBL_OPEN_XT_PROTOCOL)(OUT PVOID *ProtocolHandler, IN PEFI_GUID ProtocolGuid);
|
|
typedef VOID (*PBL_SLEEP_EXECUTION)(IN ULONG_PTR Milliseconds);
|
|
|
|
/* XTLDR Configuration data */
|
|
typedef struct _XTBL_CONFIGURATION
|
|
{
|
|
PWCHAR Default;
|
|
PWCHAR Debug;
|
|
ULONG DebugPort;
|
|
BOOLEAN Shell;
|
|
ULONG Timeout;
|
|
PWCHAR Tune;
|
|
} XTBL_CONFIGURATION, *PXTBL_CONFIGURATION;
|
|
|
|
/* XTLDR Status data */
|
|
typedef struct _XTBL_STATUS
|
|
{
|
|
BOOLEAN BootServices;
|
|
EFI_HANDLE ImageHandle;
|
|
PEFI_SYSTEM_TABLE SystemTable;
|
|
} XTBL_STATUS, *PXTBL_STATUS;
|
|
|
|
/* XTLDR Loader protocol */
|
|
typedef struct _XTBL_LOADER_PROTOCOL
|
|
{
|
|
struct
|
|
{
|
|
PBL_CONSOLE_CLEAR_SCREEN ClearScreen;
|
|
PBL_CONSOLE_DISABLE_CURSOR DisableCursor;
|
|
PBL_CONSOLE_ENABLE_CURSOR EnableCursor;
|
|
PBL_CONSOLE_PRINT Print;
|
|
} Console;
|
|
struct
|
|
{
|
|
PBL_DEBUG_PRINT Print;
|
|
} Debug;
|
|
struct
|
|
{
|
|
PBL_ALLOCATE_PAGES AllocatePages;
|
|
PBL_ALLOCATE_POOL AllocatePool;
|
|
PBL_FREE_PAGES FreePages;
|
|
PBL_FREE_POOL FreePool;
|
|
} Memory;
|
|
struct
|
|
{
|
|
PBL_OPEN_XT_PROTOCOL Open;
|
|
} Protocol;
|
|
struct
|
|
{
|
|
PBL_EXIT_BOOT_SERVICES ExitBootServices;
|
|
PBL_SLEEP_EXECUTION SleepExecution;
|
|
} Util;
|
|
} XTBL_LOADER_PROTOCOL, *PXTBL_LOADER_PROTOCOL;
|
|
|
|
#endif /* __XTDK_BMTYPES_H */
|