Software APIs
boot_svc_min_bl0_sec_ver.c
1// Copyright lowRISC contributors (OpenTitan project).
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5#include "sw/device/silicon_creator/lib/boot_svc/boot_svc_min_bl0_sec_ver.h"
6
7#include "sw/device/silicon_creator/lib/error.h"
8
9void boot_svc_min_bl0_sec_ver_req_init(uint32_t min_bl0_sec_ver,
10 boot_svc_min_bl0_sec_ver_req_t *msg) {
11 msg->min_bl0_sec_ver = min_bl0_sec_ver;
12 boot_svc_header_finalize(kBootSvcMinBl0SecVerReqType,
13 sizeof(boot_svc_min_bl0_sec_ver_req_t),
14 &msg->header);
15}
16
17void boot_svc_min_bl0_sec_ver_res_init(uint32_t min_bl0_sec_ver,
18 rom_error_t status,
19 boot_svc_min_bl0_sec_ver_res_t *msg) {
20 msg->min_bl0_sec_ver = min_bl0_sec_ver;
21 msg->status = status;
22 boot_svc_header_finalize(kBootSvcMinBl0SecVerResType,
23 sizeof(boot_svc_min_bl0_sec_ver_res_t),
24 &msg->header);
25}