MMIO: Pass the provided high part/low part addrs to handlers in {Read,Write}ToSmaller.
This commit is contained in:
parent
803c110e30
commit
b8582b00a9
|
@ -230,8 +230,9 @@ ReadHandlingMethod<T>* ReadToSmaller(Mapping* mmio, u32 high_part_addr, u32 low_
|
||||||
mmio->GetHandlerForRead(low_part_addr, &low_part);
|
mmio->GetHandlerForRead(low_part_addr, &low_part);
|
||||||
|
|
||||||
// TODO(delroth): optimize
|
// TODO(delroth): optimize
|
||||||
return ComplexRead<T>([high_part, low_part](u32 addr) {
|
return ComplexRead<T>([=](u32 addr) {
|
||||||
return ((T)high_part->Read(addr) << (8 * sizeof (ST))) | low_part->Read(addr);
|
return ((T)high_part->Read(high_part_addr) << (8 * sizeof (ST)))
|
||||||
|
| low_part->Read(low_part_addr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,9 +247,9 @@ WriteHandlingMethod<T>* WriteToSmaller(Mapping* mmio, u32 high_part_addr, u32 lo
|
||||||
mmio->GetHandlerForWrite(low_part_addr, &low_part);
|
mmio->GetHandlerForWrite(low_part_addr, &low_part);
|
||||||
|
|
||||||
// TODO(delroth): optimize
|
// TODO(delroth): optimize
|
||||||
return ComplexWrite<T>([high_part, low_part](u32 addr, T val) {
|
return ComplexWrite<T>([=](u32 addr, T val) {
|
||||||
high_part->Write(addr, val >> (8 * sizeof (ST)));
|
high_part->Write(high_part_addr, val >> (8 * sizeof (ST)));
|
||||||
low_part->Write(addr, (ST)val);
|
low_part->Write(low_part_addr, (ST)val);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue