OpenCore  1.0.4
OpenCore Bootloader
1.0.4
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OcLog.h File Reference
#include <Uefi.h>
#include <Protocol/SimpleFileSystem.h>

Go to the source code of this file.

Data Structures

struct  OC_LOG_PROTOCOL_
 

Macros

#define OC_LOG_REVISION   0x01000B
 
#define OC_LOG_ENABLE   BIT0
 
#define OC_LOG_CONSOLE   BIT1
 
#define OC_LOG_DATA_HUB   BIT2
 
#define OC_LOG_SERIAL   BIT3
 
#define OC_LOG_VARIABLE   BIT4
 
#define OC_LOG_NONVOLATILE   BIT5
 
#define OC_LOG_FILE   BIT6
 
#define OC_LOG_UNSAFE   BIT7
 
#define OC_LOG_ALL_BITS
 
#define OC_LOG_PREFIX_CHAR_MAX   8U
 
#define OC_LOG_PROTOCOL_GUID
 

Typedefs

typedef UINT32 OC_LOG_OPTIONS
 
typedef struct OC_LOG_PROTOCOL_ OC_LOG_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * OC_LOG_ADD_ENTRY) (IN OC_LOG_PROTOCOL *This, IN UINTN ErrorLevel, IN CONST CHAR8 *FormatString, IN VA_LIST Marker)
 
typedef EFI_STATUS(EFIAPI * OC_LOG_RESET_TIMERS) (IN OC_LOG_PROTOCOL *This)
 
typedef EFI_STATUS(EFIAPI * OC_LOG_GET_LOG) (IN OC_LOG_PROTOCOL *This, OUT CHAR8 **OcLogBuffer)
 
typedef EFI_STATUS(EFIAPI * OC_LOG_SAVE_LOG) (IN OC_LOG_PROTOCOL *This, IN UINT32 NonVolatile OPTIONAL, IN EFI_DEVICE_PATH_PROTOCOL *FilePath OPTIONAL)
 

Variables

EFI_GUID gOcLogProtocolGuid
 A global variable storing the GUID of the OC_LOG_PROTOCOL.
 

Detailed Description

Copyright (C) 2016, The HermitCrabs Lab. All rights reserved.

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.

Definition in file OcLog.h.

Macro Definition Documentation

◆ OC_LOG_ALL_BITS

#define OC_LOG_ALL_BITS
Value:
(\
#define OC_LOG_FILE
Definition OcLog.h:35
#define OC_LOG_UNSAFE
Definition OcLog.h:36
#define OC_LOG_SERIAL
Definition OcLog.h:32
#define OC_LOG_VARIABLE
Definition OcLog.h:33
#define OC_LOG_CONSOLE
Definition OcLog.h:30
#define OC_LOG_DATA_HUB
Definition OcLog.h:31
#define OC_LOG_NONVOLATILE
Definition OcLog.h:34
#define OC_LOG_ENABLE
Definition OcLog.h:29

Definition at line 37 of file OcLog.h.

◆ OC_LOG_CONSOLE

#define OC_LOG_CONSOLE   BIT1

Definition at line 30 of file OcLog.h.

◆ OC_LOG_DATA_HUB

#define OC_LOG_DATA_HUB   BIT2

Definition at line 31 of file OcLog.h.

◆ OC_LOG_ENABLE

#define OC_LOG_ENABLE   BIT0

The defines for the log flags.

Definition at line 29 of file OcLog.h.

◆ OC_LOG_FILE

#define OC_LOG_FILE   BIT6

Definition at line 35 of file OcLog.h.

◆ OC_LOG_NONVOLATILE

#define OC_LOG_NONVOLATILE   BIT5

Definition at line 34 of file OcLog.h.

◆ OC_LOG_PREFIX_CHAR_MAX

#define OC_LOG_PREFIX_CHAR_MAX   8U

Maximum possible number of characters of log prefix including colon.

Definition at line 46 of file OcLog.h.

◆ OC_LOG_PROTOCOL_GUID

#define OC_LOG_PROTOCOL_GUID
Value:
{ 0xDBB6008F, 0x89E4, 0x4272, \
{ 0x98, 0x81, 0xCE, 0x3A, 0xFD, 0x97, 0x24, 0xD0 } }

The GUID of the OC_LOG_PROTOCOL.

Definition at line 53 of file OcLog.h.

◆ OC_LOG_REVISION

#define OC_LOG_REVISION   0x01000B

Current supported log protocol revision.

Definition at line 24 of file OcLog.h.

◆ OC_LOG_SERIAL

#define OC_LOG_SERIAL   BIT3

Definition at line 32 of file OcLog.h.

◆ OC_LOG_UNSAFE

#define OC_LOG_UNSAFE   BIT7

Definition at line 36 of file OcLog.h.

◆ OC_LOG_VARIABLE

#define OC_LOG_VARIABLE   BIT4

Definition at line 33 of file OcLog.h.

Typedef Documentation

◆ OC_LOG_ADD_ENTRY

typedef EFI_STATUS(EFIAPI * OC_LOG_ADD_ENTRY) (IN OC_LOG_PROTOCOL *This, IN UINTN ErrorLevel, IN CONST CHAR8 *FormatString, IN VA_LIST Marker)

Add an entry to the log buffer

Parameters
[in]ThisThis protocol.
[in]ErrorLevelDebug level.
[in]FormatStringString containing the output format.
[in]MarkerAddress of the VA_ARGS marker.
Return values
EFI_SUCCESSThe entry was successfully added.

Definition at line 73 of file OcLog.h.

◆ OC_LOG_GET_LOG

typedef EFI_STATUS(EFIAPI * OC_LOG_GET_LOG) (IN OC_LOG_PROTOCOL *This, OUT CHAR8 **OcLogBuffer)

Retrieve pointer to the log buffer

Parameters
[in]ThisThis protocol.
[in]OcLogBufferAddress to store the buffer pointer.
Return values
EFI_SUCCESSThe timers were reset successfully.

Definition at line 103 of file OcLog.h.

◆ OC_LOG_OPTIONS

typedef UINT32 OC_LOG_OPTIONS

Definition at line 48 of file OcLog.h.

◆ OC_LOG_PROTOCOL

The forward declaration for the protocol for the OC_LOG_PROTOCOL.

Definition at line 60 of file OcLog.h.

◆ OC_LOG_RESET_TIMERS

typedef EFI_STATUS(EFIAPI * OC_LOG_RESET_TIMERS) (IN OC_LOG_PROTOCOL *This)

Reset the internal timers

Parameters
[in]ThisThis protocol.
Return values
EFI_SUCCESSThe timers were reset successfully.

Definition at line 89 of file OcLog.h.

◆ OC_LOG_SAVE_LOG

typedef EFI_STATUS(EFIAPI * OC_LOG_SAVE_LOG) (IN OC_LOG_PROTOCOL *This, IN UINT32 NonVolatile OPTIONAL, IN EFI_DEVICE_PATH_PROTOCOL *FilePath OPTIONAL)

Save the current log

Parameters
[in]ThisThis protocol.
[in]NonVolatileVariable.
[in]FilePathFilepath to save the log. OPTIONAL
Return values
EFI_SUCCESSThe log was saved successfully.

Definition at line 119 of file OcLog.h.

Variable Documentation

◆ gOcLogProtocolGuid

EFI_GUID gOcLogProtocolGuid
extern

A global variable storing the GUID of the OC_LOG_PROTOCOL.