Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some USB drives are not detected in Boot Menu in blue USB port #823

Closed
pkubaj opened this issue Apr 25, 2024 · 5 comments
Closed

Some USB drives are not detected in Boot Menu in blue USB port #823

pkubaj opened this issue Apr 25, 2024 · 5 comments
Labels

Comments

@pkubaj
Copy link

pkubaj commented Apr 25, 2024

Component

Dasharo firmware

Device

Protectli VP6670

Dasharo version

0.9.0rc3

Dasharo Tools Suite version

No response

Brief summary

VP6670 - USB 3.0 port doesn't detect a bootable pendrive

How reproducible

No response

How to reproduce

Plug in a bootable pendrive into USB 3.0 (blue) type A port.

Expected behavior

Pendrive should be visible in the boot menu.

Actual behavior

Pendrive is not visible. It is visible after replugging to the near USB 2.0 port.

Screenshots

No response

Additional context

No response

Solutions you've tried

No response

@pkubaj pkubaj added the bug Something isn't working label Apr 25, 2024
@macpijan
Copy link
Contributor

@pkubaj

Thank you for catching and reporting this issue. I would appreciate a bit more details in your reports, however:

  • which USB device
  • how many attempts you have made (what is the reproducibility)

I have run a few attempts to verify this issue. I have found the following after running 5 iterations of each of pendrives (the reproducibility is 100% across these 5 attempts).

  1. Detected in blue port:
  • ADATA C008 16GB
  • SanDisk Cruzer Force 32GB
  1. Not detected in blue port
  • SanDisk Ultra Flair 16GB
  • ADATA UV150 32GB
  • SanDisk Ultra 64GB

@macpijan macpijan changed the title VP6670 - USB 3.0 port doesn't detect a bootable pendrive Some USB drives are not detected in Boot Menu in blue USB port Apr 26, 2024
@pkubaj
Copy link
Author

pkubaj commented Apr 26, 2024

I have made four attempts (two for each 6670). Each was done with a Kingston USB 3.0 pendrive. Reproducibility was also 100%.

@filipleple
Copy link
Member

CBmem log summary

I've dumped and went through the logs for each of the confirmed reproducibly
(not)working sticks above and this is what I've managed to notice:

XHCI initialization, from XhcCreateUsb3Hc through to UsbBusStart looks the
same for all cases. For non-working sticks, what happens after splits into two
cases:

  • Case 1. No Device Connect detection for the incompatible stick - EDK2 skips
    over to SATA initialization immediately after UsbBusStart.
  • Case 2. Both sticks, the one that works and the one that doesn't get Device
    Connect detection, one has Bad MBR partition size - the stick does get detected
    and EDK2 proceeds to initialize it, but throws a bad MBR error along the way

Case 1: ADATA UV150 32GB; same as SanDisk Ultra 64GB

XhcCreateUsb3Hc: Capability length 0x80
XhcCreateUsb3Hc: HcSParams1 0x10000840
XhcCreateUsb3Hc: HcSParams2 0x14200054
XhcCreateUsb3Hc: HcCParams 0x20007FC1
XhcCreateUsb3Hc: DBOff 0x3000
XhcCreateUsb3Hc: RTSOff 0x2000
XhcCreateUsb3Hc: UsbLegSupOffset 0x46C
XhcCreateUsb3Hc: DebugCapSupOffset 0x700
XhcSetBiosOwnership: called to set BIOS ownership
XhcResetHC!
XhcInitSched:DCBAA=0x74F06000
XhcInitSched: Created CMD ring [74F06240~74F07240) EVENT ring [74F07240~74F09240)
InstallProtocolInterface: 3E745226-9818-45B6-A2AC-D7CD0E8BA2BC 74F4D038
XhcDriverBindingStart: XHCI started for controller @ 74FC8F18
PROGRESS CODE: V02020000 I0
PROGRESS CODE: V02020004 I0
InstallProtocolInterface: 240612B7-A063-11D4-9A3A-0090273FC14D 74F4C1A0
PROGRESS CODE: V02020003 I0
XhcGetCapability: 16 ports, 64 bit 1
UsbRootHubInit: root hub 74EEF098 - max speed 3, 16 ports
UsbBusStart: usb bus started on 74FC8F18, root hub 74EEF098
[Bds]RegisterKeyNotify: 0000/000D 80000000/00 Success
PROGRESS CODE: V02020000 I0
PROGRESS CODE: V02010000 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02020000 I0

