• 【无标题】BOOT SERVICES函数实现原型:


    //
    // DXE Core Module Variables
    //
    EFI_BOOT_SERVICES mBootServices = {
    {
    EFI_BOOT_SERVICES_SIGNATURE, // Signature
    EFI_BOOT_SERVICES_REVISION, // Revision
    sizeof (EFI_BOOT_SERVICES), // HeaderSize
    0, // CRC32
    0 // Reserved
    },
    (EFI_RAISE_TPL) CoreRaiseTpl, // RaiseTPL
    (EFI_RESTORE_TPL) CoreRestoreTpl, // RestoreTPL
    (EFI_ALLOCATE_PAGES) CoreAllocatePages, // AllocatePages
    (EFI_FREE_PAGES) CoreFreePages, // FreePages
    (EFI_GET_MEMORY_MAP) CoreGetMemoryMap, // GetMemoryMap
    (EFI_ALLOCATE_POOL) CoreAllocatePool, // AllocatePool
    (EFI_FREE_POOL) CoreFreePool, // FreePool
    (EFI_CREATE_EVENT) CoreCreateEvent, // CreateEvent
    (EFI_SET_TIMER) CoreSetTimer, // SetTimer
    (EFI_WAIT_FOR_EVENT) CoreWaitForEvent, // WaitForEvent
    (EFI_SIGNAL_EVENT) CoreSignalEvent, // SignalEvent
    (EFI_CLOSE_EVENT) CoreCloseEvent, // CloseEvent
    (EFI_CHECK_EVENT) CoreCheckEvent, // CheckEvent
    (EFI_INSTALL_PROTOCOL_INTERFACE) CoreInstallProtocolInterface, // InstallProtocolInterface
    (EFI_REINSTALL_PROTOCOL_INTERFACE) CoreReinstallProtocolInterface, // ReinstallProtocolInterface
    (EFI_UNINSTALL_PROTOCOL_INTERFACE) CoreUninstallProtocolInterface, // UninstallProtocolInterface
    (EFI_HANDLE_PROTOCOL) CoreHandleProtocol, // HandleProtocol
    (VOID *) NULL, // Reserved
    (EFI_REGISTER_PROTOCOL_NOTIFY) CoreRegisterProtocolNotify, // RegisterProtocolNotify
    (EFI_LOCATE_HANDLE) CoreLocateHandle, // LocateHandle
    (EFI_LOCATE_DEVICE_PATH) CoreLocateDevicePath, // LocateDevicePath
    (EFI_INSTALL_CONFIGURATION_TABLE) CoreInstallConfigurationTable, // InstallConfigurationTable
    (EFI_IMAGE_LOAD) CoreLoadImage, // LoadImage
    (EFI_IMAGE_START) CoreStartImage, // StartImage
    (EFI_EXIT) CoreExit, // Exit
    (EFI_IMAGE_UNLOAD) CoreUnloadImage, // UnloadImage
    (EFI_EXIT_BOOT_SERVICES) CoreExitBootServices, // ExitBootServices
    (EFI_GET_NEXT_MONOTONIC_COUNT) CoreEfiNotAvailableYetArg1, // GetNextMonotonicCount
    (EFI_STALL) CoreStall, // Stall
    (EFI_SET_WATCHDOG_TIMER) CoreSetWatchdogTimer, // SetWatchdogTimer
    (EFI_CONNECT_CONTROLLER) CoreConnectController, // ConnectController
    (EFI_DISCONNECT_CONTROLLER) CoreDisconnectController, // DisconnectController
    (EFI_OPEN_PROTOCOL) CoreOpenProtocol, // OpenProtocol
    (EFI_CLOSE_PROTOCOL) CoreCloseProtocol, // CloseProtocol
    (EFI_OPEN_PROTOCOL_INFORMATION) CoreOpenProtocolInformation, // OpenProtocolInformation
    (EFI_PROTOCOLS_PER_HANDLE) CoreProtocolsPerHandle, // ProtocolsPerHandle
    (EFI_LOCATE_HANDLE_BUFFER) CoreLocateHandleBuffer, // LocateHandleBuffer
    (EFI_LOCATE_PROTOCOL) CoreLocateProtocol, // LocateProtocol
    (EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreInstallMultipleProtocolInterfaces, // InstallMultipleProtocolInterfaces
    (EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces
    (EFI_CALCULATE_CRC32) CoreEfiNotAvailableYetArg3, // CalculateCrc32
    (EFI_COPY_MEM) CopyMem, // CopyMem
    (EFI_SET_MEM) SetMem, // SetMem
    (EFI_CREATE_EVENT_EX) CoreCreateEventEx // CreateEventEx
    };

    ///
    /// EFI Boot Services Table.
    ///
    typedef struct {
    ///
    /// The table header for the EFI Boot Services Table.
    ///
    EFI_TABLE_HEADER Hdr;

    //
    // Task Priority Services
    //
    EFI_RAISE_TPL RaiseTPL;
    EFI_RESTORE_TPL RestoreTPL;

    //
    // Memory Services
    //
    EFI_ALLOCATE_PAGES AllocatePages;
    EFI_FREE_PAGES FreePages;
    EFI_GET_MEMORY_MAP GetMemoryMap;
    EFI_ALLOCATE_POOL AllocatePool;
    EFI_FREE_POOL FreePool;

    //
    // Event & Timer Services
    //
    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 Services
    //
    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 Services
    //
    EFI_IMAGE_LOAD LoadImage;
    EFI_IMAGE_START StartImage;
    EFI_EXIT Exit;
    EFI_IMAGE_UNLOAD UnloadImage;
    EFI_EXIT_BOOT_SERVICES ExitBootServices;

    //
    // Miscellaneous Services
    //
    EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
    EFI_STALL Stall;
    EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;

    //
    // DriverSupport Services
    //
    EFI_CONNECT_CONTROLLER ConnectController;
    EFI_DISCONNECT_CONTROLLER DisconnectController;

    //
    // Open and Close Protocol Services
    //
    EFI_OPEN_PROTOCOL OpenProtocol;
    EFI_CLOSE_PROTOCOL CloseProtocol;
    EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;

    //
    // Library Services
    //
    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;

    //
    // 32-bit CRC Services
    //
    EFI_CALCULATE_CRC32 CalculateCrc32;

    //
    // Miscellaneous Services
    //
    EFI_COPY_MEM CopyMem;
    EFI_SET_MEM SetMem;
    EFI_CREATE_EVENT_EX CreateEventEx;
    } EFI_BOOT_SERVICES;

  • 相关阅读:
    无线Mesh自组网方案,CV5200无线模组应用,支持高清数据远距离传输
    LNMP及论坛搭建
    JAVA毕业设计HTML5“忆红楼梦之味”网站设计与实现计算机源码+lw文档+系统+调试部署+数据库
    aardio增加窗口透明度函数
    Linux信号掩码(signal mask)详解与相关例程
    springcloudalibaba架构(21):MQ的简介
    MASM32v11编程调用Process32First失败: 程序发出命令,但命令长度不正确
    【深入浅出 Yarn 架构与实现】3-1 Yarn Application 流程与编写方法
    时间类(Date和Time)
    vulnhub靶机DC9
  • 原文地址:https://blog.csdn.net/r77683962/article/details/126188880