Lines Matching +full:- +full:section
1 # Extending `cper-generator` With OEM Sections
3 Much like `cper-parse`, `cper-generator` supports the addition of arbitrary OEM
4 sections as extensions. This document details how an OEM section generator could
5 be added to the `cper-generate` project from a stock version.
7 ## Creating a Section Generator
10 a function predefinition inside `sections/gen-section.h` as shown below, and
12 sake of example, we will create a generator for a fake OEM section
15 _sections/gen-section.h_:
18 //Section generator function predefinitions.
25 _sections/gen-myvendor.c_:
29 * Functions for generating pseudo-random MyVendor error sections.
42 ## Adding a Section GUID
44 To identify our section for parsing, we must define a section GUID within
46 OEM extension to `cper-parse`, so if you've already done this, you do not need
69 Now that a GUID and generation function are created for our section, we can
70 finally add it to the generator definitions for `cper-generate`. To do this,
71 edit `sections/gen-section.c` and add your generator definition to the
73 used for generating your section, and must contain **no spaces** (this is also
78 * Describes available section generators to the CPER generator.
82 #include <libcper/generator/sections/gen-section.h>
86 {&gEfiCxlVirtualSwitchErrorSectionGuid, "cxlcomponent-vswitch", generate_section_cxl_component},
87 {&gEfiCxlMldPortErrorSectionGuid, "cxlcomponent-mld", generate_section_cxl_component},
92 Once this is complete, after a `cmake .` and `make`, your section should be
93 available to generate through `cper-generate` and `libcper-generate`.