nemu.ioe,gpu: write non-zero value to sync

This commit is contained in:
Zihao Yu 2020-10-10 21:52:55 +08:00
parent a1c8ab14d1
commit 98ff649a54
2 changed files with 4 additions and 4 deletions

View file

@ -19,13 +19,13 @@
# define SERIAL_PORT 0x3f8 # define SERIAL_PORT 0x3f8
# define KBD_ADDR 0x60 # define KBD_ADDR 0x60
# define RTC_ADDR 0x48 # define RTC_ADDR 0x48
# define SCREEN_ADDR 0x100 # define VGACTL_ADDR 0x100
# define AUDIO_ADDR 0x200 # define AUDIO_ADDR 0x200
#else #else
# define SERIAL_PORT 0xa10003f8 # define SERIAL_PORT 0xa10003f8
# define KBD_ADDR 0xa1000060 # define KBD_ADDR 0xa1000060
# define RTC_ADDR 0xa1000048 # define RTC_ADDR 0xa1000048
# define SCREEN_ADDR 0xa1000100 # define VGACTL_ADDR 0xa1000100
# define AUDIO_ADDR 0xa1000200 # define AUDIO_ADDR 0xa1000200
#endif #endif

View file

@ -1,7 +1,7 @@
#include <am.h> #include <am.h>
#include <nemu.h> #include <nemu.h>
#define SYNC_ADDR (SCREEN_ADDR + 4) #define SYNC_ADDR (VGACTL_ADDR + 4)
void __am_gpu_init() { 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) { void __am_gpu_fbdraw(AM_GPU_FBDRAW_T *ctl) {
if (ctl->sync) { if (ctl->sync) {
outl(SYNC_ADDR, 0); outl(SYNC_ADDR, 1);
} }
} }