version = BGA_int_ReadRegister(VBE_DISPI_INDEX_ID);\r
LOG("version = 0x%x", version);\r
\r
- // NOTE: This driver was written for later than 0xB0C2\r
- // NOTE: Qemu is braindead and doesn't return the actual version\r
+ // NOTE: This driver was written for BGA versions >= 0xBOC2\r
+ // NOTE: However, Qemu is braindead and doesn't return the actual version\r
if( version != 0xB0C0 && ((version & 0xFFF0) != 0xB0C0 || version < 0xB0C2) ) {\r
- Log_Warning("BGA", "Bochs Adapter Version is not 0xB0C4 or 0xB0C5, instead 0x%x", version);\r
+ Log_Warning("BGA", "Bochs Adapter Version is not compatible (need >= 0xB0C2), instead 0x%x", version);\r
return MODULE_ERR_NOTNEEDED;\r
}\r
\r
void BGA_Uninstall(void)\r
{\r
DevFS_DelDevice( &gBGA_DriverStruct );\r
- MM_UnmapHWPages( VBE_DISPI_LFB_PHYSICAL_ADDRESS, 768 );\r
+ MM_UnmapHWPages( (tVAddr)gBGA_Framebuffer, 768 );\r
}\r
\r
/**\r
#include "elf32.h"
#include "elf64.h"
-#define DEBUG 1
+#define DEBUG 0
#if DEBUG
# define DEBUGS(v...) SysDebug("ld-acess - " v)
# define DEBUGS(...)
#endif
-#if BITS > 32
+//#if BITS > 32
# define SUPPORT_ELF64
-#endif
+//#endif
// === CONSTANTS ===
#if DEBUG
case R_X86_64_JUMP_SLOT:
*(uint64_t*)ptr = (uint64_t)GetSymbol(symname);
break;
+ case R_X86_64_RELATIVE:
+ *(uint64_t*)ptr = (intptr_t)Base + addend;
+ break;
default:
SysDebug("ld-acess - _Elf64DoReloc: Unknown relocation type %i", type);
break;