Software APIs
boot_svc_next_boot_bl0_slot.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_next_boot_bl0_slot.h"
6 
7 #include "sw/device/silicon_creator/lib/error.h"
8 
9 void boot_svc_next_boot_bl0_slot_req_init(
10  uint32_t primary_slot, uint32_t next_slot,
12  msg->next_bl0_slot = next_slot;
13  msg->primary_bl0_slot = primary_slot;
14  boot_svc_header_finalize(kBootSvcNextBl0SlotReqType,
16  &msg->header);
17 }
18 
19 void boot_svc_next_boot_bl0_slot_res_init(
20  rom_error_t status, uint32_t primary_slot,
22  msg->status = status;
23  msg->primary_bl0_slot = primary_slot;
24  boot_svc_header_finalize(kBootSvcNextBl0SlotResType,
26  &msg->header);
27 }