📜 ⬆️ ⬇️

AMI UEFI firmware features

In one of the previous publications [1], we touched upon such a seemingly obvious question: “How to make sure that the flash drive works in USB 3.0?” Voices in the discussion first sarcastically noted that the article lacked the “sadomaso” tag, but then, as if frightened by their own ego, crossed out this thought from our consciousness.

But this thought has already injured the weak minds of experimenters. There was a desire to check the availability of USB 3.0 for any connected device at the start stage (for example, in the UEFI Shell) before launching the operating system. To begin with, a small CheckUSB utility was written (which, however, so far is only designed to work with some implementations of the 8th version of Intel chipsets).

image
Figure 1 . Experiments with CheckUSB utility on ASUS T300LA laptop
')
In the approach to the mobile platform, it turned out that in some cases, when rebooting, the laptop's UEFI firmware initializes the USB subsystem incompletely, leaving some of the work to the operating system.

xHCI Pre-Boot Mode   UEFI firmware
Figure 2 . XHCI Pre-Boot Mode option in UEFI firmware settings on ASUS T300LA laptop

For example, if in CMOS Setup the initial state of the xHCI Pre-Boot Mode option is set to Disable, replace with Smart Auto, and without loading the operating system, run the CheckUSB utility, we see that the list of devices connected to the xHCI controller is empty. This means that an EHCI controller is used to service the connected USB devices.
USB Routing to EHCI
Figure 3 . Connecting USB devices to the Enhanced Host Controller Interface on an ASUS N750JK laptop before running Windows

So, if you boot into UEFI right after switching on, without starting Windows, you get:

The values ​​of the masks show that the operating system has the right to switch connections to the xHCI service:

The device list is empty because we only display the xHCI registers, and the devices are transferred to EHCI service using RMH. Description of the bit fields is available in the article “Diagnostic utility CheckUSB” [2], [3].

If the restart is repeated after the start of the operating system, all devices are correctly connected to the xHCI controller.
USB Routing to xHCI
Figure 4 . Connecting USB devices to eXtensible Host Controller Interface on ASUS N750JK laptop when booting after Windows

The access control logic for ports “remembers” the state that occurred before the reboot:
.
Recall that the number of external USB3 ports on the ASUS N750JK platform under investigation is 4.

Links


  1. How to make sure that the flash drive works in USB 3.0?
  2. Diagnostic utility CheckUSB
  3. How to check USB3 mode?

Source: https://habr.com/ru/post/253097/


All Articles