mirror of https://github.com/acidanthera/audk.git
Ring3: Added SysCallCloseProtocol.
This commit is contained in:
parent
466a371a78
commit
26e4559889
|
@ -441,7 +441,13 @@ Ring3CloseProtocol (
|
|||
IN EFI_HANDLE ControllerHandle
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
return SysCall (
|
||||
SysCallCloseProtocol,
|
||||
UserHandle,
|
||||
Protocol,
|
||||
AgentHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
|
|
|
@ -288,7 +288,7 @@ CallBootService (
|
|||
|
||||
case SysCallFreePool:
|
||||
//
|
||||
// Argument 1: IN VOID *Buffer
|
||||
// Argument 1: VOID *Buffer
|
||||
//
|
||||
DisableSMAP ();
|
||||
Status = gBS->FreePool (
|
||||
|
@ -298,6 +298,32 @@ CallBootService (
|
|||
|
||||
return Status;
|
||||
|
||||
case SysCallCloseProtocol:
|
||||
//
|
||||
// Argument 1: EFI_HANDLE CoreUserHandle
|
||||
// Argument 2: EFI_GUID *Protocol
|
||||
// Argument 3: EFI_HANDLE CoreAgentHandle
|
||||
// Argument 4: EFI_HANDLE CoreControllerHandle
|
||||
//
|
||||
DisableSMAP ();
|
||||
Status = FindGuid ((EFI_GUID *)CoreRbp->Argument2, &CoreProtocol, &MemoryCoreSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
EnableSMAP ();
|
||||
return Status;
|
||||
}
|
||||
|
||||
Argument4 = UserRsp->Arguments[4];
|
||||
EnableSMAP ();
|
||||
|
||||
Status = gBS->CloseProtocol (
|
||||
(EFI_HANDLE)CoreRbp->Argument1,
|
||||
CoreProtocol,
|
||||
(EFI_HANDLE)CoreRbp->Argument3,
|
||||
(EFI_HANDLE)Argument4
|
||||
);
|
||||
|
||||
return Status;
|
||||
|
||||
case SysCallBlockIoReset:
|
||||
//
|
||||
// Argument 1: EFI_BLOCK_IO_PROTOCOL *This
|
||||
|
|
|
@ -2020,6 +2020,7 @@ typedef enum {
|
|||
SysCallInstallMultipleProtocolInterfaces,
|
||||
SysCallAllocatePool,
|
||||
SysCallFreePool,
|
||||
SysCallCloseProtocol,
|
||||
//
|
||||
// Protocols
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue