Skip to content

Commit

Permalink
kvm, tests: Use motherboard specific ports for testing
Browse files Browse the repository at this point in the history
H. Peter Anvin suggested to use motherboard specific ports
for testing instead of ones well known. Thanks, Peter!

Reported-by: "H. Peter Anvin" <[email protected]>
Signed-off-by: Cyrill Gorcunov <[email protected]>
  • Loading branch information
cyrillos authored and wildea01 committed Jun 1, 2015
1 parent 3db4f1b commit 79241bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 134,7 @@ int main(int argc, char *argv[])

if (dbgtest_mode) {
if (kvm->kvm_run->exit_reason == KVM_EXIT_IO &&
kvm->kvm_run->io.port == 0)
kvm->kvm_run->io.port == 0xe0)
fprintf(stderr, "KVM: this is an expected IO error\n");
goto out;
}
Expand Down
9 changes: 8 additions & 1 deletion tests/pit/tick.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 4,14 @@
#define TIMER_FREQ 1193182
#define TIMER_DIV(x) ((TIMER_FREQ (x)/2)/(x))

#define DBG_PORT 0
/*
* hpa noted:
*
* 0xe0..0xef are "motherboard specific", but 0xe9 is
* used for Bochs debugging and 0xed is the Phoenix-reserved
* delay port
*/
#define DBG_PORT 0xe0

#define TEST_COUNT 0x0200

Expand Down

0 comments on commit 79241bb

Please sign in to comment.