Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-18085

PnP manager - Crash on detection phase when AMT 2.0 is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • NTCore

    Description

      ReactOS revision 20220303-0.4.15-GNU_8.4.0

      In an Intel vPro platform (e.g. Thinkcentre M55 with Core 2 Duo vPro), when AMT is enabled by the Intel ME interface, ReactOS will fault with a BSOD 0x7E on boot.

      (as reported on Mattermost chat)

      (ntoskrnl/io/pnpmgr/pnpres.c:154) IopFindPortResource failed!
      (ntoskrnl/io/pnpmgr/pnpres.c:417) Failed to find an available port resource (0x3428 to 0x342f length: 0x8)
      (ntoskrnl/io/pnpmgr/pnpres.c:469) Unable to satisfy required resource in list 0
      
      Entered debugger on first-chance exception (Exception Code: 0xc0000005) (Page Fault)
      Memory at 0x00000000 could not be accessed
      kdb:> bt
      Eip:
      <ntoskrnl.exe:80de0 (ntoskrnl/io/pnpmgr/pnpres.c:1232 (IopDetectResourceConflict))>
      Frames:
      <ntoskrnl.exe:823cc (ntoskrnl/io/pnpmgr/pnpres.c:1184 (IopAssignDeviceResources))>
      <ntoskrnl.exe:790dd (ntoskrnl/io/pnpmgr/devaction.c:2351 (PiDevNodeStateMachine))>
      <ntoskrnl.exe:79858 (ntoskrnl/io/pnpmgr/devaction.c:2577 (PipDeviceActionWorker))>
      <ntoskrnl.exe:79dbb (ntoskrnl/io/pnpmgr/devaction.c:2687 (PiQueueDeviceAction))>
      <ntoskrnl.exe:239304 (ntoskrnl/io/iomgr/driver.c:1156 (IopInitializeBootDrivers))>
      <ntoskrnl.exe:23a38b (ntoskrnl/io/iomgr/iomgr.c:557 (IoInitSystem))>
      <ntoskrnl.exe:235894 (ntoskrnl/ex/init.c:1808 (Phase1InitializationDiscard))>
      <ntoskrnl.exe:2dfe3 (ntoskrnl/ex/init.c:2020 (Phase1Initialization))>
      <ntoskrnl.exe:12c564 (ntoskrnl/ps/thread.c:156 (PspSystemThreadStartup))>
      <ntoskrnl.exe:14b8d9 (ntoskrnl/ke/i386/thrdini.c:78 (KiThreadStartup))>
      <ntoskrnl.exe:12c537 (ntoskrnl/ps/thread.c:63 (PspUserThreadStartup))>
      

      without /FIRSTCHANCE :

      (ntoskrnl/ps/thread.c:119) PS: Unhandled Kernel Mode Exception Pointers = 0xF73324D0
      (ntoskrnl/ps/thread.c:126) Code c0000005 Addr 8048085C Info0 00000000 Info1 00000000 Info2 00000000 Info3 00000000
       
      *** Fatal System Error: 0x0000007e (0xC0000005,0x8048085C,0xF7332978,0xF733267C)
      


      From my first light code analysis, this is what happens:

      https://github.com/reactos/reactos/blob/master/ntoskrnl/io/pnpmgr/pnpres.c
       

      224: AlternateRequired initializes to FALSE
      469: that break; would break the loop and it's not setting AlternateRequired = TRUE being on the other branch at 480 and jumping directly to row 531 (I suppose the Option == 0 probably meant to require that specific port and not trying alternative ones so I was excepting a early error code returning (that it's not the conflicting one because it's asserted by 11181) in this block instead of just breaking)
      531: AlternateRequired is false so the block is not executed and following lists are not handled.
      540: return NT_SUCCESS even without allocating the DescPtr and ResourceList pointers
      


      By replacing the break; on 469 with return STATUS_UNSUCCESFULL, the systems boots fine to the desktop.

      The issue does not arise when AMT is disabled - AMT routines at firmware level itself adds two communication devices (the SOL serial port and the IDER interface) so the detection is failing for this new added device on the PCI bus.

      With AMT Enabled, no settings at the AMT firmware seems to avoid this BSOD so I have for now acted for this reason on my local build (I'm fully aware it's a workaround).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              simonelombardo simonelombardo
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: