Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.OS.MS-WINDOWS.PROG.N
disable all acpi interrupts
From
daniel S
@21:1/5 to
All
on Tue Jul 25 19:44:55 2023
hello im trying to disable all acpi interuupts in windows kernel i found out keraiseirql high_level not enough
```#define IA32_APIC_BASE_MSR 0x1B
#define APIC_TPR_OFFSET 0x80
volatile ULONG* MapLocalApicBase()
{
ULONG64 apicBaseMsrValue = __readmsr(IA32_APIC_BASE_MSR);
PHYSICAL_ADDRESS apicBaseAddress;
apicBaseAddress.QuadPart = apicBaseMsrValue & 0xFFFFFFFFF000;
return (volatile ULONG*)MmMapIoSpace(apicBaseAddress, 4096, MmNonCached);
}
ULONG MaskAllInterruptsAndStoreOriginal()
{
volatile ULONG* localApicBase = MapLocalApicBase();
if (!localApicBase)
{
DbgPrint("Failed to map Local APIC base.");
return 0; // return 0 as a failure signal, handle it accordingly in your main code
}
volatile ULONG* tprRegister = localApicBase + (APIC_TPR_OFFSET / sizeof(ULONG));
// Store the original value
ULONG originalTPR = *tprRegister;
*tprRegister = 0xFF;
// Unmap the local APIC space after use
MmUnmapIoSpace((PVOID)localApicBase, 4096);
return originalTPR;
}
void RestoreInterrupts(ULONG originalTPR)
{
volatile ULONG* localApicBase = MapLocalApicBase();
if (!localApicBase)
{
DbgPrint("Failed to map Local APIC base.");
return;
}
volatile ULONG* tprRegister = localApicBase + (APIC_TPR_OFFSET / sizeof(ULONG));
*tprRegister = originalTPR;
// Unmap the local APIC space after use
MmUnmapIoSpace((PVOID)localApicBase, 4096);
}``` am i doing correct ?
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Guest
Thu Dec 26 05:34:50 2024
from
/bin/busybox Cat /proc/self/ex
via
Raw
Gwylbert
Thu Dec 26 05:25:03 2024
from
Sydney, Nsw
via
Telnet
Guest
Thu Dec 26 04:02:03 2024
from
/bin/busybox Cat /proc/self/ex
via
Raw
Gwylbert
Thu Dec 26 00:08:06 2024
from
Sydney, Nsw
via
Telnet
Bob Worm
Wed Dec 25 23:09:42 2024
from
Wales, Uk
via
Telnet
Guest
Wed Dec 25 19:36:50 2024
from
/bin/busybox Cat /proc/self/ex
via
Raw
Keyop
Wed Dec 25 16:24:41 2024
from
Huddersfield, West Yorkshire
via
SSH
Daniel Garrod
Wed Dec 25 16:22:01 2024
from
Cambridge, Uk
via
Telnet
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
379
Nodes:
16 (
2
/
14
)
Uptime:
44:56:12
Calls:
8,141
Calls today:
4
Files:
13,085
Messages:
5,858,057