Case 2: SanDisk Ultra Flair 16GB

XhcCreateUsb3Hc: Capability length 0x80
XhcCreateUsb3Hc: HcSParams1 0x10000840
XhcCreateUsb3Hc: HcSParams2 0x14200054
XhcCreateUsb3Hc: HcCParams 0x20007FC1
XhcCreateUsb3Hc: DBOff 0x3000
XhcCreateUsb3Hc: RTSOff 0x2000
XhcCreateUsb3Hc: UsbLegSupOffset 0x46C
XhcCreateUsb3Hc: DebugCapSupOffset 0x700
XhcSetBiosOwnership: called to set BIOS ownership
XhcResetHC!
XhcInitSched:DCBAA=0x74F06000
XhcInitSched: Created CMD ring [74F06240~74F07240) EVENT ring [74F07240~74F09240)
InstallProtocolInterface: 3E745226-9818-45B6-A2AC-D7CD0E8BA2BC 74F4D038
XhcDriverBindingStart: XHCI started for controller @ 74FC8F18
PROGRESS CODE: V02020000 I0
PROGRESS CODE: V02020004 I0
InstallProtocolInterface: 240612B7-A063-11D4-9A3A-0090273FC14D 74F4C1A0
PROGRESS CODE: V02020003 I0
XhcGetCapability: 16 ports, 64 bit 1
UsbRootHubInit: root hub 74EEF098 - max speed 3, 16 ports
UsbBusStart: usb bus started on 74FC8F18, root hub 74EEF098
[Bds]RegisterKeyNotify: 0000/000D 80000000/00 Success
XhcClearRootHubPortFeature: status Success
UsbEnumeratePort: port 1 state - 01, change - 01 on 74EEF098
UsbEnumeratePort: Device Connect/Disconnect Normally
UsbEnumeratePort: new device connected at port 1
XhcUsbPortReset!
XhcSetRootHubPortFeature: status Success
XhcClearRootHubPortFeature: status Success
XhcClearRootHubPortFeature: status Success
Enable Slot Successfully, The Slot ID = 0x1
    Address 1 assigned successfully
UsbEnumerateNewDev: hub port 1 is reset
UsbEnumerateNewDev: device is of 2 speed
UsbEnumerateNewDev: device uses translator (0, 0)
UsbEnumerateNewDev: device is now ADDRESSED at 1
UsbEnumerateNewDev: max packet size for EP 0 is 64
Evaluate context
UsbBuildDescTable: device has 1 configures
UsbGetOneConfig: total length is 32
UsbParseConfigDesc: config 1 has 1 interfaces
UsbParseInterfaceDesc: interface 0(setting 0) has 2 endpoints
Endpoint[81]: Created BULK ring [74F0AAC0~74F0BAC0)
Endpoint[2]: Created BULK ring [74F0BAC0~74F0CAC0)
Configure Endpoint
UsbEnumerateNewDev: device 1 is now in CONFIGED state
UsbSelectConfig: config 1 selected for device 1
UsbSelectSetting: setting 0 selected for interface 0
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 74EEF518
InstallProtocolInterface: 2B2F68D6-0CD2-44CF-8E8B-BBA20B1B5B75 74EEEAC0
PROGRESS CODE: V02020006 I0
PROGRESS CODE: V02020000 I0
PROGRESS CODE: V02010000 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02020000 I0
UsbBusRecursivelyConnectWantedUsbIo: TPL before connect is 4
UsbMassInitMedia: UsbBootGetParams (Media changed)
InstallProtocolInterface: 964E5B21-6459-11D2-8E39-00A0C969723B 74EECC38
InstallProtocolInterface: D432A67F-14DC-484B-B3BB-3F0291849327 74EECCB0
InstallProtocolInterface: CE345171-BA0B-11D2-8E4F-00A0C969723B 74EECEA0
 BlockSize : 512
 LastBlock : 3956FFF
 Valid efi partition table header
 Valid efi partition table header
 Valid primary and Valid backup partition table
 Partition entries read block success
 Number of partition entries: 176
 start check partition entries
 End check partition entries
 Index : 0
 Start LBA : 40
 End LBA : 21F
 Partition size: 1E0
 Start : 8000 End : 43E00
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 74EEC598
InstallProtocolInterface: 964E5B21-6459-11D2-8E39-00A0C969723B 74EE3A30
InstallProtocolInterface: 8CF2F62C-BC9B-4821-808D-EC9EC421A1A0 74EE3AE8
InstallProtocolInterface: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 0
 Index : 1
 Start LBA : 220
 End LBA : 421F
 Partition size: 4000
 Start : 44000 End : 843E00
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 74EE3298
InstallProtocolInterface: 964E5B21-6459-11D2-8E39-00A0C969723B 74EE3530
InstallProtocolInterface: 8CF2F62C-BC9B-4821-808D-EC9EC421A1A0 74EE35E8
InstallProtocolInterface: C12A7328-F81F-11D2-BA4B-00A0C93EC93B 0
 Index : 2
 Start LBA : 4220
 End LBA : 266D5F
 Partition size: 262B40
 Start : 844000 End : 4CDABE00
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 74EDCD18
InstallProtocolInterface: 964E5B21-6459-11D2-8E39-00A0C969723B 74EDC030
InstallProtocolInterface: 8CF2F62C-BC9B-4821-808D-EC9EC421A1A0 74EDC0E8
InstallProtocolInterface: 48465300-0000-11AA-AA11-00306543ECAC 0
 Index : 3
 Start LBA : 266D60
 End LBA : 266FB7
 Partition size: 258
 Start : 4CDAC000 End : 4CDF6E00
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 74EDC918
InstallProtocolInterface: 964E5B21-6459-11D2-8E39-00A0C969723B 74EDC9B0
InstallProtocolInterface: 8CF2F62C-BC9B-4821-808D-EC9EC421A1A0 74EDCA68
InstallProtocolInterface: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 0
Prepare to Free Pool
InstallProtocolInterface: CE345171-BA0B-11D2-8E4F-00A0C969723B 74EE3EA0
 BlockSize : 512
 LastBlock : 1DF
