hw/hexagon: Declare hexagon TLB device interface
Add the hexagon TLB device interface header. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Brian Cain committed
Jun 22, 2026 at 15:28 UTC
f12198b821a397d3766710d01619c035f4651d0b
1 file changed
+46
include/hw/hexagon/hexagon_tlb.h
new
+46
@@ -0,0 +1,46 @@
1
+/*
2
+ * Hexagon TLB QOM Device
3
+ *
4
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
5
+ * SPDX-License-Identifier: GPL-2.0-or-later
6
+ */
7
+
8
+#ifndef HW_HEXAGON_TLB_H
9
+#define HW_HEXAGON_TLB_H
10
+
11
+#include "hw/core/sysbus.h"
12
+#include "qom/object.h"
13
+#include "exec/hwaddr.h"
14
+#include "exec/mmu-access-type.h"
15
+#include "monitor/monitor.h"
16
+#define TYPE_HEXAGON_TLB "hexagon-tlb"
17
+OBJECT_DECLARE_SIMPLE_TYPE(HexagonTLBState, HEXAGON_TLB)
18
+
19
+struct HexagonTLBState {
20
+ SysBusDevice parent_obj;
21
+
22
+ uint32_t num_entries;
23
+ uint64_t *entries;
24
+};
25
+
26
+uint64_t hexagon_tlb_read(HexagonTLBState *tlb, uint32_t index);
27
+void hexagon_tlb_write(HexagonTLBState *tlb, uint32_t index, uint64_t value);
28
+
29
+bool hexagon_tlb_find_match(HexagonTLBState *tlb, uint32_t asid,
30
+ uint32_t VA, MMUAccessType access_type,
31
+ hwaddr *PA, int *prot, uint64_t *size,
32
+ int32_t *excp, int *cause_code, int mmu_idx);
33
+
34
+uint32_t hexagon_tlb_lookup(HexagonTLBState *tlb, uint32_t asid,
35
+ uint32_t VA, int *cause_code);
36
+
37
+int hexagon_tlb_check_overlap(HexagonTLBState *tlb, uint64_t entry,
38
+ uint64_t index);
39
+
40
+void hexagon_tlb_dump(Monitor *mon, HexagonTLBState *tlb);
41
+
42
+bool hexagon_tlb_dump_entry(Monitor *mon, uint64_t entry);
43
+
44
+uint32_t hexagon_tlb_get_num_entries(HexagonTLBState *tlb);
45
+
46
+#endif /* HW_HEXAGON_TLB_H */