TianoCore EDK2 master
Loading...
Searching...
No Matches
DebugLibDetect.c File Reference
#include <Base.h>
#include "DebugLibDetect.h"

Go to the source code of this file.

Functions

RETURN_STATUS EFIAPI PlatformDebugLibIoPortConstructor (VOID)
 
BOOLEAN EFIAPI PlatformDebugLibIoPortFound (VOID)
 

Variables

STATIC BOOLEAN mDebugIoPortChecked = FALSE
 
STATIC BOOLEAN mDebugIoPortFound = FALSE
 

Detailed Description

Detection code for hypervisor debug port. Non-SEC instance, caches the result of detection.

Copyright (c) 2017, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DebugLibDetect.c.

Function Documentation

◆ PlatformDebugLibIoPortConstructor()

RETURN_STATUS EFIAPI PlatformDebugLibIoPortConstructor ( VOID  )

This constructor function must not do anything.

Some modules consuming this library instance, such as the DXE Core, invoke the DEBUG() macro before they explicitly call ProcessLibraryConstructorList(). Therefore the auto-generated call from ProcessLibraryConstructorList() to this constructor function may be preceded by some calls to PlatformDebugLibIoPortFound() below. Hence PlatformDebugLibIoPortFound() must not rely on anything this constructor could set up.

Return values
RETURN_SUCCESSThe constructor always returns RETURN_SUCCESS.

Definition at line 39 of file DebugLibDetect.c.

◆ PlatformDebugLibIoPortFound()

BOOLEAN EFIAPI PlatformDebugLibIoPortFound ( VOID  )

At the first call, check if the debug I/O port device is present, and cache the result for later use. At subsequent calls, return the cached result.

Return values
TRUEif the debug I/O port device was detected.
FALSEotherwise

Definition at line 56 of file DebugLibDetect.c.

Variable Documentation

◆ mDebugIoPortChecked

STATIC BOOLEAN mDebugIoPortChecked = FALSE

Definition at line 16 of file DebugLibDetect.c.

◆ mDebugIoPortFound

STATIC BOOLEAN mDebugIoPortFound = FALSE

Definition at line 21 of file DebugLibDetect.c.