Files
Yaya48 cf256aa081 Import QEMU upstream snapshot d2e570c
Upstream: https://gitlab.com/qemu-project/qemu.git

Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
2026-08-31 02:15:30 +02:00

64 lines
2.2 KiB
C

/*
* Hexagon Global Registers QOM Object
*
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef HEXAGON_GLOBALREG_H
#define HEXAGON_GLOBALREG_H
#include "hw/core/qdev.h"
#include "hw/core/sysbus.h"
#include "hw/intc/hex-l2vic.h"
#include "hw/timer/qct-qtimer.h"
#include "qom/object.h"
#include "target/hexagon/cpu.h"
#define TYPE_HEXAGON_GLOBALREG "hexagon-globalreg"
OBJECT_DECLARE_SIMPLE_TYPE(HexagonGlobalRegState, HEXAGON_GLOBALREG)
struct HexagonGlobalRegState {
SysBusDevice parent_obj;
/* Array of system registers */
uint32_t regs[NUM_SREGS];
/* L2VIC interface used to back the VID/VID1 registers */
HexL2VicInterface *l2vic;
/* QTimer interface used to back the TIMERLO/TIMERHI registers */
QctQtimerInterface *qtimer;
/* Global performance cycle counter base */
uint64_t g_pcycle_base;
/* Properties for global register reset values */
uint32_t boot_evb; /* Boot Exception Vector Base (HEX_SREG_EVB) */
uint64_t config_table_addr; /* Configuration table base */
uint32_t dsp_rev; /* DSP revision register (HEX_SREG_REV) */
/* ISDB properties */
bool isdben_etm_enable; /* ISDB ETM enable bit */
bool isdben_dfd_enable; /* ISDB DFD enable bit */
bool isdben_trusted; /* ISDB trusted mode bit */
bool isdben_secure; /* ISDB secure mode bit */
};
/* Public interface functions */
uint32_t hexagon_globalreg_read(HexagonGlobalRegState *s, uint32_t reg,
uint32_t htid);
void hexagon_globalreg_write(HexagonGlobalRegState *s, uint32_t reg,
uint32_t value, uint32_t htid);
uint32_t hexagon_globalreg_masked_value(HexagonGlobalRegState *s, uint32_t reg,
uint32_t value);
void hexagon_globalreg_write_masked(HexagonGlobalRegState *s, uint32_t reg,
uint32_t value);
/* Global performance cycle counter access */
uint64_t hexagon_globalreg_get_pcycle_base(HexagonGlobalRegState *s);
void hexagon_globalreg_set_pcycle_base(HexagonGlobalRegState *s,
uint64_t value);
#endif /* HEXAGON_GLOBALREG_H */