mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01:00
Avoid clobbering the counter mode when issuing a latch command.
Approved by: grehan (co-mentor)
This commit is contained in:
parent
84beb433c0
commit
182d7debb9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262274
@ -216,11 +216,12 @@ pit_8254_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
||||
|
||||
c = &counter[sel >> 6];
|
||||
c->ctx = ctx;
|
||||
c->mode = mode;
|
||||
if (rw == TIMER_LATCH)
|
||||
pit_update_counter(c, 1);
|
||||
else
|
||||
else {
|
||||
c->mode = mode;
|
||||
c->olbyte = 0; /* reset latch after reprogramming */
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user