X-Git-Url: https://code.delx.au/refind/blobdiff_plain/4cd24d129d16bd6c49d19c84757f769f09a53236..118f257faaeeebd8c0b56821d70fcfe8f36289a6:/refind/global.h diff --git a/refind/global.h b/refind/global.h index 2cd9b37..f501bb7 100644 --- a/refind/global.h +++ b/refind/global.h @@ -45,8 +45,13 @@ #ifndef __GLOBAL_H_ #define __GLOBAL_H_ -#include "efi.h" -#include "efilib.h" +#ifdef __MAKEWITH_GNUEFI +#include +#include +#else +#include "../include/tiano_includes.h" +#include "../EfiLib/GenericBdsLib.h" +#endif #include "libeg.h" @@ -62,10 +67,41 @@ #define TAG_EXIT (7) #define TAG_SHELL (8) #define TAG_GPTSYNC (9) +#define TAG_LEGACY_NON_MAC (10) #define NUM_TOOLS (9) #define NUM_SCAN_OPTIONS 10 +#define DEFAULT_ICONS_DIR L"icons" + +// OS bit codes; used in GlobalConfig.GraphicsOn +#define GRAPHICS_FOR_OSX 1 +#define GRAPHICS_FOR_LINUX 2 +#define GRAPHICS_FOR_ELILO 4 +#define GRAPHICS_FOR_GRUB 8 +#define GRAPHICS_FOR_WINDOWS 16 + +// Type of legacy (BIOS) boot support detected +#define LEGACY_TYPE_NONE 0 +#define LEGACY_TYPE_MAC 1 +#define LEGACY_TYPE_UEFI 2 + +#ifndef __MAKEWITH_TIANO +// +// define BBS Device Types +// +#define BBS_FLOPPY 0x01 +#define BBS_HARDDISK 0x02 +#define BBS_CDROM 0x03 +#define BBS_PCMCIA 0x04 +#define BBS_USB 0x05 +#define BBS_EMBED_NETWORK 0x06 +#define BBS_BEV_DEVICE 0x80 +#define BBS_UNKNOWN 0xff +#endif + +//TODO: may want to make this configurable via config file +//static UINT16 SupportedLegacyDevices[] = {BBS_HARDDISK, BBS_CDROM, BBS_USB}; // // global definitions @@ -144,10 +180,13 @@ typedef struct { } LOADER_ENTRY; typedef struct { - REFIT_MENU_ENTRY me; - REFIT_VOLUME *Volume; - CHAR16 *LoadOptions; - BOOLEAN Enabled; + REFIT_MENU_ENTRY me; + REFIT_VOLUME *Volume; +#ifdef __MAKEWITH_TIANO + BDS_COMMON_OPTION *BdsOption; +#endif // __MAKEWITH_TIANO + CHAR16 *LoadOptions; + BOOLEAN Enabled; } LEGACY_ENTRY; typedef struct { @@ -158,12 +197,16 @@ typedef struct { UINTN Timeout; UINTN HideUIFlags; UINTN MaxTags; // max. number of OS entries to show simultaneously in graphics mode + UINTN GraphicsFor; + UINTN LegacyType; CHAR16 *BannerFileName; CHAR16 *SelectionSmallFileName; CHAR16 *SelectionBigFileName; CHAR16 *DefaultSelection; CHAR16 *AlsoScan; + CHAR16 *DontScan; CHAR16 *DriverDirs; + CHAR16 *IconsDir; UINTN ShowTools[NUM_TOOLS]; CHAR8 ScanFor[NUM_SCAN_OPTIONS]; // codes of types of loaders for which to scan } REFIT_CONFIG; @@ -182,6 +225,9 @@ extern UINTN VolumesCount; extern REFIT_CONFIG GlobalConfig; +extern EFI_GUID gEfiLegacyBootProtocolGuid; +extern EFI_GUID gEfiGlobalVariableGuid; + LOADER_ENTRY *InitializeLoaderEntry(IN LOADER_ENTRY *Entry); REFIT_MENU_SCREEN *InitializeSubScreen(IN LOADER_ENTRY *Entry); VOID GenerateSubScreen(LOADER_ENTRY *Entry, IN REFIT_VOLUME *Volume);