exo2: add a number of minor configuration fixes

This commit is contained in:
Michael Scire 2020-06-05 04:07:56 -07:00 committed by SciresM
parent 8e401f4daa
commit 068c25ce66
5 changed files with 25 additions and 5 deletions

View file

@ -124,7 +124,11 @@ namespace ams::gic {
const int word = i / scale;
const int bit = (i % scale) * width;
reg::ReadWrite(address + sizeof(u32) * word, REG_BITS_VALUE(bit, width, value));
const u32 mask = ((1u << width) - 1) << bit;
const uintptr_t reg_addr = address + sizeof(u32) * word;
const u32 old = reg::Read(reg_addr) & ~mask;
reg::Write(reg_addr, old | ((value << bit) & mask));
}
void Write(uintptr_t address, int width, int i, u32 value) {