diff options
author | Simon Glass <sjg@chromium.org> | 2014-11-14 20:56:39 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-11-25 07:11:16 -0700 |
commit | ad6edca379117d52da373818a5db3027da2ad14b (patch) | |
tree | dbee60341b51e7a2ae7e6af5953f4d81d5644972 /drivers/bios_emulator/x86emu/debug.c | |
parent | 62d0c5e15347f0ab9998d8bac2845be0d441c8b1 (diff) | |
download | u-boot-imx-ad6edca379117d52da373818a5db3027da2ad14b.zip u-boot-imx-ad6edca379117d52da373818a5db3027da2ad14b.tar.gz u-boot-imx-ad6edca379117d52da373818a5db3027da2ad14b.tar.bz2 |
bios_emulator: Allow x86 to use the emulator
There is an implicit assumption that x86 machines want to use raw I/O in the
BIOS emulator, but this should be selectable. Add an CONFIG_X86EMU_RAW_IO
option to control it instead.
Also fix a few bugs which cause warnings on x86 and adjust the Makefile to
remove the assumption that only PowerPC uses the emulator.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/bios_emulator/x86emu/debug.c')
-rw-r--r-- | drivers/bios_emulator/x86emu/debug.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/bios_emulator/x86emu/debug.c b/drivers/bios_emulator/x86emu/debug.c index 2fa8050..2ec64c2 100644 --- a/drivers/bios_emulator/x86emu/debug.c +++ b/drivers/bios_emulator/x86emu/debug.c @@ -211,9 +211,7 @@ void X86EMU_dump_memory(u16 seg, u16 off, u32 amt) u32 start = off & 0xfffffff0; u32 end = (off + 16) & 0xfffffff0; u32 i; - u32 current; - current = start; while (end <= off + amt) { printk("%04x:%04x ", seg, start); for (i = start; i < off; i++) @@ -229,7 +227,7 @@ void X86EMU_dump_memory(u16 seg, u16 off, u32 amt) void x86emu_single_step(void) { char s[1024]; - int ps[10]; + int ps[10]; int ntok; int cmd; int done; @@ -238,8 +236,6 @@ void x86emu_single_step(void) static int breakpoint; static int noDecode = 1; - char *p; - if (DEBUG_BREAK()) { if (M.x86.saved_ip != breakpoint) { return; @@ -255,6 +251,8 @@ void x86emu_single_step(void) offset = M.x86.saved_ip; while (!done) { printk("-"); + ps[1] = 0; /* Avoid dodgy compiler warnings */ + ps[2] = 0; cmd = x86emu_parse_line(s, ps, &ntok); switch (cmd) { case 'u': |