1 /* 2 * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef PROXY_FWU_DUT_H 8 #define PROXY_FWU_DUT_H 9 10 #include "service/fwu/test/fwu_dut/fwu_dut.h" 11 12 /* 13 * A proxy_fwu_dut is an fwu_dut that acts as a proxy for a full fwu_dut 14 * with access to updatable firmware. The proxy_fwu_dut is used in test 15 * integrations where the fwu service is being accessed via RPC e.g. from 16 * Nwd. 17 */ 18 class proxy_fwu_dut : public fwu_dut { 19 public: 20 /** 21 * \brief proxy_fwu_dut constructor 22 * 23 * \param[in] num_locations The number of updatable fw locations 24 * \param[in] metadata_version FWU metadata version supported by bootloader 25 * \param[in] remote_dut The associated remote fwu dut 26 */ 27 proxy_fwu_dut(unsigned int num_locations, unsigned int metadata_version, 28 fwu_dut *remote_dut); 29 30 ~proxy_fwu_dut(); 31 32 void boot(bool from_active_bank); 33 void shutdown(void); 34 35 struct boot_info get_boot_info(void) const; 36 37 metadata_checker *create_metadata_checker(bool is_primary) const; 38 fwu_client *create_fwu_client(void); 39 40 private: 41 unsigned int m_num_locations; 42 fwu_dut *m_remote_dut; 43 }; 44 45 #endif /* PROXY_FWU_DUT_H */ 46