iPXE
version.c File Reference

Version number. More...

#include <wchar.h>
#include <ipxe/features.h>
#include <ipxe/version.h>
#include <ipxe/sbat.h>
#include <config/general.h>
#include <config/branding.h>

Go to the source code of this file.

Macros

#define WSTRING(string)
 Create wide-character version of string.
#define _WSTRING(string)
#define SBAT_IPXE
 SBAT upstream iPXE line.
#define SBAT_PRODUCT   ""
 SBAT local build line.
#define SBAT_DATA   SBAT_HEADER "" SBAT_IPXE "" SBAT_PRODUCT
 SBAT data.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
 FEATURE_VERSION (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
 Version number feature.
unsigned long ABS_SYMBOL (_build_timestamp)
 Build timestamp (generated by linker)
unsigned long ABS_SYMBOL (_build_id)
 Build ID (generated by linker)

Variables

unsigned long build_timestamp = ABS_VALUE_INIT ( _build_timestamp )
 Build timestamp.
unsigned long build_id = ABS_VALUE_INIT ( _build_id )
 Build ID.
const int product_major_version = VERSION_MAJOR
 Product major version.
const int product_minor_version = VERSION_MINOR
 Product minor version.
const char product_version [] = VERSION
 Product version string.
const char product_name [] = PRODUCT_NAME
 Product name string.
const char product_short_name [] = PRODUCT_SHORT_NAME
 Product short name string.
const char build_name [] = BUILD_NAME
 Build name string.
const wchar_t product_wversion [] = WSTRING ( VERSION )
 Wide-character product version string.
const wchar_t product_wname [] = WSTRING ( PRODUCT_NAME )
 Wide-character product name string.
const wchar_t product_short_wname [] = WSTRING ( PRODUCT_SHORT_NAME )
 Wide-character product short name string.
const wchar_t build_wname [] = WSTRING ( BUILD_NAME )
 Wide-character build name string.
const char build_name_prefix [] = BUILD_NAME
 Copy of build name string within ".prefix".
const char sbat[sizeof(SBAT_DATA) - 1] __sbat = SBAT_DATA
 SBAT data (without any NUL terminator)

Detailed Description

Version number.

Definition in file version.c.

Macro Definition Documentation

◆ WSTRING

#define WSTRING ( string)
Value:
_WSTRING ( string )
#define _WSTRING(string)
Definition version.c:47

Create wide-character version of string.

Parameters
stringString
Return values
wstringWide-character version of string

Definition at line 46 of file version.c.

◆ _WSTRING

#define _WSTRING ( string)
Value:
L ## string

Definition at line 47 of file version.c.

◆ SBAT_IPXE

#define SBAT_IPXE
Value:
"iPXE", BUILD_NAME, VERSION, "https://ipxe.org" )
#define IPXE_SBAT_GENERATION
Upstream security generation.
Definition sbat.h:51
#define SBAT_LINE(name, generation, vendor, package, version, uri)
A single line within an SBAT CSV file.
Definition sbat.h:35

SBAT upstream iPXE line.

This line represents the security generation of the upstream codebase from which this build is derived.

Definition at line 103 of file version.c.

103#define SBAT_IPXE \
104 SBAT_LINE ( "ipxe", IPXE_SBAT_GENERATION, \
105 "iPXE", BUILD_NAME, VERSION, "https://ipxe.org" )

◆ SBAT_PRODUCT

#define SBAT_PRODUCT   ""

SBAT local build line.

This line states the security generation of the local build, which may include non-default features or non-upstreamed modifications.

Definition at line 118 of file version.c.

◆ SBAT_DATA

#define SBAT_DATA   SBAT_HEADER "" SBAT_IPXE "" SBAT_PRODUCT

SBAT data.

Definition at line 122 of file version.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ FEATURE_VERSION()

FEATURE_VERSION ( VERSION_MAJOR ,
VERSION_MINOR ,
VERSION_PATCH  )

Version number feature.

◆ ABS_SYMBOL() [1/2]

unsigned long ABS_SYMBOL ( _build_timestamp )
extern

Build timestamp (generated by linker)

◆ ABS_SYMBOL() [2/2]

unsigned long ABS_SYMBOL ( _build_id )
extern

Build ID (generated by linker)

Variable Documentation

◆ build_timestamp

unsigned long build_timestamp = ABS_VALUE_INIT ( _build_timestamp )

Build timestamp.

Definition at line 59 of file version.c.

Referenced by efi_driver_install(), and FILE_SECBOOT().

◆ build_id

unsigned long build_id = ABS_VALUE_INIT ( _build_id )

Build ID.

Definition at line 62 of file version.c.

Referenced by efi_stack_cookie(), FILE_SECBOOT(), and xsigo_xds_complete().

◆ product_major_version

const int product_major_version = VERSION_MAJOR

Product major version.

Definition at line 65 of file version.c.

Referenced by FILE_SECBOOT(), intelxl_admin_driver(), and nbi_boot32().

◆ product_minor_version

const int product_minor_version = VERSION_MINOR

Product minor version.

Definition at line 68 of file version.c.

Referenced by FILE_SECBOOT(), intelxl_admin_driver(), and nbi_boot32().

◆ product_version

const char product_version[] = VERSION

◆ product_name

const char product_name[] = PRODUCT_NAME

Product name string.

Definition at line 74 of file version.c.

Referenced by efi_snp_hii_package_list(), ena_probe(), FILE_SECBOOT(), and intelxl_admin_driver().

◆ product_short_name

const char product_short_name[] = PRODUCT_SHORT_NAME

◆ build_name

const char build_name[] = BUILD_NAME

Build name string.

Definition at line 80 of file version.c.

Referenced by FILE_SECBOOT().

◆ product_wversion

const wchar_t product_wversion[] = WSTRING ( VERSION )

Wide-character product version string.

Definition at line 83 of file version.c.

Referenced by FILE_SECBOOT().

◆ product_wname

const wchar_t product_wname[] = WSTRING ( PRODUCT_NAME )

Wide-character product name string.

Definition at line 86 of file version.c.

Referenced by efi_driver_name(), and FILE_SECBOOT().

◆ product_short_wname

const wchar_t product_short_wname[] = WSTRING ( PRODUCT_SHORT_NAME )

Wide-character product short name string.

Definition at line 89 of file version.c.

Referenced by FILE_SECBOOT().

◆ build_wname

const wchar_t build_wname[] = WSTRING ( BUILD_NAME )

Wide-character build name string.

Definition at line 92 of file version.c.

Referenced by efi_driver_name(), and FILE_SECBOOT().

◆ build_name_prefix

const char build_name_prefix[] = BUILD_NAME

Copy of build name string within ".prefix".

Definition at line 95 of file version.c.

◆ __sbat

const char sbat [ sizeof ( SBAT_DATA ) - 1 ] __sbat = SBAT_DATA

SBAT data (without any NUL terminator)

Definition at line 125 of file version.c.