// ST - pointer to the EFI system table
//
EFI_SYSTEM_TABLE *ST;
typedef struct _EFI_SYSTEM_TABLE {
EFI_TABLE_HEADER Hdr;
CHAR16 *FirmwareVendor;
UINT32 FirmwareRevision;
EFI_HANDLE ConsoleInHandle;
EFI_SIMPLE_TEXT_IN_PROTOCOL *ConIn;
EFI_HANDLE ConsoleOutHandle;
EFI_SIMPLE_TEXT_OUT_PROTOCOL *ConOut;
EFI_HANDLE StandardErrorHandle;
EFI_SIMPLE_TEXT_OUT_PROTOCOL *StdErr;
EFI_RUNTIME_SERVICES *RuntimeServices;
EFI_BOOT_SERVICES *BootServices;
UINTN NumberOfTableEntries;
EFI_CONFIGURATION_TABLE *ConfigurationTable;
} EFI_SYSTEM_TABLE;
//
// BS - pointer to the boot services table
//
EFI_BOOT_SERVICES *BS;
typedef struct {
EFI_TABLE_HEADER Hdr;
//
// Task priority functions
//
EFI_RAISE_TPL RaiseTPL;
EFI_RESTORE_TPL RestoreTPL;
//
// Memory functions
//
EFI_ALLOCATE_PAGES AllocatePages;
EFI_FREE_PAGES FreePages;
EFI_GET_MEMORY_MAP GetMemoryMap;
EFI_ALLOCATE_POOL AllocatePool;
EFI_FREE_POOL FreePool;
//
// Event & timer functions
//
EFI_CREATE_EVENT CreateEvent;
EFI_SET_TIMER SetTimer;
EFI_WAIT_FOR_EVENT WaitForEvent;
EFI_SIGNAL_EVENT SignalEvent;
EFI_CLOSE_EVENT CloseEvent;
EFI_CHECK_EVENT CheckEvent;
//
// Protocol handler functions
//
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
EFI_HANDLE_PROTOCOL HandleProtocol;
VOID *Reserved;
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
EFI_LOCATE_HANDLE LocateHandle;
EFI_LOCATE_DEVICE_PATH LocateDevicePath;
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
//
// Image functions
//
EFI_IMAGE_LOAD LoadImage;
EFI_IMAGE_START StartImage;
EFI_EXIT Exit;
EFI_IMAGE_UNLOAD UnloadImage;
EFI_EXIT_BOOT_SERVICES ExitBootServices;
//
// Misc functions
//
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
EFI_STALL Stall;
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
//
// ////////////////////////////////////////////////////
// EFI 1.1 Services
//////////////////////////////////////////////////////
//
// DriverSupport Services
//
EFI_CONNECT_CONTROLLER ConnectController;
EFI_DISCONNECT_CONTROLLER DisconnectController;
//
// Added Open and Close protocol for the new driver model
//
EFI_OPEN_PROTOCOL OpenProtocol;
EFI_CLOSE_PROTOCOL CloseProtocol;
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
//
// Added new services to EFI 1.1 as Lib to reduce code size.
//
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
EFI_LOCATE_PROTOCOL LocateProtocol;
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
//
// CRC32 services
//
EFI_CALCULATE_CRC32 CalculateCrc32;
//
// Memory Utility Services
//
EFI_COPY_MEM CopyMem;
EFI_SET_MEM SetMem;
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
//
// UEFI 2.0 Extension to the table
//
EFI_CREATE_EVENT_EX CreateEventEx;
#endif
} EFI_BOOT_SERVICES;
//
// SI - pointer to the shell interface table
//
EFI_SHELL_INTERFACE *SI;
typedef struct _EFI_SHELL_INTERFACE {
//
// Handle back to original image handle & image info
//
EFI_HANDLE ImageHandle;
EFI_LOADED_IMAGE_PROTOCOL *Info;
//
// Parsed arg list
//
CHAR16 **Argv;
UINTN Argc;
//
// Storage for file redirection args after parsing
//
CHAR16 **RedirArgv;
UINTN RedirArgc;
//
// A file style handle for console io
//
EFI_FILE_HANDLE StdIn;
EFI_FILE_HANDLE StdOut;
EFI_FILE_HANDLE StdErr;
EFI_SHELL_ARG_INFO *ArgInfo;
BOOLEAN EchoOn;
} EFI_SHELL_INTERFACE;
//
// SI - pointer to the shell environment table
//
EFI_SHELL_ENVIRONMENT *SE;
typedef struct {
SHELLENV_EXECUTE Execute; // Execute a command line
SHELLENV_GET_ENV GetEnv; // Get an environment variable
SHELLENV_GET_MAP GetMap; // Get mapping tables
SHELLENV_ADD_CMD AddCmd; // Add an internal command handler
SHELLENV_ADD_PROT AddProt; // Add protocol info handler
SHELLENV_GET_PROT GetProt; // Get the protocol ID
SHELLENV_CUR_DIR CurDir;
SHELLENV_FILE_META_ARG FileMetaArg;
SHELLENV_FREE_FILE_LIST FreeFileList;
//
// The following services are only used by the shell itself
//
SHELLENV_NEW_SHELL NewShell;
SHELLENV_BATCH_IS_ACTIVE BatchIsActive;
SHELLENV_FREE_RESOURCES FreeResources;
} EFI_SHELL_ENVIRONMENT;
//
// SI - pointer to the shell environment2 table
//
EFI_SHELL_ENVIRONMENT2 *SE2;
typedef struct {
SHELLENV_EXECUTE Execute; // Execute a command line
SHELLENV_GET_ENV GetEnv; // Get an environment variable
SHELLENV_GET_MAP GetMap; // Get mapping tables
SHELLENV_ADD_CMD AddCmd; // Add an internal command handler
SHELLENV_ADD_PROT AddProt; // Add protocol info handler
SHELLENV_GET_PROT GetProt; // Get the protocol ID
SHELLENV_CUR_DIR CurDir;
SHELLENV_FILE_META_ARG FileMetaArg;
SHELLENV_FREE_FILE_LIST FreeFileList;
//
// The following services are only used by the shell itself
//
SHELLENV_NEW_SHELL NewShell;
SHELLENV_BATCH_IS_ACTIVE BatchIsActive;
SHELLENV_FREE_RESOURCES FreeResources;
//
// Major Version grows if shell environment interface has been changes
//
EFI_GUID SESGuid;
UINT32 MajorVersion;
UINT32 MinorVersion;
SHELLENV_ENABLE_PAGE_BREAK EnablePageBreak;
SHELLENV_DISABLE_PAGE_BREAK DisablePageBreak;
SHELLENV_GET_PAGE_BREAK GetPageBreak;
SHELLENV_SET_KEY_FILTER SetKeyFilter;
SHELLENV_GET_KEY_FILTER GetKeyFilter;
SHELLENV_GET_EXECUTION_BREAK GetExecutionBreak;
SHELLENV_INCREMENT_SHELL_NESTING_LEVEL IncrementShellNestingLevel;
SHELLENV_DECREMENT_SHELL_NESTING_LEVEL DecrementShellNestingLevel;
SHELLENV_IS_ROOT_SHELL IsRootShell;
SHELLENV_CLOSE_CONSOLE_PROXY CloseConsoleProxy;
HANDLE_ENUMERATOR HandleEnumerator;
PROTOCOL_INFO_ENUMERATOR ProtocolInfoEnumerator;
GET_DEVICE_NAME GetDeviceName;
GET_SHELL_MODE GetShellMode;
SHELLENV_NAME_TO_PATH NameToPath;
SHELLENV_GET_FS_NAME GetFsName;
SHELLENV_FILE_META_ARG_NO_WILDCARD FileMetaArgNoWildCard;
SHELLENV_DEL_DUP_FILE DelDupFileArg;
SHELLENV_GET_FS_DEVICE_PATH GetFsDevicePath;
} EFI_SHELL_ENVIRONMENT2;
沒有留言:
張貼留言