Software APIs
boot_svc_ownership_history.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_ownership_history.h"
6
8#include "sw/device/silicon_creator/lib/error.h"
9
10void boot_svc_ownership_history_req_init(
11 boot_svc_ownership_history_req_t *msg) {
12 boot_svc_header_finalize(kBootSvcOwnershipHistoryReqType,
13 sizeof(boot_svc_ownership_history_req_t),
14 &msg->header);
15}
16
17void boot_svc_ownership_history_res_init(
18 rom_error_t status, const uint32_t *history_digest,
19 boot_svc_ownership_history_res_t *msg) {
20 msg->status = status;
21 memcpy(msg->history_digest, history_digest, sizeof(msg->history_digest));
22 boot_svc_header_finalize(kBootSvcOwnershipHistoryResType,
23 sizeof(boot_svc_ownership_history_res_t),
24 &msg->header);
25}