mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
emulation: ticktimer: fix higher bits of ticktimer
The ticktimer wasn't properly adjusting the upper bits, meaning delays of more than 42 days did not function properly. This was discovered as part of the libstd tests. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
b5b22c9119
commit
4133238d8a
1 changed files with 2 additions and 2 deletions
|
|
@ -100,7 +100,7 @@ namespace Antmicro.Renode.Peripherals.Timers.Betrusted
|
|||
Registers.MsleepTarget1.Define32(this)
|
||||
.WithValueField(0, 32, name: "MsleepTarget1", writeCallback: (_, value) =>
|
||||
{
|
||||
this.msleepTarget = (this.msleepTarget & 0x00000000ffffffff) | (value << 32);
|
||||
this.msleepTarget = (this.msleepTarget & 0x00000000ffffffff) | (((ulong)value) << 32);
|
||||
this.Log(LogLevel.Noisy, "Setting MsleepTarget1: {0}, sleep target now: {1}", value, this.msleepTarget);
|
||||
},
|
||||
valueProviderCallback: _ =>
|
||||
|
|
@ -142,7 +142,7 @@ namespace Antmicro.Renode.Peripherals.Timers.Betrusted
|
|||
|
||||
public bool paused;
|
||||
public long tickValue;
|
||||
ulong msleepTarget;
|
||||
public ulong msleepTarget;
|
||||
public GPIO IRQ { get; private set; }
|
||||
|
||||
private enum Registers
|
||||
|
|
|
|||
Loading…
Reference in a new issue