Skip to content

Commit d00e2bb

Browse files
authored
Add experimental extension to access firmware security version
Resolves: #211 Signed-off-by: Kumar, Sanil <sanil.kumar@intel.com>
1 parent a25a9ec commit d00e2bb

2 files changed

Lines changed: 98 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<%
2+
import re
3+
from templates import helper as th
4+
%><%
5+
OneApi=tags['$OneApi']
6+
s=tags['$s']
7+
S=s.upper()
8+
%>
9+
:orphan:
10+
11+
.. _ZES_experimental_firmware_security_version:
12+
13+
===========================
14+
Firmware Security Version
15+
===========================
16+
17+
API
18+
----
19+
20+
* Functions
21+
22+
* ${s}FirmwareGetSecurityVersionExp
23+
* ${s}FirmwareSetSecurityVersionExp
24+
25+
* Enumerations
26+
27+
* ${s}_firmware_security_exp_version_t
28+
29+
Security Version
30+
~~~~~~~~~~~~~~~~
31+
32+
This feature helps to prevent flashing of older firmware that have certain security vulnerabilities by using an hardware enforced anti-rollback scheme.
33+
User can flash a firmware image and sets its version as the security version number (SVN). Images with lower SVN cannot be applied to device with
34+
higher SVN for security considerations.
35+
36+
.. parsed-literal::
37+
38+
// Fetch current security version from the fuses
39+
char* version = allocate(version_size);
40+
${s}FirmwareGetSecurityVersionExp(hFirmware, &version);
41+
42+
// Set security version
43+
${s}FirmwareSetSecurityVersionExp(hFirmware);
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#
2+
# Copyright (C) 2024 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# See YaML.md for syntax definition
7+
#
8+
--- #----------------------------------------------------------------------------------
9+
type: header
10+
desc: "Intel $OneApi Level-Zero Sysman Extension APIs for firmware security version"
11+
version: "1.9"
12+
--- #----------------------------------------------------------------------------------
13+
type: macro
14+
desc: "Firmware security version"
15+
version: "1.9"
16+
name: $S_FIRMWARE_SECURITY_VERSION_EXP_NAME
17+
value: '"$XS_experimental_firmware_security_version"'
18+
--- #--------------------------------------------------------------------------
19+
type: enum
20+
desc: "Firmware security version Extension Version(s)"
21+
version: "1.9"
22+
name: $s_firmware_security_exp_version_t
23+
etors:
24+
- name: "1_0"
25+
value: "$X_MAKE_VERSION( 1, 0 )"
26+
desc: "version 1.0"
27+
--- #--------------------------------------------------------------------------
28+
type: function
29+
desc: "Get the firmware security version number of the currently running firmware"
30+
version: "1.9"
31+
class: $sFirmware
32+
name: GetSecurityVersionExp
33+
details:
34+
- "The application may call this function from simultaneous threads."
35+
- "The implementation of this function should be lock-free."
36+
params:
37+
- type: $s_firmware_handle_t
38+
name: hFirmware
39+
desc: "[in] Handle for the component."
40+
- type: char
41+
name: "version[$S_STRING_PROPERTY_SIZE]"
42+
desc: "[out] NULL terminated string value. The string \"unknown\" will be returned if this property cannot be determined."
43+
--- #--------------------------------------------------------------------------
44+
type: function
45+
desc: "Set the firmware security version number"
46+
version: "1.9"
47+
class: $sFirmware
48+
name: SetSecurityVersionExp
49+
details:
50+
- "The application may call this function from simultaneous threads."
51+
- "The implementation of this function should be lock-free."
52+
params:
53+
- type: $s_firmware_handle_t
54+
name: hFirmware
55+
desc: "[in] Handle for the component."

0 commit comments

Comments
 (0)