[U-Boot-Users] [PATCH] Bios emulator from Jason Lin
Michal Simek
Monstr at seznam.cz
Tue Aug 7 23:21:08 CEST 2007
Hi,
Bios emulator code contains a lot of coding style issues.
expecially Cute names. Makefile hasn't header, etc...
Remove problems with warnings and errors for Microblaze cpu.
Signed-off-by: Michal Simek <monstr at monstr.eu>
diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c
index 2a8e1a0..505e4ff 100644
--- a/drivers/bios_emulator/besys.c
+++ b/drivers/bios_emulator/besys.c
@@ -46,6 +46,7 @@
* 16 bit of the io port.
*
****************************************************************************/
+#ifdef CONFIG_BIOSEMU
#include "biosemui.h"
@@ -717,3 +718,4 @@ void X86API BE_outl(X86EMU_pioAddr port, u32 val)
#endif
LOG_outpd(port, val);
}
+#endif
diff --git a/drivers/bios_emulator/bios.c b/drivers/bios_emulator/bios.c
index ed5437e..2522379 100644
--- a/drivers/bios_emulator/bios.c
+++ b/drivers/bios_emulator/bios.c
@@ -40,7 +40,7 @@
* video BIOS.
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#include "biosemui.h"
/*----------------------------- Implementation ----------------------------*/
@@ -319,3 +319,4 @@ void _BE_bios_init(u32 * intrTab)
bios_intr_tab[0x6D] = int10;
X86EMU_setupIntrFuncs(bios_intr_tab);
}
+#endif
diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c
index 06d4ad3..8c51ee3 100644
--- a/drivers/bios_emulator/biosemu.c
+++ b/drivers/bios_emulator/biosemu.c
@@ -44,7 +44,7 @@
* frambuffer function can work after run the BIOS.
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#include "biosemui.h"
#include <malloc.h>
@@ -368,3 +368,4 @@ int X86API BE_int86x(int intno, RMREGS * in, RMREGS * out, RMSREGS * sregs)
sregs->gs = M.x86.R_GS;
return out->x.ax;
}
+#endif
diff --git a/drivers/bios_emulator/x86emu/debug.c b/drivers/bios_emulator/x86emu/debug.c
index 0f58a69..2f776c2 100644
--- a/drivers/bios_emulator/x86emu/debug.c
+++ b/drivers/bios_emulator/x86emu/debug.c
@@ -36,7 +36,7 @@
* emulator.
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#include "x86emu/x86emui.h"
#include <stdarg.h>
@@ -459,3 +459,4 @@ void x86emu_dump_xregs(void)
printk("NC ");
printk("\n");
}
+#endif
diff --git a/drivers/bios_emulator/x86emu/decode.c b/drivers/bios_emulator/x86emu/decode.c
index 1e2dcfe..c1b754d 100644
--- a/drivers/bios_emulator/x86emu/decode.c
+++ b/drivers/bios_emulator/x86emu/decode.c
@@ -36,7 +36,7 @@
* instruction decoding and accessess of immediate data via IP. etc.
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#include "x86emu/x86emui.h"
/*----------------------------- Implementation ----------------------------*/
@@ -1142,3 +1142,4 @@ unsigned decode_rmXX_address(int mod, int rm)
return decode_rm01_address(rm);
return decode_rm10_address(rm);
}
+#endif
diff --git a/drivers/bios_emulator/x86emu/ops.c b/drivers/bios_emulator/x86emu/ops.c
index d1380ce..40f6724 100644
--- a/drivers/bios_emulator/x86emu/ops.c
+++ b/drivers/bios_emulator/x86emu/ops.c
@@ -74,7 +74,7 @@
* the got2 sector. Removed some opcode.
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#include "x86emu/x86emui.h"
/*----------------------------- Implementation ----------------------------*/
@@ -5429,3 +5429,4 @@ void (*x86emu_optab[256])(u8) __attribute__ ((section(".got2"))) =
/* 0xfe */ x86emuOp_opcFE_byte_RM,
/* 0xff */ x86emuOp_opcFF_word_RM,
};
+#endif
diff --git a/drivers/bios_emulator/x86emu/ops2.c b/drivers/bios_emulator/x86emu/ops2.c
index 631a340..42b701b 100644
--- a/drivers/bios_emulator/x86emu/ops2.c
+++ b/drivers/bios_emulator/x86emu/ops2.c
@@ -43,7 +43,7 @@
* got2 sector.
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#include "x86emu/x86emui.h"
/*----------------------------- Implementation ----------------------------*/
@@ -1768,3 +1768,4 @@ void (*x86emu_optab2[256])(u8) __attribute__((section(".got2"))) =
/* 0xfe */ x86emuOp2_illegal_op,
/* 0xff */ x86emuOp2_illegal_op,
};
+#endif
diff --git a/drivers/bios_emulator/x86emu/prim_ops.c b/drivers/bios_emulator/x86emu/prim_ops.c
index e0827d7..9f51ede 100644
--- a/drivers/bios_emulator/x86emu/prim_ops.c
+++ b/drivers/bios_emulator/x86emu/prim_ops.c
@@ -96,7 +96,7 @@
* By inspection, one gets: bc = a'b + r(a' + b)
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#define PRIM_OPS_NO_REDEFINE_ASM
#include "x86emu/x86emui.h"
@@ -2443,3 +2443,4 @@ DB( if (CHECK_SP_ACCESS())
M.x86.R_SP += 4;
return res;
}
+#endif
diff --git a/drivers/bios_emulator/x86emu/sys.c b/drivers/bios_emulator/x86emu/sys.c
index bb7fcd9..00e286c 100644
--- a/drivers/bios_emulator/x86emu/sys.c
+++ b/drivers/bios_emulator/x86emu/sys.c
@@ -38,7 +38,7 @@
* functions will have to be overriden by the user library.
*
****************************************************************************/
-
+#ifdef CONFIG_BIOSEMU
#include "x86emu/x86emui.h"
/*------------------------- Global Variables ------------------------------*/
@@ -320,3 +320,4 @@ void X86EMU_prepareForInt(int num)
M.x86.R_IP = mem_access_word(num * 4);
M.x86.intr = 0;
}
+#endif
More information about the U-Boot
mailing list