diff --git a/sw/device/lib/dif/BUILD b/sw/device/lib/dif/BUILD index 4b3037fde21e05..44cfe5e1ee40e8 100644 --- a/sw/device/lib/dif/BUILD +++ b/sw/device/lib/dif/BUILD @@ -1344,6 +1344,27 @@ cc_test( ], ) +cc_library( + name = "soc_proxy", + srcs = [ + "//sw/device/lib/dif/autogen:soc_proxy_hdr", + "//sw/device/lib/dif/autogen:soc_proxy_src", + ], + hdrs = [ + "dif_soc_proxy.h", + ], + deps = [ + ":base", + "//hw/top:dt_soc_proxy", + "//hw/top:soc_proxy_c_regs", + "//sw/device/lib/base:bitfield", + "//sw/device/lib/base:macros", + "//sw/device/lib/base:memory", + "//sw/device/lib/base:mmio", + "//sw/device/lib/base:multibits", + ], +) + cc_library( name = "all_difs", deps = flatten([ diff --git a/sw/device/lib/dif/defs.bzl b/sw/device/lib/dif/defs.bzl index e8c2095da2ecbe..f53c85277f57b3 100644 --- a/sw/device/lib/dif/defs.bzl +++ b/sw/device/lib/dif/defs.bzl @@ -5,5 +5,4 @@ # This is the list of all IPs that do not have a DIF. IPS_WITHOUT_DIF = [ "ast", - "soc_proxy", -] \ No newline at end of file +] diff --git a/sw/device/lib/dif/dif_soc_proxy.h b/sw/device/lib/dif/dif_soc_proxy.h new file mode 100644 index 00000000000000..a44dd55f1c1d96 --- /dev/null +++ b/sw/device/lib/dif/dif_soc_proxy.h @@ -0,0 +1,22 @@ +// Copyright lowRISC contributors (OpenTitan project). +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 + +#ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_SOC_PROXY_H_ +#define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_SOC_PROXY_H_ + +/** + * This is an empty DIF. It's sole purpose is to export the autogenerated DIF + * functions so that the PLIC tests and ISR testutils can use it. + */ + +#include +#include + +#include "sw/device/lib/base/macros.h" +#include "sw/device/lib/base/mmio.h" +#include "sw/device/lib/dif/dif_base.h" + +#include "sw/device/lib/dif/autogen/dif_soc_proxy_autogen.h" + +#endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_SOC_PROXY_H_