Ring3: Fixed bug in Ring3LocateHandleBuffer(),

added SysCallNames.
This commit is contained in:
Mikhail Krichanov 2024-03-25 14:35:19 +03:00
parent 5339dcdfe3
commit 2f5a386490
2 changed files with 40 additions and 1 deletions

View File

@ -594,7 +594,8 @@ Ring3LocateHandleBuffer (
Buffer
);
if ((NumberHandles != NULL) && (*NumberHandles != 0) && (Buffer != NULL) && (*Buffer != NULL)) {
if ((!EFI_ERROR (StatusBS)) && (NumberHandles != NULL) && (*NumberHandles != 0)
&& (Buffer != NULL) && (*Buffer != NULL)) {
PoolSize = *NumberHandles * sizeof (EFI_HANDLE *);
Status = CoreAllocatePool (EfiRing3MemoryType, PoolSize, &Pool);

View File

@ -18,6 +18,44 @@ typedef struct {
UINTN mRing3InterfacePointer = 0;
CHAR8 *SysCallNames[] = {
//
// BootServices
//
"SysCallReturnToCore", // Must always be zero for CoreBootServices.nasm.
"SysCallLocateProtocol",
"SysCallOpenProtocol",
"SysCallInstallMultipleProtocolInterfaces",
"SysCallCloseProtocol",
"SysCallHandleProtocol",
"SysCallAllocatePages",
"SysCallFreePages",
"SysCallRaiseTpl",
"SysCallRestoreTpl",
"SysCallLocateHandleBuffer",
"SysCallCalculateCrc32",
//
// RuntimeServices
//
"SysCallGetVariable",
//
// Protocols
//
"SysCallBlockIoReset",
"SysCallBlockIoRead",
"SysCallBlockIoWrite",
"SysCallBlockIoFlush",
"SysCallDiskIoRead",
"SysCallDiskIoWrite",
"SysCallUnicodeStriColl",
"SysCallUnicodeMetaiMatch",
"SysCallUnicodeStrLwr",
"SysCallUnicodeStrUpr",
"SysCallUnicodeFatToStr",
"SysCallUnicodeStrToFat",
"SysCallMax"
};
EFI_STATUS
EFIAPI
CallInstallMultipleProtocolInterfaces (