lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type33.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: LGPL-2.1-or-later
3 *
4 * This file is part of lazybios.
5 *
6 * lazybios is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * lazybios is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with lazybios. If not, see <https://www.gnu.org/licenses/>.
18 */
19/**
20 * @file type33.h
21 * @brief Public API for SMBIOS Type 33 64-Bit Memory Error Information.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE33_H
26#define LAZYBIOS_TYPE33_H
27
28#ifndef LAZYBIOS_SHARED_API_H
29#define LAZYBIOS_TYPE_HEADER_ONLY
30#include "lazybios/lazybios.h"
31#undef LAZYBIOS_TYPE_HEADER_ONLY
32#endif
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/** @brief Availability metadata for SMBIOS Type 33 fields. */
48
49/**
50 * @brief Decoded forms of the Type 33 encoded fields.
51 *
52 * Each member holds the decoded form of the raw field it is named for.
53 * Consult the matching `field_status` member before using one.
54 */
55typedef struct {
56 const char* error_granularity;
57 const char* error_operation;
58 const char* error_type;
60
61/**
62 * @brief Parsed SMBIOS Type 33 64-Bit Memory Error Information.
63 * @ingroup api_type33
64 */
78
79/**
80 * @brief A parsed set of SMBIOS Type 33 structures.
81 * @ingroup api_type33
82 */
87
88/** @addtogroup api_type33
89 * @{
90 */
91
92/**
93 * @brief Parses all SMBIOS Type 33 structures.
94 * @param DMIData Raw DMI table container to parse.
95 * @return Newly allocated set, empty when the table holds no Type 33 structure,
96 * or NULL when the arguments are unusable or an allocation fails.
97 */
99
100/**
101 * @brief Releases a parsed set of SMBIOS Type 33 structures.
102 * @param Type33 Set to release; may be NULL.
103 */
105
106/** @} */
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif
void lazybiosFreeType33(lazybiosType33Array_t *Type33)
Releases a parsed set of SMBIOS Type 33 structures.
LAZYBIOS_WARN_UNUSED lazybiosType33Array_t * lazybiosGetType33(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 33 structures.
Public API for lazybios. Include this and nothing else.
uint8_t lazybiosFieldStatus_t
Storage for one field's availability.
Definition lazybios.h:115
#define LAZYBIOS_WARN_UNUSED
Expands to nothing on compilers without a return-value check.
Definition lazybios.h:150
Owns raw DMI table data and its parsed SMBIOS entry point.
Definition lazybios.h:218
A parsed set of SMBIOS Type 33 structures.
Definition type33.h:83
lazybiosType33_t * entries
Definition type33.h:84
Decoded forms of the Type 33 encoded fields.
Definition type33.h:55
const char * error_type
Definition type33.h:58
const char * error_operation
Definition type33.h:57
const char * error_granularity
Definition type33.h:56
Availability metadata for SMBIOS Type 33 fields.
Definition type33.h:39
lazybiosFieldStatus_t error_granularity
Definition type33.h:41
lazybiosFieldStatus_t vendor_syndrome
Definition type33.h:43
lazybiosFieldStatus_t error_operation
Definition type33.h:42
lazybiosFieldStatus_t device_error_address
Definition type33.h:45
lazybiosFieldStatus_t error_type
Definition type33.h:40
lazybiosFieldStatus_t memory_array_error_address
Definition type33.h:44
lazybiosFieldStatus_t error_resolution
Definition type33.h:46
Parsed SMBIOS Type 33 64-Bit Memory Error Information.
Definition type33.h:65
uint32_t error_resolution
Definition type33.h:74
lazybiosType33FieldStatus_t field_status
Definition type33.h:76
uint16_t handle
Definition type33.h:66
uint8_t error_operation
Definition type33.h:70
lazybiosType33Decoded_t decoded
Definition type33.h:75
uint64_t device_error_address
Definition type33.h:73
uint32_t vendor_syndrome
Definition type33.h:71
uint8_t length
Definition type33.h:67
uint8_t error_type
Definition type33.h:68
uint64_t memory_array_error_address
Definition type33.h:72
uint8_t error_granularity
Definition type33.h:69