OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ValidateNvram.c File Reference
#include "ocvalidate.h"
#include "OcValidateLib.h"
#include "NvramKeyInfo.h"

Go to the source code of this file.

Functions

STATIC BOOLEAN NvramAddHasDuplication (IN CONST VOID *PrimaryEntry, IN CONST VOID *SecondaryEntry)
 
STATIC BOOLEAN NvramDeleteHasDuplication (IN CONST VOID *PrimaryEntry, IN CONST VOID *SecondaryEntry)
 
STATIC BOOLEAN NvramLegacySchemaHasDuplication (IN CONST VOID *PrimaryEntry, IN CONST VOID *SecondaryEntry)
 
STATIC UINT32 ValidateNvramKeyByGuid (IN CONST CHAR8 *AsciiGuid, IN CONST OC_ASSOC *VariableMap)
 
STATIC UINT32 CheckNvramAdd (IN OC_GLOBAL_CONFIG *Config)
 
STATIC UINT32 CheckNvramDelete (IN OC_GLOBAL_CONFIG *Config)
 
STATIC UINT32 CheckNvramSchema (IN OC_GLOBAL_CONFIG *Config)
 
UINT32 CheckNvram (IN OC_GLOBAL_CONFIG *Config)
 

Detailed Description

Copyright (C) 2018, vit9696. All rights reserved. Copyright (C) 2020, PMheart. 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 ValidateNvram.c.

Function Documentation

◆ CheckNvram()

UINT32 CheckNvram ( IN OC_GLOBAL_CONFIG * Config)

Validate OpenCore Configuration NVRAM Section.

Parameters
[in]ConfigConfiguration structure.
Returns
Number of errors detected in NVRAM Section.

Definition at line 359 of file ValidateNvram.c.

◆ CheckNvramAdd()

STATIC UINT32 CheckNvramAdd ( IN OC_GLOBAL_CONFIG * Config)

Definition at line 163 of file ValidateNvram.c.

◆ CheckNvramDelete()

STATIC UINT32 CheckNvramDelete ( IN OC_GLOBAL_CONFIG * Config)

Definition at line 234 of file ValidateNvram.c.

◆ CheckNvramSchema()

STATIC UINT32 CheckNvramSchema ( IN OC_GLOBAL_CONFIG * Config)

Definition at line 297 of file ValidateNvram.c.

◆ NvramAddHasDuplication()

STATIC BOOLEAN NvramAddHasDuplication ( IN CONST VOID * PrimaryEntry,
IN CONST VOID * SecondaryEntry )

Callback function to verify whether one entry is duplicated in NVRAM->Add.

Parameters
[in]PrimaryEntryPrimary entry to be checked.
[in]SecondaryEntrySecondary entry to be checked.
Return values
TRUEIf PrimaryEntry and SecondaryEntry are duplicated.

Definition at line 30 of file ValidateNvram.c.

◆ NvramDeleteHasDuplication()

STATIC BOOLEAN NvramDeleteHasDuplication ( IN CONST VOID * PrimaryEntry,
IN CONST VOID * SecondaryEntry )

Callback function to verify whether one entry is duplicated in NVRAM->Delete.

Parameters
[in]PrimaryEntryPrimary entry to be checked.
[in]SecondaryEntrySecondary entry to be checked.
Return values
TRUEIf PrimaryEntry and SecondaryEntry are duplicated.

Definition at line 58 of file ValidateNvram.c.

◆ NvramLegacySchemaHasDuplication()

STATIC BOOLEAN NvramLegacySchemaHasDuplication ( IN CONST VOID * PrimaryEntry,
IN CONST VOID * SecondaryEntry )

Callback function to verify whether one entry is duplicated in NVRAM->LegacySchema.

Parameters
[in]PrimaryEntryPrimary entry to be checked.
[in]SecondaryEntrySecondary entry to be checked.
Return values
TRUEIf PrimaryEntry and SecondaryEntry are duplicated.

Definition at line 86 of file ValidateNvram.c.

◆ ValidateNvramKeyByGuid()

STATIC UINT32 ValidateNvramKeyByGuid ( IN CONST CHAR8 * AsciiGuid,
IN CONST OC_ASSOC * VariableMap )

Definition at line 106 of file ValidateNvram.c.