edkiigluedxeruntimedriverlib.h

来自「EFI BIOS是Intel提出的下一代的BIOS标准。这里上传的Edk源代码是」· C头文件 代码 · 共 448 行 · 第 1/2 页

H
448
字号
/*++

Copyright (c) 2004 - 2006, Intel Corporation                                                         
All rights reserved. This program and the accompanying materials                          
are licensed and made available under the terms and conditions of the BSD License         
which accompanies this distribution.  The full text of the license may be found at        
http://opensource.org/licenses/bsd-license.php                                            
                                                                                          
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.  
  

Module Name:

  EdkIIGlueDxeRuntimeDriverLib.h
  
Abstract: 

  Library that abstracts runtime services

--*/

#ifndef __EDKII_GLUE_DXE_RUNTIME_DRIVER_LIB_H__
#define __EDKII_GLUE_DXE_RUNTIME_DRIVER_LIB_H__

#if (EFI_SPECIFICATION_VERSION < 0x00020000)

typedef struct {
  EFI_GUID  CapsuleGuid;
  UINT32    HeaderSize;
  UINT32    Flags;
  UINT32    CapsuleImageSize;
} UEFI_CAPSULE_HEADER;

#endif

extern const EFI_EVENT_NOTIFY _gDriverExitBootServicesEvent[];

extern const EFI_EVENT_NOTIFY _gDriverSetVirtualAddressMapEvent[];

/**
  Check to see if the execute context is in Runtime phase or not.

  @param  None.

  @retval  TRUE  The driver is in SMM.
  @retval  FALSE The driver is not in SMM.

**/
BOOLEAN
EFIAPI
EfiAtRuntime (
  VOID 
  );

/**
  Check to see if the SetVirtualAddressMsp() is invoked or not.

  @retval  TRUE  SetVirtualAddressMsp() has been called.
  @retval  FALSE SetVirtualAddressMsp() has not been called.

**/
BOOLEAN
EFIAPI
EfiGoneVirtual (
  VOID 
  );

/**
  Return current time and date information, and time-keeping 
  capabilities of hardware platform.

  @param  Time         A pointer to storage to receive a snapshot of the current time.
  @param  Capabilities An optional pointer to a buffer to receive the real time clock device’s
                       capabilities.
 
  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to e3xecute the function.

**/
EFI_STATUS
EFIAPI
EfiGetTime (
  OUT EFI_TIME                    *Time,
  OUT EFI_TIME_CAPABILITIES       *Capabilities
  );

/**
  Set current time and date information.

  @param  Time         A pointer to cache of time setting.
 
  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to execute the function.

**/
EFI_STATUS
EFIAPI
EfiSetTime (
  IN EFI_TIME                   *Time
  );

/**
  Return current wakeup alarm clock setting.

  @param  Enabled Indicate if the alarm clock is enabled or disabled.
  @param  Pending Indicate if the alarm signal is pending and requires acknowledgement.
  @param  Time    Current alarm clock setting.
 
  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to e3xecute the function.

**/
EFI_STATUS
EFIAPI
EfiGetWakeupTime (
  OUT BOOLEAN                     *Enabled,
  OUT BOOLEAN                     *Pending,
  OUT EFI_TIME                    *Time
  );

/**
  Set current wakeup alarm clock.

  @param  Enable Enable or disable current alarm clock..
  @param  Time   Point to alarm clock setting.
 
  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to e3xecute the function.

**/
EFI_STATUS
EFIAPI
EfiSetWakeupTime (
  IN BOOLEAN                      Enable,
  IN EFI_TIME                     *Time
  );

/**
  Return value of variable.

  @param  VariableName the name of the vendor's variable, it's a 
                       Null-Terminated Unicode String
  @param  VendorGuid   Unify identifier for vendor.
  @param  Attributes   Point to memory location to return the attributes of variable. If the point 
                       is NULL, the parameter would be ignored.
  @param  DataSize     As input, point to the maxinum size of return Data-Buffer.
                       As output, point to the actual size of the returned Data-Buffer.
  @param  Data         Point to return Data-Buffer.
 
  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to e3xecute the function.

**/
EFI_STATUS
EFIAPI
EfiGetVariable (
  IN      CHAR16                   *VariableName,
  IN      EFI_GUID                 *VendorGuid,
  OUT     UINT32                   *Attributes,
  IN OUT  UINTN                    *DataSize,
  OUT     VOID                     *Data
  )
;

/**
  Enumerates variable's name.

  @param  VariableNameSize As input, point to maxinum size of variable name.
                           As output, point to actual size of varaible name.
  @param  VariableName     As input, supplies the last VariableName that was returned by 
                           GetNextVariableName().
                           As output, returns the name of variable. The name 
                           string is Null-Terminated Unicode string.
  @param  VendorGuid       As input, supplies the last VendorGuid that was returned by 
                           GetNextVriableName().
                           As output, returns the VendorGuid of the current variable.
 
  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to e3xecute the function.

**/
EFI_STATUS
EFIAPI
EfiGetNextVariableName (
  IN OUT UINTN                    *VariableNameSize,
  IN OUT CHAR16                   *VariableName,
  IN OUT EFI_GUID                 *VendorGuid
  );

/**
  Sets value of variable.

  @param  VariableName the name of the vendor's variable, it's a 
                       Null-Terminated Unicode String
  @param  VendorGuid   Unify identifier for vendor.
  @param  Attributes   Point to memory location to return the attributes of variable. If the point 
                       is NULL, the parameter would be ignored.
  @param  DataSize     The size in bytes of Data-Buffer.
  @param  Data         Point to the content of the variable.

  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to e3xecute the function.

**/
EFI_STATUS
EFIAPI
EfiSetVariable (
  IN CHAR16                       *VariableName,
  IN EFI_GUID                     *VendorGuid,
  IN UINT32                       Attributes,
  IN UINTN                        DataSize,
  IN VOID                         *Data
  );

/**
  Returns the next high 32 bits of platform's monotonic counter.

  @param  HighCount Pointer to returned value.

  @retval  EFI_SUCCESS  Success to execute the function.
  @retval  !EFI_SUCCESS Failed to e3xecute the function.

**/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?