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

Sdhost / rpisdhc boot support #33

Closed
wants to merge 2 commits into from
Closed

Conversation

Googulator
Copy link

No description provided.

andreiw and others added 2 commits June 8, 2018 00:31
Building, using, etc.

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
This is much faster than the Arasan controller, which in turn is freed
up for use with SDIO.

For some reason, this won't work with the edk2 in-tree MmcDxe, so import
Microsoft's version from the IoT UEFI.

The UEFI driver for Arasan needs to be disabled, otherwise it will hang
up for a long time on startup, trying to enumerate the SDIO WiFi chip as
a storage device.
Copy link
Owner

@andreiw andreiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Very cool.

It will take a bit of time to merge this. Namely, because:

  • Need to be able to choose default controller at compile and setup time.
  • Need to figure out why MmcDxe doesn't work and fix it appropriately without regressing Arasan support. E.g. taking in MS's MmcDxe is not a solution... their approach to handling high speed switching is even worse than what the old edk2 MmcDxe is/was doing).

I'll put more comments here as I make forward progress on the merge.

@SuperJMN
Copy link

SuperJMN commented Jun 12, 2018

Hey guys, could you please, join to our Window ARM64 on Raspberry Pi group? You can join to share our experiences / updates regarding this project : it's here https://t.me/joinchat/ACWtmw7G42XInm3lAronmw

We're already 11 members and growing!

@Googulator
Copy link
Author

I wouldn't be too worried about Arasan support, since the Arasan is necessary for WiFi and (on the 3B+ at least) Bluetooth (sdhost doesn't support SDIO). So, setting the Arasan to handle the SD card disables WiFi.

@woachk
Copy link

woachk commented Jun 12, 2018

@SuperJMN please don't spam and split the efforts like that, ugh.

@Googulator Bluetooth should be over UART actually. Also note that MS uses Arasan on RPi2 for SD storage. (and that the Pi2 is 64-bit these days).

Anyway, once USB drivers are ready, it'll matter less.

@thchi12
Copy link

thchi12 commented Jun 12, 2018

Bluetooth...Maybe we need to disable UART and get sth. from ms-iot bsp?

@andreiw
Copy link
Owner

andreiw commented Jun 13, 2018 via email

@andreiw andreiw mentioned this pull request Jun 13, 2018
@thchi12
Copy link

thchi12 commented Jun 13, 2018

I found this a little bit unstable?
I'm now stuck at UEFI shell.And typing FS0: doesn't change to that drive...But I was able to boot last time.

@Googulator
Copy link
Author

Put the card in a PC, and run chkdsk on it. Sometimes the filesystem is left in an inconsistent state on shutdown, due to lack of clean ACPI shutdown support.

@andreiw andreiw force-pushed the master branch 2 times, most recently from 855ce33 to a23a991 Compare June 16, 2018 08:16
andreiw added a commit that referenced this pull request Jun 16, 2018
SdHost is the "other" proprietary BCM
SD controller, vaguely similar to SDHCI but
(of course, of course) completely incompatible.

The Arasan SDHCI controller is SDIO capable,
so if the OS wishes to use the WiFi SDIO
adapter, the SD card needs to be routed
to SdHost.

You can switch the SD card between Arasan
and SdHost in the UEFI setup screen
("Device Manager"->"Raspberry Pi Configuration"->
 "Chipset"). At compile time this is the
 SdIsArasan Pcd.

The SdHost driver today is in mildly better shape
over the Arasan one, supporting 4-bit and HS (50Mhz)
modes. Both, of course, can't support any of the 1.8v
modes.

The Arasan driver is still the default pending
OS boot integration testing.

This merges #33

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
andreiw added a commit that referenced this pull request Jun 16, 2018
Expose both SD controllers to HLOS. UEFI can
use either to route uSD slot to.

This merges #33

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
@andreiw andreiw closed this Jun 16, 2018
@andreiw
Copy link
Owner

andreiw commented Jun 16, 2018

Merged.

andreiw added a commit that referenced this pull request Jun 17, 2018
SdHost is the "other" proprietary BCM
SD controller, vaguely similar to SDHCI but
(of course, of course) completely incompatible.

The Arasan SDHCI controller is SDIO capable,
so if the OS wishes to use the WiFi SDIO
adapter, the SD card needs to be routed
to SdHost.

You can switch the SD card between Arasan
and SdHost in the UEFI setup screen
("Device Manager"->"Raspberry Pi Configuration"->
 "Chipset"). At compile time this is the
 SdIsArasan Pcd.

The SdHost driver today is in mildly better shape
over the Arasan one, supporting 4-bit and HS (50Mhz)
modes. Both, of course, can't support any of the 1.8v
modes.

The Arasan driver is still the default pending
OS boot integration testing.

This merges #33

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
andreiw added a commit that referenced this pull request Jun 17, 2018
Expose both SD controllers to HLOS. UEFI can
use either to route uSD slot to.

This merges #33

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants