Skip to content

Commit

Permalink
[dif] Add empty soc_proxy DIF
Browse files Browse the repository at this point in the history
Thid DIF exports not function beyond the autogenerated one. It is
necessary to have it so that the isr_tstutils and the autogenerated
plic tests can compile on Darjeeling.

Signed-off-by: Amaury Pouly <[email protected]>
  • Loading branch information
pamaury committed Dec 6, 2024
1 parent 9962d0b commit e64584a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
21 changes: 21 additions & 0 deletions sw/device/lib/dif/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
3 changes: 1 addition & 2 deletions sw/device/lib/dif/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# This is the list of all IPs that do not have a DIF.
IPS_WITHOUT_DIF = [
"ast",
"soc_proxy",
]
]
22 changes: 22 additions & 0 deletions sw/device/lib/dif/dif_soc_proxy.h
Original file line number Diff line number Diff line change
@@ -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 <stdbool.h>
#include <stdint.h>

#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_

0 comments on commit e64584a

Please sign in to comment.