X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fbios_emulator%2Fbiosemu.c;h=d0c652157782c0e1f4c533cb116d94ae7a86c55d;hb=ee1702d75a30d076139d1841383a1fa7220a0e11;hp=5ab9e74c38c69d47e57b428d5868288110941617;hpb=5b4de9309d7a03aa1db2e5391ab696363391f460;p=u-boot diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c index 5ab9e74c38..d0c6521577 100644 --- a/drivers/bios_emulator/biosemu.c +++ b/drivers/bios_emulator/biosemu.c @@ -46,13 +46,11 @@ ****************************************************************************/ #include - -#if defined(CONFIG_BIOSEMU) - +#include #include "biosemui.h" BE_sysEnv _BE_env = {{0}}; -static X86EMU_memFuncs _BE_mem __attribute__((section(".got2"))) = { +static X86EMU_memFuncs _BE_mem __attribute__((section(GOT2_TYPE))) = { BE_rdb, BE_rdw, BE_rdl, @@ -61,7 +59,7 @@ static X86EMU_memFuncs _BE_mem __attribute__((section(".got2"))) = { BE_wrl, }; -static X86EMU_pioFuncs _BE_pio __attribute__((section(".got2"))) = { +static X86EMU_pioFuncs _BE_pio __attribute__((section(GOT2_TYPE))) = { BE_inb, BE_inw, BE_inl, @@ -95,7 +93,7 @@ int X86API BE_init(u32 debugFlags, int memSize, BE_VGAInfo * info, int shared) return 0; } - M.mem_base = (unsigned long)malloc(memSize); + M.mem_base = malloc(memSize); if (M.mem_base == NULL){ printf("Biosemu:Out of memory!"); @@ -105,7 +103,7 @@ int X86API BE_init(u32 debugFlags, int memSize, BE_VGAInfo * info, int shared) _BE_env.emulateVGA = 0; _BE_env.busmem_base = (unsigned long)malloc(128 * 1024); - if (_BE_env.busmem_base == NULL){ + if ((void *)_BE_env.busmem_base == NULL){ printf("Biosemu:Out of memory!"); return 0; } @@ -229,7 +227,7 @@ Cleans up and exits the emulator. void X86API BE_exit(void) { free(M.mem_base); - free(_BE_env.busmem_base); + free((void *)_BE_env.busmem_base); } /**************************************************************************** @@ -371,4 +369,3 @@ int X86API BE_int86x(int intno, RMREGS * in, RMREGS * out, RMSREGS * sregs) sregs->gs = M.x86.R_GS; return out->x.ax; } -#endif