alder_lake_bios/Intel/AlderLake/AlderLakeChipsetPkg/Library/SmmOemSvcChipsetLib/OemSvcVbiosHookCallBack.c

55 lines
2.0 KiB
C

/** @file
This file offers interface to get OemInt15VbiosFunctionHook array and do additional
VbiosHookCallBack function that are list on OemInt15VbiosFunctionHook array.
;******************************************************************************
;* Copyright (c) 2014, Insyde Software Corporation. All Rights Reserved.
;*
;* You may not reproduce, distribute, publish, display, perform, modify, adapt,
;* transmit, broadcast, present, recite, release, license or otherwise exploit
;* any part of this publication in any form, by any means, without the prior
;* written permission of Insyde Software Corporation.
;*
;******************************************************************************
*/
#include <Library/SmmOemSvcChipsetLib.h>
/**
This function provides an interface to do additional VbiosHookCallBack function that are list on
OemInt15VbiosFunctionHook array.
@param[in] Int15FunNum Int15 function number.
@param[in out] CpuRegs The structure containing CPU Registers (AX, BX, CX, DX etc.).
@param[in] Context Context.
@retval EFI_UNSUPPORTED Returns unsupported by default.
@retval EFI_MEDIA_CHANGED Alter the Configuration Parameter or hook code.
@retval EFI_SUCCESS The function performs the same operation as caller.
The caller will skip the specified behavior and assuming
that it has been handled completely by this function.
*/
EFI_STATUS
OemSvcVbiosHookCallBack (
IN UINT32 Int15FunNum,
IN OUT EFI_IA32_REGISTER_SET *CpuRegs,
IN VOID *Context
)
{
/*++
Todo:
Add project specific code in here.
--*/
#if 0 // Sample Implementation
switch (Int15FunNum) {
case INT15_HOOK_OOOO :
CpuRegs->X.CX |= 0;
CpuRegs->X.AX &= ~(0xffff);
CpuRegs->X.AX |= 0x005F; // Function supported and successful
break;
default:
break;
}
#endif
return EFI_UNSUPPORTED;
}