Go to the documentation of this file.
138 #include "arch/riscv/gdb-xml/gdb_xml_riscv_cpu.hh"
139 #include "arch/riscv/gdb-xml/gdb_xml_riscv_csr.hh"
140 #include "arch/riscv/gdb-xml/gdb_xml_riscv_fpu.hh"
141 #include "arch/riscv/gdb-xml/gdb_xml_riscv_target.hh"
149 #include "debug/GDBAcc.hh"
156 using namespace RiscvISA;
159 : BaseRemoteGDB(_system, _port), regCache(this)
175 satp.mode != AddrXlateMode::BARE) {
176 Walker *walker = mmu->getDataWalker();
177 Fault fault = walker->startFunctional(
191 DPRINTF(GDBAcc,
"getregs in remotegdb, size %lu\n", size());
305 DPRINTF(GDBAcc,
"setregs in remotegdb \n");
317 newVal = (oldVal & ~
mask) | (
r.fflags &
mask);
324 newVal = (oldVal & ~
mask) | (
r.frm &
mask);
331 newVal = (oldVal & ~
mask) | (
r.fcsr &
mask);
345 newVal = (oldVal & ~
mask) | (
r.ustatus &
mask);
351 newVal = (oldVal & ~
mask) | (
r.uie &
mask);
367 newVal = (oldVal & ~
mask) | (
r.uip &
mask);
375 newVal = (oldVal & ~
mask) | (
r.sstatus &
mask);
385 newVal = (oldVal & ~
mask) | (
r.sie &
mask);
403 newVal = (oldVal & ~
mask) | (
r.sip &
mask);
421 newVal = (oldVal & ~
mask) | (
r.mstatus &
mask);
427 newVal = (oldVal & ~
mask) | (
r.misa &
mask);
437 newVal = (oldVal & ~
mask) | (
r.mie &
mask);
455 newVal = (oldVal & ~
mask) | (
r.mip &
mask);
471 #define GDB_XML(x, s) \
473 x, std::string(reinterpret_cast<const char *>(Blobs::s), \
476 static const std::map<std::string, std::string> annexMap{
477 GDB_XML(
"target.xml", gdb_xml_riscv_target),
478 GDB_XML(
"riscv-64bit-cpu.xml", gdb_xml_riscv_cpu),
479 GDB_XML(
"riscv-64bit-fpu.xml", gdb_xml_riscv_fpu),
480 GDB_XML(
"riscv-64bit-csr.xml", gdb_xml_riscv_csr)};
482 auto it = annexMap.find(annex);
483 if (it == annexMap.end())
RemoteGDB(System *_system, int _port)
Addr instAddr() const
Returns the memory address of the instruction this PC points to.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
constexpr decltype(nullptr) NoFault
RegVal readFloatReg(RegIndex reg_idx) const
const std::map< int, CSRMetadata > CSRData
BaseGdbRegCache * gdbRegs()
static void output(const char *filename)
virtual BaseMMU * getMMUPtr()=0
virtual const PCStateBase & pcState() const =0
const Entry * lookup(Addr vaddr)
Lookup function.
Concrete subclasses of this abstract class represent how the register values are transmitted on the w...
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
RegVal readIntReg(RegIndex reg_idx) const
EmulationPageTable * pTable
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
bool acc(Addr addr, size_t len)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool getXferFeaturesRead(const std::string &annex, std::string &output)
Get an XML target description.
virtual Process * getProcessPtr()=0
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
ThreadContext * context()
const std::map< int, RegVal > CSRMasks
void setFloatReg(RegIndex reg_idx, RegVal val)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void setIntReg(RegIndex reg_idx, RegVal val)
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
Generated on Thu Jul 28 2022 13:32:24 for gem5 by doxygen 1.8.17