From 1e7632657e4f7c107746cafe398cfd019e7733fe Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Apr 2023 18:54:31 +0300 Subject: [PATCH] Do not load AHCI driver if the debugger is attached --- Storage/AHCI/AHCI.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Storage/AHCI/AHCI.cpp b/Storage/AHCI/AHCI.cpp index d2c666d7..5c252b5c 100644 --- a/Storage/AHCI/AHCI.cpp +++ b/Storage/AHCI/AHCI.cpp @@ -428,6 +428,10 @@ int DriverEntry(void *Data) KAPI = (KernelAPI *)Data; if (KAPI->Version.Major < 0 || KAPI->Version.Minor < 0 || KAPI->Version.Patch < 0) return KERNEL_API_VERSION_NOT_SUPPORTED; + + if (KAPI->Info.KernelDebug) /* FIXME: TCG doesn't like this driver. */ + return NOT_AVAILABLE; + return OK; }