Changeset 106544 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Oct 21, 2024 7:48:53 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp
r106061 r106544 40 40 *********************************************************************************************************************************/ 41 41 #include "the-nt-kernel.h" 42 #include <iprt/asm-amd64-x86.h> 42 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 43 # include <iprt/asm-amd64-x86.h> 44 #elif defined(RT_ARCH_ARM64) || defined(RT_ARCH_ARM32) 45 # include <iprt/asm-arm.h> 46 #else 47 # error "Port me" 48 #endif 43 49 #include <iprt/dbg.h> 44 50 #include <iprt/errcore.h> … … 47 53 #include "internal-r0drv-nt.h" 48 54 #include "symdb.h" 55 #if !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) 56 # define RTNTSDB_NO_DATA 57 #endif 49 58 #include "symdbdata.h" 50 59 … … 267 276 __except(EXCEPTION_EXECUTE_HANDLER) 268 277 { 278 #ifndef RTNTSDB_NO_DATA 269 279 DbgPrint("IPRT: %#d Exception\n", pSet - &g_artNtSdbSets[0]); 280 #endif 270 281 return false; 271 282 } … … 350 361 GET_SYSTEM_ROUTINE(MmAllocatePagesForMdlEx); 351 362 GET_SYSTEM_ROUTINE(MmFreePagesFromMdl); 363 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 352 364 GET_SYSTEM_ROUTINE(MmMapLockedPagesSpecifyCache); 365 #else 366 /* MmMapLockedPagesSpecifyCache is a pre processor macro on arm64. */ 367 g_pfnrtMmMapLockedPagesSpecifyCache = (decltype(MmMapLockedPagesSpecifyCache) *)RTR0DbgKrnlInfoGetSymbol(hKrnlInfo, NULL, "MmMapLockedPagesSpecifyCache"); 368 #endif 353 369 GET_SYSTEM_ROUTINE(MmAllocateContiguousMemorySpecifyCache); 354 370 GET_SYSTEM_ROUTINE(MmSecureVirtualMemory); … … 387 403 388 404 405 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 389 406 /* 390 407 * HACK ALERT! (and déjà vu warning - remember win32k.sys on OS/2?) … … 423 440 __try /* Warning. This try/except statement may provide some false safety. */ 424 441 { 425 # if defined(RT_ARCH_X86)442 # if defined(RT_ARCH_X86) 426 443 PKPCR pPcr = (PKPCR)__readfsdword(RT_UOFFSETOF(KPCR,SelfPcr)); 427 444 pbPrcb = (uint8_t *)pPcr->Prcb; 428 # elif defined(RT_ARCH_AMD64)445 # elif defined(RT_ARCH_AMD64) 429 446 PKPCR pPcr = (PKPCR)__readgsqword(RT_UOFFSETOF(KPCR,Self)); 430 447 pbPrcb = (uint8_t *)pPcr->CurrentPrcb; 431 # else432 # error "port me"448 # else 449 # error "port me" 433 450 pbPrcb = NULL; 434 # endif451 # endif 435 452 } 436 453 __except(EXCEPTION_EXECUTE_HANDLER) … … 500 517 KeLowerIrql(OldIrql); /* Lowering the IRQL early in the hope that we may catch exceptions below. */ 501 518 502 # ifndef IN_GUEST519 # ifndef IN_GUEST 503 520 if (!g_offrtNtPbQuantumEnd && !g_offrtNtPbDpcQueueDepth) 504 521 DbgPrint("IPRT: Neither _KPRCB::QuantumEnd nor _KPRCB::DpcQueueDepth was not found! Kernel %u.%u %u %s\n", 505 522 OsVerInfo.uMajorVer, OsVerInfo.uMinorVer, OsVerInfo.uBuildNo, OsVerInfo.fChecked ? "checked" : "free"); 506 # ifdef DEBUG523 # ifdef DEBUG 507 524 else 508 525 DbgPrint("IPRT: _KPRCB:{.QuantumEnd=%x/%d, .DpcQueueDepth=%x/%d} Kernel %u.%u %u %s\n", 509 526 g_offrtNtPbQuantumEnd, g_cbrtNtPbQuantumEnd, g_offrtNtPbDpcQueueDepth, g_offrtNtPbDpcQueueDepth, 510 527 OsVerInfo.uMajorVer, OsVerInfo.uMinorVer, OsVerInfo.uBuildNo, OsVerInfo.fChecked ? "checked" : "free"); 528 # endif 511 529 # endif 512 #endif 530 #endif /* RT_ARCH_AMD64 || RT_ARCH_X86 */ 513 531 514 532 /*
Note:
See TracChangeset
for help on using the changeset viewer.