From 98ff649a54198edb6f4ee2720dc8bb8b9e2f878f Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Sat, 10 Oct 2020 21:52:55 +0800 Subject: [PATCH] nemu.ioe,gpu: write non-zero value to sync --- am/src/nemu/include/nemu.h | 4 ++-- am/src/nemu/ioe/gpu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/am/src/nemu/include/nemu.h b/am/src/nemu/include/nemu.h index 889d536..d629db3 100644 --- a/am/src/nemu/include/nemu.h +++ b/am/src/nemu/include/nemu.h @@ -19,13 +19,13 @@ # define SERIAL_PORT 0x3f8 # define KBD_ADDR 0x60 # define RTC_ADDR 0x48 -# define SCREEN_ADDR 0x100 +# define VGACTL_ADDR 0x100 # define AUDIO_ADDR 0x200 #else # define SERIAL_PORT 0xa10003f8 # define KBD_ADDR 0xa1000060 # define RTC_ADDR 0xa1000048 -# define SCREEN_ADDR 0xa1000100 +# define VGACTL_ADDR 0xa1000100 # define AUDIO_ADDR 0xa1000200 #endif diff --git a/am/src/nemu/ioe/gpu.c b/am/src/nemu/ioe/gpu.c index b20c743..fb33096 100644 --- a/am/src/nemu/ioe/gpu.c +++ b/am/src/nemu/ioe/gpu.c @@ -1,7 +1,7 @@ #include #include -#define SYNC_ADDR (SCREEN_ADDR + 4) +#define SYNC_ADDR (VGACTL_ADDR + 4) void __am_gpu_init() { } @@ -16,7 +16,7 @@ void __am_gpu_config(AM_GPU_CONFIG_T *cfg) { void __am_gpu_fbdraw(AM_GPU_FBDRAW_T *ctl) { if (ctl->sync) { - outl(SYNC_ADDR, 0); + outl(SYNC_ADDR, 1); } }