Changeset 97905 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Dec 29, 2022 6:22:23 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r96407 r97905 175 175 #define DEVICE_NAME_USR "vboxdrvu" 176 176 177 #if (defined(RT_ARCH_AMD64) && RTLNX_VER_MAX(2,6,23)) || defined(VBOX_WITH_TEXT_MODMEM_HACK)178 /**179 * Memory for the executable memory heap (in IPRT).180 */181 # ifdef DEBUG182 # define EXEC_MEMORY_SIZE 10485760 /* 10 MB */183 # else184 # define EXEC_MEMORY_SIZE 8388608 /* 8 MB */185 # endif186 extern uint8_t g_abExecMemory[EXEC_MEMORY_SIZE];187 # ifndef VBOX_WITH_TEXT_MODMEM_HACK188 __asm__(".section execmemory, \"awx\", @progbits\n\t"189 ".align 32\n\t"190 ".globl g_abExecMemory\n"191 "g_abExecMemory:\n\t"192 ".zero " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"193 ".type g_abExecMemory, @object\n\t"194 ".size g_abExecMemory, " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"195 ".text\n\t");196 # else197 __asm__(".text\n\t"198 ".align 4096\n\t"199 ".globl g_abExecMemory\n"200 "g_abExecMemory:\n\t"201 ".zero " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"202 ".type g_abExecMemory, @object\n\t"203 ".size g_abExecMemory, " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"204 ".text\n\t");205 # endif206 #endif207 208 177 /** The file_operations structure. */ 209 178 static struct file_operations gFileOpsVBoxDrvSys = … … 395 364 if (RT_SUCCESS(rc)) 396 365 { 397 #if (defined(RT_ARCH_AMD64) && RTLNX_VER_MAX(2,6,23)) || defined(VBOX_WITH_TEXT_MODMEM_HACK)398 # ifdef VBOX_WITH_TEXT_MODMEM_HACK399 set_memory_x(&g_abExecMemory[0], sizeof(g_abExecMemory) / PAGE_SIZE);400 set_memory_rw(&g_abExecMemory[0], sizeof(g_abExecMemory) / PAGE_SIZE);401 # endif402 rc = RTR0MemExecDonate(&g_abExecMemory[0], sizeof(g_abExecMemory));403 printk(KERN_DEBUG "VBoxDrv: dbg - g_abExecMemory=%p\n", (void *)&g_abExecMemory[0]);404 #endif405 366 Log(("VBoxDrv::ModuleInit\n")); 406 367 … … 408 369 * Initialize the device extension. 409 370 */ 410 if (RT_SUCCESS(rc)) 411 rc = supdrvInitDevExt(&g_DevExt, sizeof(SUPDRVSESSION)); 371 rc = supdrvInitDevExt(&g_DevExt, sizeof(SUPDRVSESSION)); 412 372 if (RT_SUCCESS(rc)) 413 373 {
Note:
See TracChangeset
for help on using the changeset viewer.