Software APIs
boot_svc_enter_rescue.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_enter_rescue.h"
6
7#include "sw/device/silicon_creator/lib/error.h"
8
9void boot_svc_enter_rescue_req_init(uint32_t skip_once,
10 boot_svc_enter_rescue_req_t *msg) {
11 msg->skip_once = skip_once;
12 boot_svc_header_finalize(kBootSvcEnterRescueReqType,
13 sizeof(boot_svc_enter_rescue_req_t), &msg->header);
14}
15
16void boot_svc_enter_rescue_res_init(rom_error_t status,
17 boot_svc_enter_rescue_res_t *msg) {
18 msg->status = status;
19 boot_svc_header_finalize(kBootSvcEnterRescueResType,
20 sizeof(boot_svc_enter_rescue_res_t), &msg->header);
21}