Go to the documentation of this file.
144 #include "blobs/gdb_xml_riscv_cpu.hh"
145 #include "blobs/gdb_xml_riscv_csr.hh"
146 #include "blobs/gdb_xml_riscv_fpu.hh"
147 #include "blobs/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())
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
RemoteGDB(System *_system, int _port)
virtual RegVal readMiscReg(RegIndex misc_reg)=0
constexpr decltype(nullptr) NoFault
const std::map< int, CSRMetadata > CSRData
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
BaseGdbRegCache * gdbRegs()
static void output(const char *filename)
virtual BaseMMU * getMMUPtr()=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
EmulationPageTable * pTable
virtual void setFloatReg(RegIndex reg_idx, RegVal val)=0
virtual TheISA::PCState pcState() const =0
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.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
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
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
Generated on Tue Sep 21 2021 12:24:41 for gem5 by doxygen 1.8.17