]> git.sur5r.net Git - u-boot/blobdiff - drivers/bios_emulator/x86emu/ops2.c
efi_loader: implement event groups
[u-boot] / drivers / bios_emulator / x86emu / ops2.c
index 81c0d49a33397d116da4c5dcd19684446741d6fa..be4ef364432018d371218a76979c0ea3ec5f400c 100644 (file)
@@ -2,7 +2,7 @@
 *
 *                      Realmode X86 Emulator Library
 *
-*  Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+*  Copyright (C) 2007 Freescale Semiconductor, Inc.
 *  Jason Jin <Jason.jin@freescale.com>
 *
 *              Copyright (C) 1991-2004 SciTech Software, Inc.
 *              and emulation of all the x86 extended two-byte processor
 *              instructions.
 *
-*              Jason port this file to u-boot. Put the function pointer into
-*              got2 sector.
-*
 ****************************************************************************/
 
+#include <common.h>
+#include <linux/compiler.h>
 #include "x86emu/x86emui.h"
 
-#if defined(CONFIG_BIOSEMU)
-
 /*----------------------------- Implementation ----------------------------*/
 
 /****************************************************************************
@@ -61,7 +58,7 @@ void x86emuOp2_illegal_op(
     u8 op2)
 {
     START_OF_INSTR();
-    DECODE_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n");
+    ERR_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n");
     TRACE_REGS();
     printk("%04x:%04x: %02X ILLEGAL EXTENDED X86 OPCODE!\n",
        M.x86.R_CS, M.x86.R_IP-2,op2);
@@ -172,7 +169,7 @@ void x86emuOp2_set_byte(u8 op2)
     int mod, rl, rh;
     uint destoffset;
     u8 *destreg;
-    char *name = 0;
+    __maybe_unused char *name = 0;
     int cond = 0;
 
     START_OF_INSTR();
@@ -1092,7 +1089,7 @@ void x86emuOp2_btX_I(u8 X86EMU_UNUSED(op2))
        DECODE_PRINTF("BTC\t");
        break;
     default:
-       DECODE_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n");
+       ERR_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n");
        TRACE_REGS();
        printk("%04x:%04x: %02X%02X ILLEGAL EXTENDED X86 OPCODE EXTENSION!\n",
                M.x86.R_CS, M.x86.R_IP-3,op2, (mod<<6)|(rh<<3)|rl);
@@ -1496,7 +1493,7 @@ void x86emuOp2_movsx_word_R_RM(u8 X86EMU_UNUSED(op2))
 /***************************************************************************
  * Double byte operation code table:
  **************************************************************************/
-void (*x86emu_optab2[256])(u8) __attribute__((section(".got2"))) =
+void (*x86emu_optab2[256])(u8) =
 {
 /*  0x00 */ x86emuOp2_illegal_op,  /* Group F (ring 0 PM)      */
 /*  0x01 */ x86emuOp2_illegal_op,  /* Group G (ring 0 PM)      */
@@ -1770,5 +1767,3 @@ void (*x86emu_optab2[256])(u8) __attribute__((section(".got2"))) =
 /*  0xfe */ x86emuOp2_illegal_op,
 /*  0xff */ x86emuOp2_illegal_op,
 };
-
-#endif