X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fbios_emulator%2Fbiosemu.c;h=decdb79a747e36837054ec0c9e5a4dab8a509998;hb=fbcb7ece0ea1e364180f1cf963e0fa0ce7f6560d;hp=4c3aedf4130796f5f166e2fb6d21f212e67159ea;hpb=b0d2962faf200b816410893faff31e54287b9075;p=u-boot diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c index 4c3aedf413..decdb79a74 100644 --- a/drivers/bios_emulator/biosemu.c +++ b/drivers/bios_emulator/biosemu.c @@ -45,13 +45,15 @@ * ****************************************************************************/ -#include "biosemui.h" #include +#include #if defined(CONFIG_BIOSEMU) +#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, @@ -60,7 +62,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, @@ -94,7 +96,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!"); @@ -104,7 +106,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; } @@ -228,7 +230,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); } /****************************************************************************