InstallProtocolInterface: CE345171-BA0B-11D2-8E4F-00A0C969723B 74EE3D20
 BlockSize : 512
 LastBlock : 3FFF
PartitionValidMbr: Bad MBR partition size EndingLBA(42EF) > LastLBA(3FFF)
InstallProtocolInterface: 964E5B22-6459-11D2-8E39-00A0C969723B 74EE1030
Installed Fat filesystem on 74EE3798
InstallProtocolInterface: CE345171-BA0B-11D2-8E4F-00A0C969723B 74EE2620
 BlockSize : 512
 LastBlock : 262B3F
InstallProtocolInterface: CE345171-BA0B-11D2-8E4F-00A0C969723B 74EE0E20
 BlockSize : 512
 LastBlock : 257
UsbBusRecursivelyConnectWantedUsbIo: TPL after connect is 4
 BlockSize : 512
 LastBlock : 3956FFF
 Valid efi partition table header
 Valid efi partition table header
 Valid primary and Valid backup partition table
 Partition entries read block success
 Number of partition entries: 176
 start check partition entries
 End check partition entries
 Index : 0
 Start LBA : 40
 End LBA : 21F
 Partition size: 1E0
 Start : 8000 End : 43E00
 Index : 1
 Start LBA : 220
 End LBA : 421F
 Partition size: 4000
 Start : 44000 End : 843E00
 Index : 2
 Start LBA : 4220
 End LBA : 266D5F
 Partition size: 262B40
 Start : 844000 End : 4CDABE00
 Index : 3
 Start LBA : 266D60
 End LBA : 266FB7
 Partition size: 258
 Start : 4CDAC000 End : 4CDF6E00
Prepare to Free Pool
 BlockSize : 512
 LastBlock : 1DF
 BlockSize : 512
 LastBlock : 262B3F
 BlockSize : 512
 LastBlock : 257
SataControllerStart start
Original PCI Attributes = 0x4700
Supported PCI Attributes = 0xE700
PROGRESS CODE: V02010004 I0
Enabled PCI Attributes = 0x700
Ports Implemented(PI) = 0x3
HBA Capabilities(CAP) = 0xE534FF01
InstallProtocolInterface: A1E37052-80D9-4E65-A317-3E9A55C43EC9 74EED920

full logs available here

@filipleple
Copy link
Member

filipleple commented May 9, 2024

After further analysis, it turned out coreboot would disable PCI 00:0d.0 upon init, responsible for the USB3/USB-C stack. The issue has been patched by Dasharo/coreboot#499 and confirmed to be resolved.

@pkubaj
Copy link
Author

pkubaj commented May 21, 2024

Works fine with rc4.

@pkubaj pkubaj closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants