Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save richinseattle/815106f878a64adde45fcf4183e4cc8c to your computer and use it in GitHub Desktop.
Save richinseattle/815106f878a64adde45fcf4183e4cc8c to your computer and use it in GitHub Desktop.

Revisions

  1. @shinyquagsire23 shinyquagsire23 created this gist Jul 26, 2023.
    39 changes: 39 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    https://twitter.com/ShinyQuagsire/status/1536432635643211777 12:37 PM 路 Jun 13, 2022
    -----
    I figured out how to enable USB device mode on my XPS 13 (9350) 馃帀

    Though for some ungodly reason, it uses the right-side full USB port. So a crossover cable is required.
    -----


    https://twitter.com/ShinyQuagsire/status/1536434057671716864 12:43 PM 路 Jun 13, 2022
    -----
    Rough process: Same as https://casualhacking.io/blog/2019/6/2/debug-uefi-code-by-single-stepping-your-coffee-lake-s-hardware-cpu, but looking for "xDCI Support" instead.
    Dump the system SPI, get Setup from UEFI, run IFRExtractor.

    Used https://github.com/datasone/grub-mod-setup_var/releases/ to do
    setup_var_3 0x56B 1
    -----


    https://twitter.com/44670_/status/1536497209528971264 4:54 PM 路 Jun 13, 2022
    -----
    Is xDCI for DCI debug purpose only, or capable for emulating arbitrary usb devices?
    -----


    https://twitter.com/ShinyQuagsire/status/1536516075130478592 6:09 PM 路 Jun 13, 2022
    -----
    Arbitrary devices, `modprobe g_ether` pops up as an ethernet device. Also have to do
    `echo device > /sys/bus/platform/devices/intel_xhci_usb_sw/usb_role/intel_xhci_usb_sw-role-switch/role` to switch modes.

    Still working on porting on adding FunctionFS to libusbd though.
    -----

    https://twitter.com/ShinyQuagsire/status/1536478140473651200 3:38 PM 路 Jun 13, 2022
    -----
    I also figured it out for my Surface Go 1,
    setup_var_cv PchSetup 0x40 1 1

    which is super exciting bc that unblocks a project I've had in mind for a while: using it as a plug-in drawing tablet, just present as a HID touchscreen.
    -----