TianoCore EDK2 master
Loading...
Searching...
No Matches
Diagnostics.c File Reference
#include <Uefi.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseLib.h>
#include "Mmc.h"

Go to the source code of this file.

Macros

#define DIAGNOSTIC_LOGBUFFER_MAXCHAR   1024
 

Functions

CHAR16 * DiagnosticInitLog (UINTN MaxBufferChar)
 
UINTN DiagnosticLog (CONST CHAR16 *Str)
 
VOID GenerateRandomBuffer (VOID *Buffer, UINTN BufferSize)
 
BOOLEAN CompareBuffer (VOID *BufferA, VOID *BufferB, UINTN BufferSize)
 
EFI_STATUS MmcReadWriteDataTest (MMC_HOST_INSTANCE *MmcHostInstance, EFI_LBA Lba, UINTN BufferSize)
 
EFI_STATUS EFIAPI MmcDriverDiagnosticsRunDiagnostics (IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType, IN CHAR8 *Language, OUT EFI_GUID **ErrorType, OUT UINTN *BufferSize, OUT CHAR16 **Buffer)
 

Variables

CHAR16 * mLogBuffer = NULL
 
UINTN mLogRemainChar = 0
 
GLOBAL_REMOVE_IF_UNREFERENCED EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gMmcDriverDiagnostics2
 

Detailed Description

Diagnostics Protocol implementation for the MMC DXE driver

Copyright (c) 2011-2020, ARM Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Diagnostics.c.

Macro Definition Documentation

◆ DIAGNOSTIC_LOGBUFFER_MAXCHAR

#define DIAGNOSTIC_LOGBUFFER_MAXCHAR   1024

Definition at line 18 of file Diagnostics.c.

Function Documentation

◆ CompareBuffer()

BOOLEAN CompareBuffer ( VOID *  BufferA,
VOID *  BufferB,
UINTN  BufferSize 
)

Definition at line 66 of file Diagnostics.c.

◆ DiagnosticInitLog()

CHAR16 * DiagnosticInitLog ( UINTN  MaxBufferChar)

Definition at line 24 of file Diagnostics.c.

◆ DiagnosticLog()

UINTN DiagnosticLog ( CONST CHAR16 *  Str)

Definition at line 34 of file Diagnostics.c.

◆ GenerateRandomBuffer()

VOID GenerateRandomBuffer ( VOID *  Buffer,
UINTN  BufferSize 
)

Definition at line 51 of file Diagnostics.c.

◆ MmcDriverDiagnosticsRunDiagnostics()

EFI_STATUS EFIAPI MmcDriverDiagnosticsRunDiagnostics ( IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_HANDLE ChildHandle  OPTIONAL,
IN EFI_DRIVER_DIAGNOSTIC_TYPE  DiagnosticType,
IN CHAR8 *  Language,
OUT EFI_GUID **  ErrorType,
OUT UINTN BufferSize,
OUT CHAR16 **  Buffer 
)

Definition at line 170 of file Diagnostics.c.

◆ MmcReadWriteDataTest()

EFI_STATUS MmcReadWriteDataTest ( MMC_HOST_INSTANCE MmcHostInstance,
EFI_LBA  Lba,
UINTN  BufferSize 
)

Definition at line 91 of file Diagnostics.c.

Variable Documentation

◆ gMmcDriverDiagnostics2

Initial value:
= {
(EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS)MmcDriverDiagnosticsRunDiagnostics,
"en"
}
EFI_STATUS(EFIAPI * EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS)(IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType, IN CHAR8 *Language, OUT EFI_GUID **ErrorType, OUT UINTN *BufferSize, OUT CHAR16 **Buffer)

Definition at line 256 of file Diagnostics.c.

◆ mLogBuffer

CHAR16* mLogBuffer = NULL

Definition at line 20 of file Diagnostics.c.

◆ mLogRemainChar

UINTN mLogRemainChar = 0

Definition at line 21 of file Diagnostics.c.