diff options
author | Tim Newsome <tim@sifive.com> | 2022-01-06 14:43:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-06 14:43:37 -0800 |
commit | 39fc8c3921e8c9ffd9996a7d59df239b2488a206 (patch) | |
tree | b088d981e104732b9f00782022fdeeac8e12fe11 | |
parent | 336a5813fd3f72d5081344466bcbd3275227dae7 (diff) | |
download | spike-39fc8c3921e8c9ffd9996a7d59df239b2488a206.zip spike-39fc8c3921e8c9ffd9996a7d59df239b2488a206.tar.gz spike-39fc8c3921e8c9ffd9996a7d59df239b2488a206.tar.bz2 |
Don't say "master" (#898)
Requested by "LfX Security - Non Inclusive Language Alerts"
-rw-r--r-- | riscv/debug_module.cc | 28 | ||||
-rw-r--r-- | riscv/debug_module.h | 2 | ||||
-rw-r--r-- | spike_main/spike.cc | 6 |
3 files changed, 18 insertions, 18 deletions
diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc index 0a0bf1f..ef25b4d 100644 --- a/riscv/debug_module.cc +++ b/riscv/debug_module.cc @@ -101,17 +101,17 @@ void debug_module_t::reset() abstractauto = {0}; sbcs = {0}; - if (config.max_bus_master_bits > 0) { + if (config.max_sba_data_width > 0) { sbcs.version = 1; sbcs.asize = sizeof(reg_t) * 8; } - if (config.max_bus_master_bits >= 64) + if (config.max_sba_data_width >= 64) sbcs.access64 = true; - if (config.max_bus_master_bits >= 32) + if (config.max_sba_data_width >= 32) sbcs.access32 = true; - if (config.max_bus_master_bits >= 16) + if (config.max_sba_data_width >= 16) sbcs.access16 = true; - if (config.max_bus_master_bits >= 8) + if (config.max_sba_data_width >= 8) sbcs.access8 = true; challenge = random(); @@ -295,7 +295,7 @@ unsigned debug_module_t::sb_access_bits() void debug_module_t::sb_autoincrement() { - if (!sbcs.autoincrement || !config.max_bus_master_bits) + if (!sbcs.autoincrement || !config.max_sba_data_width) return; uint64_t value = sbaddress[0] + sb_access_bits() / 8; @@ -317,13 +317,13 @@ void debug_module_t::sb_read() { reg_t address = ((uint64_t) sbaddress[1] << 32) | sbaddress[0]; try { - if (sbcs.sbaccess == 0 && config.max_bus_master_bits >= 8) { + if (sbcs.sbaccess == 0 && config.max_sba_data_width >= 8) { sbdata[0] = sim->debug_mmu->load_uint8(address); - } else if (sbcs.sbaccess == 1 && config.max_bus_master_bits >= 16) { + } else if (sbcs.sbaccess == 1 && config.max_sba_data_width >= 16) { sbdata[0] = sim->debug_mmu->load_uint16(address); - } else if (sbcs.sbaccess == 2 && config.max_bus_master_bits >= 32) { + } else if (sbcs.sbaccess == 2 && config.max_sba_data_width >= 32) { sbdata[0] = sim->debug_mmu->load_uint32(address); - } else if (sbcs.sbaccess == 3 && config.max_bus_master_bits >= 64) { + } else if (sbcs.sbaccess == 3 && config.max_sba_data_width >= 64) { uint64_t value = sim->debug_mmu->load_uint64(address); sbdata[0] = value; sbdata[1] = value >> 32; @@ -339,13 +339,13 @@ void debug_module_t::sb_write() { reg_t address = ((uint64_t) sbaddress[1] << 32) | sbaddress[0]; D(fprintf(stderr, "sb_write() 0x%x @ 0x%lx\n", sbdata[0], address)); - if (sbcs.sbaccess == 0 && config.max_bus_master_bits >= 8) { + if (sbcs.sbaccess == 0 && config.max_sba_data_width >= 8) { sim->debug_mmu->store_uint8(address, sbdata[0]); - } else if (sbcs.sbaccess == 1 && config.max_bus_master_bits >= 16) { + } else if (sbcs.sbaccess == 1 && config.max_sba_data_width >= 16) { sim->debug_mmu->store_uint16(address, sbdata[0]); - } else if (sbcs.sbaccess == 2 && config.max_bus_master_bits >= 32) { + } else if (sbcs.sbaccess == 2 && config.max_sba_data_width >= 32) { sim->debug_mmu->store_uint32(address, sbdata[0]); - } else if (sbcs.sbaccess == 3 && config.max_bus_master_bits >= 64) { + } else if (sbcs.sbaccess == 3 && config.max_sba_data_width >= 64) { sim->debug_mmu->store_uint64(address, (((uint64_t) sbdata[1]) << 32) | sbdata[0]); } else { diff --git a/riscv/debug_module.h b/riscv/debug_module.h index bfcc0a7..d79ce7d 100644 --- a/riscv/debug_module.h +++ b/riscv/debug_module.h @@ -14,7 +14,7 @@ typedef struct { // Size of program_buffer in 32-bit words, as exposed to the rest of the // world. unsigned progbufsize; - unsigned max_bus_master_bits; + unsigned max_sba_data_width; bool require_authentication; unsigned abstract_rti; bool support_hasel; diff --git a/spike_main/spike.cc b/spike_main/spike.cc index ac45fbf..e2680cc 100644 --- a/spike_main/spike.cc +++ b/spike_main/spike.cc @@ -61,7 +61,7 @@ static void help(int exit_code = 1) fprintf(stderr, " --bootargs=<args> Provide custom bootargs for kernel [default: console=hvc0 earlycon=sbi]\n"); fprintf(stderr, " --real-time-clint Increment clint time at real-time rate\n"); fprintf(stderr, " --dm-progsize=<words> Progsize for the debug module [default 2]\n"); - fprintf(stderr, " --dm-sba=<bits> Debug bus master supports up to " + fprintf(stderr, " --dm-sba=<bits> Debug system bus access supports up to " "<bits> wide accesses [default 0]\n"); fprintf(stderr, " --dm-auth Debug module requires debugger to authenticate\n"); fprintf(stderr, " --dmi-rti=<n> Number of Run-Test/Idle cycles " @@ -243,7 +243,7 @@ int main(int argc, char** argv) unsigned dmi_rti = 0; debug_module_config_t dm_config = { .progbufsize = 2, - .max_bus_master_bits = 0, + .max_sba_data_width = 0, .require_authentication = false, .abstract_rti = 0, .support_hasel = true, @@ -352,7 +352,7 @@ int main(int argc, char** argv) parser.option(0, "dm-no-impebreak", 0, [&](const char* s){dm_config.support_impebreak = false;}); parser.option(0, "dm-sba", 1, - [&](const char* s){dm_config.max_bus_master_bits = atoul_safe(s);}); + [&](const char* s){dm_config.max_sba_data_width = atoul_safe(s);}); parser.option(0, "dm-auth", 0, [&](const char* s){dm_config.require_authentication = true;}); parser.option(0, "dmi-rti", 1, |