Jump to content

Mov AX, 0xDEAD

Member
  • Posts

    328
  • Joined

  • Last visited

  • Days Won

    6
  • Donations

    0.00 USD 
  • Country

    Uzbekistan

Everything posted by Mov AX, 0xDEAD

  1. @Damnation APIC processor enumeration 0,2,4,..30,1,3,..,31 SSDT enumeration 0,1,...,31 This can be problem because patch is not very good (doesn't use _UID) Try better version: 1) dat.c 2) get.c =>
  2. Hardware Сpu detection behind in ACPIGetProcessorStatus(): Real i3 8100 (4 cores, no HT) DSDT static definition (8 processors): i3 8100 APIC table (4 cores): VBOX DSDT (5 processors): VBOX APIC (VM setted to 2 cores) ACPIGetProcessorStatus() drops all SSDT/DSDT definitions if Processor ID from APIC not found in definition Definition can be Processor (CPU0, 0x01, 0x00001810, 0x06) or new Name (_UID, 0) Interesting thing - on real H110M Processor ID enumerated from 1, on VBOX - from 0
  3. @Dietmar, @Damnation 1) On VirtualBox virtual CPU cores, there is no difference between Device manager and VM settings. SSDT always defines 4 cores, legacy Processor() commented, if i set processors=1 in VM settings, only one CPU will be showed inside VM XP, so windows kernel detect processor amount from APIC or other way and skip fake DSDT definitions: DefinitionBlock ("", "SSDT", 1, "VBOX ", "VBOXCPUT", 0x00000002) { Scope (\_SB) { Device (PLTF) { Name (_HID, "ACPI0010" /* Processor Container Device */) // _HID: Hardware ID Name (_CID, EisaId ("PNP0A05") /* Generic Container Device */) // _CID: Compatible ID Name (_UID, One) // _UID: Unique ID Device (C000) { Name (_HID, "ACPI0007" /* Processor Device */) // _HID: Hardware ID Name (_UID, 0) // _UID: Unique ID } Device (C001) { Name (_HID, "ACPI0007" /* Processor Device */) // _HID: Hardware ID Name (_UID, 1) // _UID: Unique ID } Device (C002) { Name (_HID, "ACPI0007" /* Processor Device */) // _HID: Hardware ID Name (_UID, 2) // _UID: Unique ID } Device (C003) { Name (_HID, "ACPI0007" /* Processor Device */) // _HID: Hardware ID Name (_UID, 3) // _UID: Unique ID } } } Scope (\_PR) { //Processor (CPU0, 0x00, 0x00000000, 0x00) {} //Processor (CPU1, 0x01, 0x00000000, 0x00) {} Noop } kernel debug log fom new patch: All 4 definitions are active and sucessfully processed by ACPI interpereter, but cpu1, cpu2, cpu3 are fakes and skipped by kernel Enumeration of kernel started from 0 and match to DSDT definition _UID=0, _UID=1, _UID=2, _UID=3 2) BSOD with new acpi.sys is unexpected, new patch don't touch existing Processor() definition, problem is unknow. Need kernel crashdump from real hardware for investigation
  4. Compare binaries from MS, they also different with this alias XP - ACPI0006 General purpose events device W2003/W7/... - ACPI0004 Module Device (NEC ACPI Module Device for example)
  5. Hi ! Experimental Obsolte patch to solve ACPI0007 Processor definition 1) dat.c: INTERNAL_DEVICE_TABLE AcpiInternalDeviceTable[] = { ... "ACPI0007", &AcpiProcessorIrpDispatch, NULL, NULL } ; INTERNAL_DEVICE_FLAG_TABLE AcpiInternalDeviceFlagTable[] = { ... ACPI0007, DEV_CAP_PROCESSOR, NULL, 0 }; 2) get.c: ACPIGetProcessorStatus() ... ASSERT( DeviceExtension->AcpiObject != NULL ); ... To: ASSERT( DeviceExtension->AcpiObject != NULL ); // patch _HID="ACPI0007" device => Processor() object if (NSGETOBJTYPE(DeviceExtension->AcpiObject) == OBJTYPE_DEVICE) { PNSOBJ nsObj = DeviceExtension->AcpiObject; nsObj->ObjData.dwDataType = OBJTYPE_PROCESSOR; nsObj->ObjData.dwDataLen = sizeof(PROCESSOROBJ); nsObj->ObjData.pbDataBuff = (PUCHAR) ExAllocatePoolWithTag( (NonPagedPool), nsObj->ObjData.dwDataLen, 'ORPH' ); if (nsObj->ObjData.pbDataBuff == NULL) { ACPIInternalError( ACPI_GET ); } else { PPROCESSOROBJ pproc; PNSOBJ uidObj; ULONG cpuenum = 0; RtlZeroMemory(nsObj->ObjData.pbDataBuff, nsObj->ObjData.dwDataLen); pproc = (PPROCESSOROBJ)nsObj->ObjData.pbDataBuff; uidObj = ACPIAmliGetNamedChild( nsObj, PACKED_UID ); // if _UID exist if (uidObj != NULL && DeviceExtension->InstanceID != NULL) { // InstanceID because sync-evaluating "_UID" always return error RtlCharToInteger((CONST char *)DeviceExtension->InstanceID, 10, &cpuenum); } pproc->bApicID = (UCHAR) cpuenum; // FACP.PM1A_Event_Block + 0x10 pproc->dwPBlk = (ULONG) AcpiInformation->FixedACPIDescTable->pm1a_evt_blk_io_port + 0x10; // 0 or 6 per ACPI spec pproc->dwPBlkLen = (ULONG) 6; KdPrint(("ACPI0007 CPU=%x PBlk=%x \n", cpuenum, pproc->dwPBlk)); } } For dwPBlk calculation used tips from TonyMACx86 forum, but i don't sure about accuracy this way (may be force to 0 if Windows never uses Processor Block Registers) Tested on VirtualBox only, need real hardware confirmation
  6. DSDT binary in extracted BIOS is template, not final DSDT table Example declaration of GNVS on my H110: 1) To load DSDT from registry, save DSDT before from actual DSDT table in RAM, not bios template 2) If you change some BIOS setting or add/remove PCI devices, bios may change region adresses and your copy in registry will be obsolete/different
  7. @Damnation 1) extended AcpiInternalDeviceFlagTable[] to set DEV_CAP_PROCESSOR flag to special HID name: 2) extended AcpiInternalDeviceTable[] to enable processor dispatch routines: There can be different DEV_CAP_PROCESSOR processing in Win10 code to proper handle CPU device without Processor opcode First extend two tables and see is it enough or not
  8. disasm win10 driver, see how ACPI0007 detected and related to old Processor(), if it same as xp repeat in sourrces
  9. This ssdt out of acpi 1.x/2.x specification, no Processor opcode, now cpu core is just device with "new" special name _HID=ACPI0007 and unique _UID Hard to fix, need hook creating device, check for keyword ACPI0007, manually call to Processor(), there is mismatch arguments, so need patch this part too.
  10. OK, classic declaration AMD way: with XP acpi.sys "Processor" opcode never called, Processor() sets important thing - OBJTYPE_PROCESSOR later, this type trigger to call OSNotifyCreateProcessor() also "Processor (PR00, 0x01, 0x00001810, 0x06)" definition has additional arguments: 0x01, 0x00001810, 0x06 i dont know what these numebr means, acpi specification can give answer if you care
  11. @Damnation Unmodded ssdt2.dsl has Processor definitions for 32 CPUs Full acpi log example: Short log example:: CPU Name "GenuineIntel - x86 Family 6 Model 158" generated by acpi.sys itself and reported to Windows to show this way at DevManager
  12. @Damnation Look for dsdt table, processor definition has dedicated AML opcode, acpi driver then call internal OSNotifyCreateProcessor() to inform Windows about cpu and his name
  13. Feb 2021 is last master, i didnt added new functions because theres is no new ported *chance to run on XP* drivers with missing imports. @George King try to port SecureDigital PCI driver, only one new IoSynchronousCallDriver function was posted on prev page, no more changes
  14. @Damnation No need control this "new" device, patched intelppm.sys will run HLT or MWAIT CPU comand when windows want go to idle state This mean CPU itself will switch to power-saving mode until hardware interrupt event happens If CPU ignores HLT command - this is really bad cpu
  15. @Damnation 1) Use 3rd party tools to show current cpu powerstate, some like ThrottleStop but must supports your CPU model 2) In Windows XP enable any powersaving mode: Presentation or Portable
  16. @George King Ignore callback logic, let driver registers calbacks, but currenlty no way to call driver code from kernel. You can try sdbus driver with your simple stabs, they are OK, if you'l get error 10, you are unlucky, this means some condition fail in code driver, you never discover it without steb-by-step debugging
  17. PoFxRegisterDevice - CALLBACKs PoFxIdleComponent - NO CALLBACKs PoFxSetDeviceIdleTimeout - NO CALLBACKs PoFxUnregisterDevice - NO CALLBACKs PoFxStartDevicePowerManagement - NO CALLBACKs PoRegisterPowerSettingCallback + PoUnregisterPowerSettingCallback - CALLBACKs, Vista+ new feature, not used in sdbus PoFxActivateComponent - NO CALLBACKs PoFxCompleteIdleCondition - NO CALLBACKs PoFxCompleteIdleState - NO CALLBACKs PoFxReportDevicePoweredOn - NO CALLBACKs PoFxCompleteDevicePowerNotRequired - NO CALLBACKs
  18. Most important is Win8 new Power Framework embeded to ntoskrnl it is complicated code with callbacks to user code(not sure 100%), it is hard to emulate it properly, you can try replace most of functions to dummy stubs, but do it just as a fun, no any guarantee
  19. If user still uses Win7 RTM/SP1 without last updates, this Win7 kernel doesnt have for example new EtwSetInformation from your list, what is point to redirect non-exist function ? Depend Walker will still shows missed imports "driver->ntoskr8->ntoskrnl.exe"
  20. @George King I feel these functions don't used in real drivers, so it is not necessary to add every new function from updated kernel
  21. @George King IoSynchronousCallDriver is a fake, it works as usual ASYNC IofCallDriver Right SYNC implementation based on win8.1 decompiled code:
  22. @daniel_k no IFR setting -> to hard to 1) find exact uefi module 2) find inject place inside module in old leaked AMI UEFI sources, tolud used in NBPEI.c/NBPEIBoard.c, i dont know name of final module VirtualBox: 1) limited cpu support, max 8 cpu on real 4-core cpu 2) ssdt table very simple, no packages/power control and other stuff from real boards: DefinitionBlock ("", "SSDT", 1, "VBOX ", "VBOXCPUT", 0x00000002) { Scope (\_PR) { Processor (CPU0, 0x00, 0x00000000, 0x00) {} Processor (CPU1, 0x01, 0x00000000, 0x00) {} Processor (CPU2, 0x02, 0x00000000, 0x00) {} Processor (CPU3, 0x03, 0x00000000, 0x00) {} Processor (CPU4, 0x04, 0x00000000, 0x00) {} Processor (CPU5, 0x04, 0x00000000, 0x00) {} Processor (CPU6, 0x04, 0x00000000, 0x00) {} Processor (CPU7, 0x04, 0x00000000, 0x00) {} } QEMU: 1) doesn't have SSDT(i use patched 2.11), only DSDT exist 2) DSDT dont have CPU related definitions So it is useless to test cpu related DSDT/SSDT tables on VM because it is amost virtual or stubs
  23. Hi @Damnation dump_ntoskrn8.sys is auto-copy of ntoskrn8.sys linked to storage driver for saving crashdump storage driver also has copy like dump_iastor.sys, if storage driver is scsi, dump_storport.sys also will be created, this is how windows create independed crashdump driver stack 1) try to fully disable crashdumps in windows control panel 2) if crashdump saved on disk, analyze it in windbg 3) maybe there is some conflict between ntoskrn8.sys and dump_ntoskrn8.sys, local variables or some similar, need crashdump or windbg live session !analyze log 4) KDNET is independ of current network driver, rename realtek's kd_02_10ec.dll to kdstub.dll/kdnet10.dll
×
×
  • Create New...