Store additional information about module, for further processing
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 44s
Builds / ExectOS (i686) (push) Successful in 27s

This commit is contained in:
Rafal Kupiec 2024-01-04 15:47:25 +01:00
parent 17049d7e82
commit 2734245d06
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 10 additions and 0 deletions

View File

@ -163,6 +163,10 @@ typedef struct _XTBL_MODULE_INFO
PWCHAR ModuleName;
PWCHAR ModuleDescription;
LIST_ENTRY Dependencies;
PVOID ModuleBase;
UINT64 ModuleSize;
UINT32 Revision;
PEFI_IMAGE_UNLOAD UnloadModule;
} XTBL_MODULE_INFO, *PXTBL_MODULE_INFO;
/* XTLDR Status data */

View File

@ -257,6 +257,12 @@ BlLoadModule(IN PWCHAR ModuleName)
EfiSystemTable->BootServices->CloseProtocol(LoadedImage, &LIPGuid, LoadedImage, NULL);
}
/* Save module information */
ModuleInfo->ModuleBase = LoadedImage->ImageBase;
ModuleInfo->ModuleSize = LoadedImage->ImageSize;
ModuleInfo->Revision = LoadedImage->Revision;
ModuleInfo->UnloadModule = LoadedImage->Unload;
/* Close loaded image protocol */
EfiSystemTable->BootServices->CloseProtocol(LoadedImage, &LIPGuid, LoadedImage, NULL);