Minor cleanups. (#573)
* Make a few globals const. Looking through globals to see what needs to be removed, but const globals are OK. Change-Id: I4126a3f629daf91b109a3bd7120e4b4f62a9d8ee Signed-off-by: Tim Newsome <tim@sifive.com> * Fix comment typo. Change-Id: I0c20837559411410b6870e0d0e52c0179a3a167e Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
parent
a83ac81022
commit
6628394c2c
|
@ -128,8 +128,8 @@ struct scan_field select_idcode = {
|
||||||
bscan_tunnel_type_t bscan_tunnel_type;
|
bscan_tunnel_type_t bscan_tunnel_type;
|
||||||
int bscan_tunnel_ir_width; /* if zero, then tunneling is not present/active */
|
int bscan_tunnel_ir_width; /* if zero, then tunneling is not present/active */
|
||||||
|
|
||||||
static uint8_t bscan_zero[4] = {0};
|
static const uint8_t bscan_zero[4] = {0};
|
||||||
static uint8_t bscan_one[4] = {1};
|
static const uint8_t bscan_one[4] = {1};
|
||||||
|
|
||||||
uint8_t ir_user4[4];
|
uint8_t ir_user4[4];
|
||||||
struct scan_field select_user4 = {
|
struct scan_field select_user4 = {
|
||||||
|
@ -217,7 +217,7 @@ static enum {
|
||||||
RO_REVERSED
|
RO_REVERSED
|
||||||
} resume_order;
|
} resume_order;
|
||||||
|
|
||||||
virt2phys_info_t sv32 = {
|
const virt2phys_info_t sv32 = {
|
||||||
.name = "Sv32",
|
.name = "Sv32",
|
||||||
.va_bits = 32,
|
.va_bits = 32,
|
||||||
.level = 2,
|
.level = 2,
|
||||||
|
@ -230,7 +230,7 @@ virt2phys_info_t sv32 = {
|
||||||
.pa_ppn_mask = {0x3ff, 0xfff},
|
.pa_ppn_mask = {0x3ff, 0xfff},
|
||||||
};
|
};
|
||||||
|
|
||||||
virt2phys_info_t sv39 = {
|
const virt2phys_info_t sv39 = {
|
||||||
.name = "Sv39",
|
.name = "Sv39",
|
||||||
.va_bits = 39,
|
.va_bits = 39,
|
||||||
.level = 3,
|
.level = 3,
|
||||||
|
@ -243,7 +243,7 @@ virt2phys_info_t sv39 = {
|
||||||
.pa_ppn_mask = {0x1ff, 0x1ff, 0x3ffffff},
|
.pa_ppn_mask = {0x1ff, 0x1ff, 0x3ffffff},
|
||||||
};
|
};
|
||||||
|
|
||||||
virt2phys_info_t sv48 = {
|
const virt2phys_info_t sv48 = {
|
||||||
.name = "Sv48",
|
.name = "Sv48",
|
||||||
.va_bits = 48,
|
.va_bits = 48,
|
||||||
.level = 4,
|
.level = 4,
|
||||||
|
@ -1510,7 +1510,7 @@ static int riscv_address_translate(struct target *target,
|
||||||
int mode;
|
int mode;
|
||||||
uint64_t ppn_value;
|
uint64_t ppn_value;
|
||||||
target_addr_t table_address;
|
target_addr_t table_address;
|
||||||
virt2phys_info_t *info;
|
const virt2phys_info_t *info;
|
||||||
uint64_t pte;
|
uint64_t pte;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -3470,7 +3470,7 @@ static bool gdb_regno_cacheable(enum gdb_regno regno, bool write)
|
||||||
(regno >= GDB_REGNO_V0 && regno <= GDB_REGNO_V31))
|
(regno >= GDB_REGNO_V0 && regno <= GDB_REGNO_V31))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Most CSRs won't change value on us, but we can't assume it about rbitrary
|
/* Most CSRs won't change value on us, but we can't assume it about arbitrary
|
||||||
* CSRs. */
|
* CSRs. */
|
||||||
switch (regno) {
|
switch (regno) {
|
||||||
case GDB_REGNO_DPC:
|
case GDB_REGNO_DPC:
|
||||||
|
|
Loading…
Reference in New Issue