Re: [SeaBIOS] Failure to detect high-capacity SD card
On Mon, Sep 3, 2018 at 5:34 PM, Kevin O'Connor wrote: > On Fri, Aug 24, 2018 at 10:45:55AM -0400, Chris wrote: >> On Fri, Aug 24, 2018 at 10:28 AM, Kevin O'Connor wrote: >> > On Fri, Aug 24, 2018 at 09:48:27AM -0400, Chris wrote: >> >> On Fri, Aug 24, 2018 at 9:28 AM, Chris wrote: >> >> > So far it has worked on the first attempt every time. So it needs only >> >> > the delay and nothing else. >> >> > >> >> > I still need to test with all my SD cards. Though I only have a 64GB >> >> > Sandisk and a handful of 32GB Samsung. The question is whether or not >> >> > the delay is dependent on the card type or if it's just the controller >> >> > that needs to stabilize. >> >> >> >> OK, I tested all the cards I have and everything works. Attached is >> >> the simplified patch. Hopefully someone can test other cards. I'm >> >> interested to know if 128+GB and 16GB works. >> > >> > Thanks. If you increase SDHCI_POWER_ON_TIME instead, does that also >> > work? >> > >> > -Kevin >> >> Yes. Seems to work the same so far using the same delay (5). > > Thanks. I committed this change. FWIW I have been really hammering this and so far it is working perfectly. Machine starts a lot faster too because it used to hang for a while before bringing up the boot menu. I can finally use this machine to run custom installs (eg. for Klipper, etc). Thanks! Chris ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Aug 24, 2018 at 10:45:55AM -0400, Chris wrote: > On Fri, Aug 24, 2018 at 10:28 AM, Kevin O'Connor wrote: > > On Fri, Aug 24, 2018 at 09:48:27AM -0400, Chris wrote: > >> On Fri, Aug 24, 2018 at 9:28 AM, Chris wrote: > >> > So far it has worked on the first attempt every time. So it needs only > >> > the delay and nothing else. > >> > > >> > I still need to test with all my SD cards. Though I only have a 64GB > >> > Sandisk and a handful of 32GB Samsung. The question is whether or not > >> > the delay is dependent on the card type or if it's just the controller > >> > that needs to stabilize. > >> > >> OK, I tested all the cards I have and everything works. Attached is > >> the simplified patch. Hopefully someone can test other cards. I'm > >> interested to know if 128+GB and 16GB works. > > > > Thanks. If you increase SDHCI_POWER_ON_TIME instead, does that also > > work? > > > > -Kevin > > Yes. Seems to work the same so far using the same delay (5). Thanks. I committed this change. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Aug 24, 2018 at 10:28 AM, Kevin O'Connor wrote: > On Fri, Aug 24, 2018 at 09:48:27AM -0400, Chris wrote: >> On Fri, Aug 24, 2018 at 9:28 AM, Chris wrote: >> > So far it has worked on the first attempt every time. So it needs only >> > the delay and nothing else. >> > >> > I still need to test with all my SD cards. Though I only have a 64GB >> > Sandisk and a handful of 32GB Samsung. The question is whether or not >> > the delay is dependent on the card type or if it's just the controller >> > that needs to stabilize. >> >> OK, I tested all the cards I have and everything works. Attached is >> the simplified patch. Hopefully someone can test other cards. I'm >> interested to know if 128+GB and 16GB works. > > Thanks. If you increase SDHCI_POWER_ON_TIME instead, does that also > work? > > -Kevin Yes. Seems to work the same so far using the same delay (5). Chris diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c index 6410340..ab7007b 100644 --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -128,7 +128,7 @@ struct sdhci_s { // SDHCI timeouts #define SDHCI_POWER_OFF_TIME 1 -#define SDHCI_POWER_ON_TIME1 +#define SDHCI_POWER_ON_TIME5 #define SDHCI_CLOCK_ON_TIME1 // 74 clock cycles #define SDHCI_POWERUP_TIMEOUT 1000 #define SDHCI_PIO_TIMEOUT 1000 // XXX - this is just made up ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Aug 24, 2018 at 09:48:27AM -0400, Chris wrote: > On Fri, Aug 24, 2018 at 9:28 AM, Chris wrote: > > So far it has worked on the first attempt every time. So it needs only > > the delay and nothing else. > > > > I still need to test with all my SD cards. Though I only have a 64GB > > Sandisk and a handful of 32GB Samsung. The question is whether or not > > the delay is dependent on the card type or if it's just the controller > > that needs to stabilize. > > OK, I tested all the cards I have and everything works. Attached is > the simplified patch. Hopefully someone can test other cards. I'm > interested to know if 128+GB and 16GB works. Thanks. If you increase SDHCI_POWER_ON_TIME instead, does that also work? -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Aug 24, 2018 at 9:28 AM, Chris wrote: > So far it has worked on the first attempt every time. So it needs only > the delay and nothing else. > > I still need to test with all my SD cards. Though I only have a 64GB > Sandisk and a handful of 32GB Samsung. The question is whether or not > the delay is dependent on the card type or if it's just the controller > that needs to stabilize. OK, I tested all the cards I have and everything works. Attached is the simplified patch. Hopefully someone can test other cards. I'm interested to know if 128+GB and 16GB works. Chris diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c index 6410340..910bc58 100644 --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -501,6 +501,9 @@ sdcard_controller_setup(struct sdhci_s *regs, int prio) if (volt < 0) return; +// Let card/controller stabilize +msleep(5); + // Initialize card struct sddrive_s *drive = malloc_fseg(sizeof(*drive)); if (!drive) { ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Aug 24, 2018 at 9:13 AM, Kevin O'Connor wrote: > On Fri, Aug 24, 2018 at 09:01:03AM -0400, Chris wrote: >> I know it has been months but I just had an idea that seems to fix >> this issue. I still need to test for some time to make sure but so far >> it is working fine. >> >> What I did is simply add a delay before the SD card is initialized. >> The attached patch takes a brute force approach and will attempt to >> initialize multiple times. However, so far it has never had to attempt >> the initialize more than once. >> >> That little "msleep(5)" before setting up the card seems to be all >> that is needed. Like I said though, still testing but looking good. > > Interesting. Can you test if it is the msleep() that is needed, or if > it is the second initialization that is needed? (Or both?) > > Thanks, > -Kevin So far it has worked on the first attempt every time. So it needs only the delay and nothing else. I still need to test with all my SD cards. Though I only have a 64GB Sandisk and a handful of 32GB Samsung. The question is whether or not the delay is dependent on the card type or if it's just the controller that needs to stabilize. Chris ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Aug 24, 2018 at 09:01:03AM -0400, Chris wrote: > I know it has been months but I just had an idea that seems to fix > this issue. I still need to test for some time to make sure but so far > it is working fine. > > What I did is simply add a delay before the SD card is initialized. > The attached patch takes a brute force approach and will attempt to > initialize multiple times. However, so far it has never had to attempt > the initialize more than once. > > That little "msleep(5)" before setting up the card seems to be all > that is needed. Like I said though, still testing but looking good. Interesting. Can you test if it is the msleep() that is needed, or if it is the second initialization that is needed? (Or both?) Thanks, -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
I know it has been months but I just had an idea that seems to fix this issue. I still need to test for some time to make sure but so far it is working fine. What I did is simply add a delay before the SD card is initialized. The attached patch takes a brute force approach and will attempt to initialize multiple times. However, so far it has never had to attempt the initialize more than once. That little "msleep(5)" before setting up the card seems to be all that is needed. Like I said though, still testing but looking good. Chris diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c index 6410340..70bb08f 100644 --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -507,15 +507,23 @@ sdcard_controller_setup(struct sdhci_s *regs, int prio) warn_noalloc(); goto fail; } -memset(drive, 0, sizeof(*drive)); -drive->drive.type = DTYPE_SDCARD; -drive->regs = regs; -int ret = sdcard_card_setup(drive, volt, prio); -if (ret) { -free(drive); -goto fail; + +for (int i = 0; i < 500; i++) +{ +msleep(5); +memset(drive, 0, sizeof(*drive)); +drive->drive.type = DTYPE_SDCARD; +drive->regs = regs; +int ret = sdcard_card_setup(drive, volt, prio); +if (!ret) { +// Success +dprintf(9, "sdcard setup took %d\n", i); +return; +} } -return; + +free(drive); + fail: writeb(®s->power_control, 0); writew(®s->clock_control, 0); ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
> Yes - the card stops responding early in the process, which is odd. > What does the patch below report? Log is attached. Same drive/card setup as before. Chris SeaBIOS (version rel-1.11.0-16-gaf0daeb-dirty-20180223_125409-tv-MrChromebox-2018.02.23) BUILD: gcc: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 binutils: (GNU Binutils for Ubuntu) 2.26.1 Found coreboot cbmem console @ 7acde000 Found mainboard Google Cave malloc preinit Relocating init from 0x000ed120 to 0x7aa03740 (size 30752) malloc init Found CBFS header at 0xffbfffdc Add romfile: payload (size=82200) Add romfile: pci8086,0406.rom (size=65536) Add romfile: bootorder (size=32) Add romfile: links (size=144) Add romfile: etc/boot-menu-wait (size=8) Add romfile: (size=1948696) Copying data 144@0xffa24278 to 144@0x7aa03130 Add romfile: pci8086,1906.rom (size=65536) Add romfile: pci8086,1916.rom (size=65536) Add romfile: pci8086,191e.rom (size=65536) init ivt init bda Copying data 32@0xffa241f8 to 32@0x7aa031a0 boot order: 1: /pci@i0cf8/*@1f,2/drive@0/disk@0 init bios32 init PMM init PNPBIOS table init keyboard init pic math cp init PCI probe Found 19 PCI devices (max PCI bus is 01) Relocating coreboot bios tables Copying SMBIOS entry point from 0x7aa4b000 to 0x000f4920 Copying ACPI RSDP from 0x7ab5c000 to 0x000f48f0 CPU Mhz=913 init timer Scan for VGA option rom Copying data 65536@0xffa14188 to 65536@0x000c Running option rom at c000:0003 Turning on vga text mode console SeaBIOS (version rel-1.11.0-16-gaf0daeb-dirty-20180223_125409-tv-MrChromebox-2018.02.23) init usb XHCI init on dev 00:14.0: regs @ 0xd110, 18 ports, 64 slots, 32 byte contexts XHCIprotocol USB 2.00, 12 ports (offset 1), def 3011 XHCIprotocol USB 3.00, 6 ports (offset 13), def 3000 XHCIextcap 0xc0 @ 0xd1108070 XHCIextcap 0x1 @ 0xd110846c XHCIextcap 0xc6 @ 0xd11084f4 XHCIextcap 0xc7 @ 0xd1108500 XHCIextcap 0xc2 @ 0xd1108600 XHCIextcap 0xa @ 0xd1108700 XHCIextcap 0xc3 @ 0xd1108740 XHCIextcap 0xc4 @ 0xd1108800 XHCIextcap 0xc5 @ 0xd1108900 /7aa01000\ Start thread |7aa01000| configure_xhci: resetting init ps2port /7aa0\ Start thread |7aa01000| configure_xhci: setup 34 scratch pad buffers init ahci /7a9ff000\ Start thread |7a9ff000| Searching bootorder for: /pci@i0cf8/*@1e,4 |7a9ff000| sdhci@0xd1137000 ver=1002 cap=546ec881 8807 /7a9fe000\ Start thread |7a9fe000| Searching bootorder for: /pci@i0cf8/*@1e,6 |7a9fe000| sdhci@0xd1138000 ver=1002 cap=7568c881 807 |7a9fe000| sdcard_set_frequency 200 400 fa00 |7a9ff000| sdcard_set_frequency 200 400 fa00 |7a9fe000| sdcard_pio cmd 0 0 1ff |7a9ff000| sdcard_pio cmd 0 0 1fff |7a9fe000| sdcard cmd 0 response 0 0 0 0 |7a9fe000| sdcard_pio cmd 81a 1aa 1ff |7a9ff000| sdcard cmd 0 response 0 0 0 0 |7a9ff000| sdcard_pio cmd 81a 2aa 1fff |7a9fe000| sdcard_pio command stop (code=1) |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9ff000| sdcard_pio command stop (code=1) |7a9ff000| sdcard_pio cmd 371a 0 1fff |7a9fe000| sdcard cmd 371a response 800120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 0 1ff |7a9ff000| sdcard_pio command stop (code=1) |7a9ff000| sdcard_pio cmd 102 0 1fff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 |7a9fe000| sdcard_pio cmd 502 0 1ff |7a9ff000| sdcard cmd 102 response ff8080 0 0 0 |7a9ff000| sdcard_pio cmd 102 4080 1fff |7aa0| PS2 keyboard initialized \7aa0/ End thread |7a9fe000| sdcard_pio command stop (code=1) |7a9fe000| Ignoring SDIO response -1 |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9ff000| sdcard cmd 102 response ff8080 0 0 0 |7a9fe000| sdcard cmd 371a response 400120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 30 1ff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 |7a9ff000| sdcard_pio cmd 102 4080 1fff |7a9ff000| sdcard cmd 102 response ff8080 0 0 0 |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9fe000| sdcard cmd 371a response 120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 30 1ff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 |7a9ff000| sdcard_pio cmd 102 4080 1fff |7a9ff000| sdcard cmd 102 response ff8080 0 0 0 |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9fe000| sdcard cmd 371a response 120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 30 1ff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 /7aa0\ Start thread /7a9fd000\ Start thread /7a9fc000\ Start thread /7a9fb000\ Start thread /7a9fa000\ Start thread /7a9f9000\ Start thread /7a9f8000\ Start thread /7a9f7000\ Start thread /7a9f6000\ Start thread /7a9f5000\ Start thread /7a9f4000\ Start thread /7a9f3000\ Start thread /7a9f1000\ Start thread /7a9f\ Start thread /7a9ef000\ Start thread /7a9ee000\ Start thread /7a9ed000\ Start thread /7a9ec000\ Start thread |7a9ff000| sdcard_pio cmd 102 4080 1fff |7a9ff000| sdcard cmd 102 response ff8080 0 0 0 |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9fe000| sdcard cmd 371a response 120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 30 1ff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 |7a9ff
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Feb 23, 2018 at 07:06:24AM -0500, Chris wrote: > On Fri, Feb 23, 2018 at 12:24 AM, Kevin O'Connor wrote: > > This looks to be very similar to the issue Matt raised back in > > October. It seems the card needs to run at 1.8 volt (instead of 3.3 > > volt), but it seems to shutdown before telling seabios that. > > > > Can you apply the patch at: > > > > https://mail.coreboot.org/pipermail/seabios/2017-October/011892.html > > > > set the seabios debug level to 3, and send the log again? > > Yes, I believe we're using the same hardware. > > With the patch it still fails. > > During boot devices were: > * mmcblk0 internal 64GB SSD (detected). > * mmcblk1 internal card reader with 64GB bootable card in it (fails to > be detected). > * External USB reader that has 2 slots, one is empty, the other has a > 1GB microsd (detected). > > Log: > https://pastebin.com/L0dhPN8G > > Looks like the same problem where the card won't respond and times out. Yes - the card stops responding early in the process, which is odd. What does the patch below report? -Kevin diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c index 6410340..44082bf 100644 --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -66,6 +66,7 @@ struct sdhci_s { #define SC_SEND_OP_COND ((1<<8) | SCB_R48o) #define SC_ALL_SEND_CID ((2<<8) | SCB_R136) #define SC_SEND_RELATIVE_ADDR ((3<<8) | SCB_R48) +#define SC_IO_SEND_OP_COND ((5<<8) | SCB_R48o) #define SC_SELECT_DESELECT_CARD ((7<<8) | SCB_R48b) #define SC_SEND_IF_COND ((8<<8) | SCB_R48) #define SC_SEND_EXT_CSD ((8<<8) | SCB_R48d) @@ -123,6 +124,17 @@ struct sdhci_s { #define SRF_DATA 0x04 // SDHCI result flags +#define SR_OCR_VDD_165_195 (1<<7) +#define SR_OCR_VDD_27_28 (1<<15) +#define SR_OCR_VDD_28_29 (1<<16) +#define SR_OCR_VDD_29_30 (1<<17) +#define SR_OCR_VDD_30_31 (1<<18) +#define SR_OCR_VDD_31_32 (1<<19) +#define SR_OCR_VDD_32_33 (1<<20) +#define SR_OCR_VDD_33_34 (1<<21) +#define SR_OCR_VDD_34_35 (1<<22) +#define SR_OCR_VDD_35_36 (1<<23) +#define SR_OCR_S18R(1<<24) #define SR_OCR_CCS (1<<30) #define SR_OCR_NOTBUSY (1<<31) @@ -181,7 +193,7 @@ static int sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) { u32 state = readl(®s->present_state); -dprintf(9, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); +dprintf(1, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); if ((state & SP_CMD_INHIBIT) || ((cmd & 0x03) == 0x03 && state & SP_DAT_INHIBIT)) { dprintf(1, "sdcard_pio not ready %x\n", state); @@ -203,7 +215,7 @@ sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) writew(®s->irq_status, SI_CMD_COMPLETE); // Read response memcpy(param, regs->response, sizeof(regs->response)); -dprintf(9, "sdcard cmd %x response %x %x %x %x\n" +dprintf(1, "sdcard cmd %x response %x %x %x %x\n" , cmd, param[0], param[1], param[2], param[3]); return 0; } @@ -302,13 +314,13 @@ sdcard_set_power(struct sdhci_s *regs) u32 cap = readl(®s->cap_lo); u32 volt, vbits; if (cap & SD_CAPLO_V33) { -volt = 1<<20; +volt = SR_OCR_VDD_32_33 | SR_OCR_VDD_33_34; vbits = SPC_V33; } else if (cap & SD_CAPLO_V30) { -volt = 1<<18; +volt = SR_OCR_VDD_29_30 | SR_OCR_VDD_30_31; vbits = SPC_V30; } else if (cap & SD_CAPLO_V18) { -volt = 1<<7; +volt = SR_OCR_VDD_165_195; vbits = SPC_V18; } else { dprintf(1, "SD controller unsupported volt range (%x)\n", cap); @@ -399,11 +411,11 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) if (ret) return ret; // Let card know SDHC/SDXC is supported and confirm voltage -u32 hcs = 0, vrange = (volt >= (1<<15) ? 0x100 : 0x200) | 0xaa; +u32 hcs = 0, vrange = (volt >= SR_OCR_VDD_27_28 ? 0x100 : 0x200) | 0xaa; param[0] = vrange; ret = sdcard_pio(regs, SC_SEND_IF_COND, param); if (!ret && param[0] == vrange) -hcs = (1<<30); +hcs = SR_OCR_CCS | (1<<28); // Verify SD card (instead of MMC or SDIO) param[0] = 0x00; ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); @@ -414,8 +426,17 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) if (ret) return ret; drive->card_type |= SF_MMC; -hcs = (1<<30); +hcs = SR_OCR_CCS; +} else { +// Check for SDIO +param[0] = 0x00; +ret = sdcard_pio(regs, SC_IO_SEND_OP_COND, param); +dprintf(1, "Ignoring SDIO response %d\n", ret); } +// XXX +if (volt == (SR_OCR_VDD_32_33 | SR_OCR_VDD_33_34) +&& hcs && readl(®s->cap_lo) & SD_CAPLO_V18) +hcs |= SR_OCR_S18R; // Init card u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); for (;;) { @@ -434,6 +455,10 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) } msleep(5); // Avoid flooding log when debugging } +i
Re: [SeaBIOS] Failure to detect high-capacity SD card
Dear Chris, On 02/23/18 13:06, Chris wrote: On Fri, Feb 23, 2018 at 12:24 AM, Kevin O'Connor wrote: This looks to be very similar to the issue Matt raised back in October. It seems the card needs to run at 1.8 volt (instead of 3.3 volt), but it seems to shutdown before telling seabios that. Can you apply the patch at: https://mail.coreboot.org/pipermail/seabios/2017-October/011892.html set the seabios debug level to 3, and send the log again? Yes, I believe we're using the same hardware. With the patch it still fails. During boot devices were: * mmcblk0 internal 64GB SSD (detected). * mmcblk1 internal card reader with 64GB bootable card in it (fails to be detected). * External USB reader that has 2 slots, one is empty, the other has a 1GB microsd (detected). Log: https://pastebin.com/L0dhPN8G Thank you for testing this. For the future, could you please attach log files, so that they can be looked in the inbox when offline. Looks like the same problem where the card won't respond and times out. I still need to see if I can get some debugging information from a Linux kernel because everything works fine there. I'm not sure how to go about turning it on. Kind regards, Paul smime.p7s Description: S/MIME Cryptographic Signature ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Feb 23, 2018 at 12:24 AM, Kevin O'Connor wrote: > This looks to be very similar to the issue Matt raised back in > October. It seems the card needs to run at 1.8 volt (instead of 3.3 > volt), but it seems to shutdown before telling seabios that. > > Can you apply the patch at: > > https://mail.coreboot.org/pipermail/seabios/2017-October/011892.html > > set the seabios debug level to 3, and send the log again? Yes, I believe we're using the same hardware. With the patch it still fails. During boot devices were: * mmcblk0 internal 64GB SSD (detected). * mmcblk1 internal card reader with 64GB bootable card in it (fails to be detected). * External USB reader that has 2 slots, one is empty, the other has a 1GB microsd (detected). Log: https://pastebin.com/L0dhPN8G Looks like the same problem where the card won't respond and times out. I still need to see if I can get some debugging information from a Linux kernel because everything works fine there. I'm not sure how to go about turning it on. Chris ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Feb 08, 2018 at 10:12:40AM -0500, Chris wrote: > On Wed, Feb 7, 2018 at 3:14 AM, Paul Menzel wrote: > > Please tell us what SeaBIOS version you use, and attach the debug logs from > > a working and non-working setup. > > I switched to the SeaBIOS git HEAD code just in case that made a > difference (it did not). > > The machine has mmc0 as the internal 64GB SSD, mmc1 is the internal > card reader, then an external USB card reader (64GB) is attached as > well. This looks to be very similar to the issue Matt raised back in October. It seems the card needs to run at 1.8 volt (instead of 3.3 volt), but it seems to shutdown before telling seabios that. Can you apply the patch at: https://mail.coreboot.org/pipermail/seabios/2017-October/011892.html set the seabios debug level to 3, and send the log again? -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Wed, Feb 7, 2018 at 3:14 AM, Paul Menzel wrote: > Please tell us what SeaBIOS version you use, and attach the debug logs from > a working and non-working setup. I switched to the SeaBIOS git HEAD code just in case that made a difference (it did not). The machine has mmc0 as the internal 64GB SSD, mmc1 is the internal card reader, then an external USB card reader (64GB) is attached as well. The internal card reader is an "Intel Corporation Sunrise Point-LP Secure Digital IO UART Controller". Machine is a Skylake Intel architecture. ASUS C302 (CAVE). Here is the log from a 32GB card that fails to be detected: https://pastebin.com/sGKX0tVB ios data from Linux: https://pastebin.com/bv91V8aq Here is the log from a successful working 1GB card: https://pastebin.com/c0AmjeDy ios data from Linux: https://pastebin.com/BApEPcVU There is nothing different between the dmesg of either other than the size of the detected card. All cards work fine in Linux. I'll see if I can enable more debugging in the Linux kernel so I can see what exactly it is doing to initialize the card because right now it's not showing anything useful. Chris ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Tue, Feb 06, 2018 at 07:38:22PM -0500, Chris wrote: > Re: https://mail.coreboot.org/pipermail/seabios/2017-October/011862.html > > Did this ever get resolved? I didn't see a response to the final log. > I'm experiencing the same thing on the same platform (ASUS C302 CAVE). > > Card brand doesn't seem to matter. I've tried 32GB Samsung EVO cards, > various SanDisk cards from 32GB to 128GB. None show up as boot options > in SeaBIOS. If I use the exact same data/layout except on a smaller > card like 1GB of any brand then it works no problem. > > Same large cards boot fine off an external USB card reader. It appears > to be an issue with the integrated SD card reader on the C302. > > I'm using the same latest MrChromeBox build from May 2017. No - the issue was not resolved. We looked at it, but could not figure out what the SD card (and/or controller) did not like about the seabios initialization sequence. The sd card would stop responding and it wasn't clear what seabios was doing different from linux (which apparently works fine on the same hardware). As Paul mentions, if you'd like us to look at this further, please include the debug logs of a session. It's possible additional tests on new hardware will reveal the issue. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
Dear Chris, Am 07.02.2018 um 01:38 schrieb Chris: Re: https://mail.coreboot.org/pipermail/seabios/2017-October/011862.html Did this ever get resolved? I didn't see a response to the final log. I'm experiencing the same thing on the same platform (ASUS C302 CAVE). Card brand doesn't seem to matter. I've tried 32GB Samsung EVO cards, various SanDisk cards from 32GB to 128GB. None show up as boot options in SeaBIOS. If I use the exact same data/layout except on a smaller card like 1GB of any brand then it works no problem. Same large cards boot fine off an external USB card reader. It appears to be an issue with the integrated SD card reader on the C302. I'm using the same latest MrChromeBox build from May 2017. > Any ideas? Please tell us what SeaBIOS version you use, and attach the debug logs from a working and non-working setup. Kind regards, Paul ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
[SeaBIOS] Failure to detect high-capacity SD card
Re: https://mail.coreboot.org/pipermail/seabios/2017-October/011862.html Did this ever get resolved? I didn't see a response to the final log. I'm experiencing the same thing on the same platform (ASUS C302 CAVE). Card brand doesn't seem to matter. I've tried 32GB Samsung EVO cards, various SanDisk cards from 32GB to 128GB. None show up as boot options in SeaBIOS. If I use the exact same data/layout except on a smaller card like 1GB of any brand then it works no problem. Same large cards boot fine off an external USB card reader. It appears to be an issue with the integrated SD card reader on the C302. I'm using the same latest MrChromeBox build from May 2017. Any ideas? ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Sat, Oct 28, 2017 at 10:26 AM, Kevin O'Connor wrote: > Okay. One more thing to try is a slightly different voltage range. > > -Kevin > > > --- a/src/hw/sdcard.c > +++ b/src/hw/sdcard.c > @@ -123,6 +123,17 @@ struct sdhci_s { > #define SRF_DATA 0x04 > > // SDHCI result flags > +#define SR_OCR_VDD_165_195 (1<<7) > +#define SR_OCR_VDD_27_28 (1<<15) > +#define SR_OCR_VDD_28_29 (1<<16) > +#define SR_OCR_VDD_29_30 (1<<17) > +#define SR_OCR_VDD_30_31 (1<<18) > +#define SR_OCR_VDD_31_32 (1<<19) > +#define SR_OCR_VDD_32_33 (1<<20) > +#define SR_OCR_VDD_33_34 (1<<21) > +#define SR_OCR_VDD_34_35 (1<<22) > +#define SR_OCR_VDD_35_36 (1<<23) > +#define SR_OCR_S18R(1<<24) > #define SR_OCR_CCS (1<<30) > #define SR_OCR_NOTBUSY (1<<31) > > @@ -181,7 +192,7 @@ static int > sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) > { > u32 state = readl(®s->present_state); > -dprintf(9, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); > +dprintf(1, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); > if ((state & SP_CMD_INHIBIT) > || ((cmd & 0x03) == 0x03 && state & SP_DAT_INHIBIT)) { > dprintf(1, "sdcard_pio not ready %x\n", state); > @@ -203,7 +214,7 @@ sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) > writew(®s->irq_status, SI_CMD_COMPLETE); > // Read response > memcpy(param, regs->response, sizeof(regs->response)); > -dprintf(9, "sdcard cmd %x response %x %x %x %x\n" > +dprintf(1, "sdcard cmd %x response %x %x %x %x\n" > , cmd, param[0], param[1], param[2], param[3]); > return 0; > } > @@ -302,13 +313,13 @@ sdcard_set_power(struct sdhci_s *regs) > u32 cap = readl(®s->cap_lo); > u32 volt, vbits; > if (cap & SD_CAPLO_V33) { > -volt = 1<<20; > +volt = SR_OCR_VDD_32_33 | SR_OCR_VDD_33_34; > vbits = SPC_V33; > } else if (cap & SD_CAPLO_V30) { > -volt = 1<<18; > +volt = SR_OCR_VDD_29_30 | SR_OCR_VDD_30_31; > vbits = SPC_V30; > } else if (cap & SD_CAPLO_V18) { > -volt = 1<<7; > +volt = SR_OCR_VDD_165_195; > vbits = SPC_V18; > } else { > dprintf(1, "SD controller unsupported volt range (%x)\n", cap); > @@ -399,11 +410,11 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > if (ret) > return ret; > // Let card know SDHC/SDXC is supported and confirm voltage > -u32 hcs = 0, vrange = (volt >= (1<<15) ? 0x100 : 0x200) | 0xaa; > +u32 hcs = 0, vrange = (volt >= SR_OCR_VDD_27_28 ? 0x100 : 0x200) | > 0xaa; > param[0] = vrange; > ret = sdcard_pio(regs, SC_SEND_IF_COND, param); > if (!ret && param[0] == vrange) > -hcs = (1<<30); > +hcs = SR_OCR_CCS | (1<<28); > // Verify SD card (instead of MMC or SDIO) > param[0] = 0x00; > ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > @@ -414,8 +425,12 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > if (ret) > return ret; > drive->card_type |= SF_MMC; > -hcs = (1<<30); > +hcs = SR_OCR_CCS; > } > +// XXX > +if (volt == (SR_OCR_VDD_32_33 | SR_OCR_VDD_33_34) > +&& hcs && readl(®s->cap_lo) & SD_CAPLO_V18) > +hcs |= SR_OCR_S18R; > // Init card > u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); > for (;;) { > @@ -434,6 +449,10 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > } > msleep(5); // Avoid flooding log when debugging > } > +if (param[0] & SR_OCR_S18R) { > +dprintf(1, "Card requests 1.8 volt\n"); > +return -1; > +} > drive->card_type |= (param[0] & SR_OCR_CCS) ? SF_HIGHCAPACITY : 0; > // Select card (get cid, set rca, get csd, select card) > param[0] = 0x00; > no luck, log attached SeaBIOS (version rel-1.10.0-82-g6ebb3b1-MrChromebox-2017.10.28) BUILD: gcc: (Ubuntu 7.2.0-8ubuntu3) 7.2.0 binutils: (GNU Binutils for Ubuntu) 2.29.1 Found coreboot cbmem console @ 7acde000 Found mainboard Google Cave malloc preinit Relocating init from 0x000ed580 to 0x7aa03900 (size 30304) malloc init Found CBFS header at 0xffbfffdc Add romfile: payload (size=81080) Add romfile: pci8086,0406.rom (size=65536) Add romfile: bootorder (size=32) Add romfile: links (size=144) Add romfile: etc/boot-menu-wait (size=8) Add romfile: (size=1949784) Copying data 144@0xffa23e38 to 144@0x7aa032f0 Add romfile: pci8086,1906.rom (size=65536) Add romfile: pci8086,1916.rom (size=65536) Add romfile: pci8086,191e.rom (size=65536) init ivt init bda Copying data 32@0xffa23db8 to 32@0x7aa03360 boot order: 1: /pci@i0cf8/*@1f,2/drive@0/disk@0 init bios32 init PMM init PNPBIOS table init keyboard init pic math cp init PCI probe Found 19 PCI devices (max PCI bus is 01) Relocating coreboot bios tables Copying SMBIOS entry point from 0x7aa4b000 to 0x000f4bc0 Copying ACPI RSDP from 0x7ab5c000 to 0x000f4b90 CPU Mhz=914 init timer Scan fo
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Oct 27, 2017 at 08:26:35PM -0500, Matt DeVillier wrote: > On Fri, Oct 27, 2017 at 7:08 PM, Kevin O'Connor wrote: > > > Can you try the two patches below? (Go back to master, apply the > > first, gather the log, go back to master, apply the second, gather the > > log.) > > > > -Kevin > > > > w/patch 1 only: https://paste.ubuntu.com/25833503/ > > w/patch 2 only: https://paste.ubuntu.com/25833542/ Okay. One more thing to try is a slightly different voltage range. -Kevin --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -123,6 +123,17 @@ struct sdhci_s { #define SRF_DATA 0x04 // SDHCI result flags +#define SR_OCR_VDD_165_195 (1<<7) +#define SR_OCR_VDD_27_28 (1<<15) +#define SR_OCR_VDD_28_29 (1<<16) +#define SR_OCR_VDD_29_30 (1<<17) +#define SR_OCR_VDD_30_31 (1<<18) +#define SR_OCR_VDD_31_32 (1<<19) +#define SR_OCR_VDD_32_33 (1<<20) +#define SR_OCR_VDD_33_34 (1<<21) +#define SR_OCR_VDD_34_35 (1<<22) +#define SR_OCR_VDD_35_36 (1<<23) +#define SR_OCR_S18R(1<<24) #define SR_OCR_CCS (1<<30) #define SR_OCR_NOTBUSY (1<<31) @@ -181,7 +192,7 @@ static int sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) { u32 state = readl(®s->present_state); -dprintf(9, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); +dprintf(1, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); if ((state & SP_CMD_INHIBIT) || ((cmd & 0x03) == 0x03 && state & SP_DAT_INHIBIT)) { dprintf(1, "sdcard_pio not ready %x\n", state); @@ -203,7 +214,7 @@ sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) writew(®s->irq_status, SI_CMD_COMPLETE); // Read response memcpy(param, regs->response, sizeof(regs->response)); -dprintf(9, "sdcard cmd %x response %x %x %x %x\n" +dprintf(1, "sdcard cmd %x response %x %x %x %x\n" , cmd, param[0], param[1], param[2], param[3]); return 0; } @@ -302,13 +313,13 @@ sdcard_set_power(struct sdhci_s *regs) u32 cap = readl(®s->cap_lo); u32 volt, vbits; if (cap & SD_CAPLO_V33) { -volt = 1<<20; +volt = SR_OCR_VDD_32_33 | SR_OCR_VDD_33_34; vbits = SPC_V33; } else if (cap & SD_CAPLO_V30) { -volt = 1<<18; +volt = SR_OCR_VDD_29_30 | SR_OCR_VDD_30_31; vbits = SPC_V30; } else if (cap & SD_CAPLO_V18) { -volt = 1<<7; +volt = SR_OCR_VDD_165_195; vbits = SPC_V18; } else { dprintf(1, "SD controller unsupported volt range (%x)\n", cap); @@ -399,11 +410,11 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) if (ret) return ret; // Let card know SDHC/SDXC is supported and confirm voltage -u32 hcs = 0, vrange = (volt >= (1<<15) ? 0x100 : 0x200) | 0xaa; +u32 hcs = 0, vrange = (volt >= SR_OCR_VDD_27_28 ? 0x100 : 0x200) | 0xaa; param[0] = vrange; ret = sdcard_pio(regs, SC_SEND_IF_COND, param); if (!ret && param[0] == vrange) -hcs = (1<<30); +hcs = SR_OCR_CCS | (1<<28); // Verify SD card (instead of MMC or SDIO) param[0] = 0x00; ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); @@ -414,8 +425,12 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) if (ret) return ret; drive->card_type |= SF_MMC; -hcs = (1<<30); +hcs = SR_OCR_CCS; } +// XXX +if (volt == (SR_OCR_VDD_32_33 | SR_OCR_VDD_33_34) +&& hcs && readl(®s->cap_lo) & SD_CAPLO_V18) +hcs |= SR_OCR_S18R; // Init card u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); for (;;) { @@ -434,6 +449,10 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) } msleep(5); // Avoid flooding log when debugging } +if (param[0] & SR_OCR_S18R) { +dprintf(1, "Card requests 1.8 volt\n"); +return -1; +} drive->card_type |= (param[0] & SR_OCR_CCS) ? SF_HIGHCAPACITY : 0; // Select card (get cid, set rca, get csd, select card) param[0] = 0x00; ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Fri, Oct 27, 2017 at 7:08 PM, Kevin O'Connor wrote: > Can you try the two patches below? (Go back to master, apply the > first, gather the log, go back to master, apply the second, gather the > log.) > > -Kevin > w/patch 1 only: https://paste.ubuntu.com/25833503/ w/patch 2 only: https://paste.ubuntu.com/25833542/ > > > == patch 1 = > > --- a/src/hw/sdcard.c > +++ b/src/hw/sdcard.c > @@ -181,7 +181,7 @@ static int > sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) > { > u32 state = readl(®s->present_state); > -dprintf(9, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); > +dprintf(1, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); > if ((state & SP_CMD_INHIBIT) > || ((cmd & 0x03) == 0x03 && state & SP_DAT_INHIBIT)) { > dprintf(1, "sdcard_pio not ready %x\n", state); > @@ -203,7 +203,7 @@ sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) > writew(®s->irq_status, SI_CMD_COMPLETE); > // Read response > memcpy(param, regs->response, sizeof(regs->response)); > -dprintf(9, "sdcard cmd %x response %x %x %x %x\n" > +dprintf(1, "sdcard cmd %x response %x %x %x %x\n" > , cmd, param[0], param[1], param[2], param[3]); > return 0; > } > @@ -403,7 +403,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > param[0] = vrange; > ret = sdcard_pio(regs, SC_SEND_IF_COND, param); > if (!ret && param[0] == vrange) > -hcs = (1<<30); > +hcs = (1<<30) | (1<<28); > // Verify SD card (instead of MMC or SDIO) > param[0] = 0x00; > ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > > > == patch 2 = > > --- a/src/hw/sdcard.c > +++ b/src/hw/sdcard.c > @@ -123,6 +123,7 @@ struct sdhci_s { > #define SRF_DATA 0x04 > > // SDHCI result flags > +#define SR_OCR_S18R(1<<24) > #define SR_OCR_CCS (1<<30) > #define SR_OCR_NOTBUSY (1<<31) > > @@ -181,7 +182,7 @@ static int > sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) > { > u32 state = readl(®s->present_state); > -dprintf(9, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); > +dprintf(1, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); > if ((state & SP_CMD_INHIBIT) > || ((cmd & 0x03) == 0x03 && state & SP_DAT_INHIBIT)) { > dprintf(1, "sdcard_pio not ready %x\n", state); > @@ -203,7 +204,7 @@ sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) > writew(®s->irq_status, SI_CMD_COMPLETE); > // Read response > memcpy(param, regs->response, sizeof(regs->response)); > -dprintf(9, "sdcard cmd %x response %x %x %x %x\n" > +dprintf(1, "sdcard cmd %x response %x %x %x %x\n" > , cmd, param[0], param[1], param[2], param[3]); > return 0; > } > @@ -416,6 +417,9 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > drive->card_type |= SF_MMC; > hcs = (1<<30); > } > +// XXX > +if (volt == (1<<20) && hcs && readl(®s->cap_lo) & SD_CAPLO_V18) > +hcs |= SR_OCR_S18R; > // Init card > u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); > for (;;) { > @@ -434,6 +438,10 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > } > msleep(5); // Avoid flooding log when debugging > } > +if (param[0] & SR_OCR_S18R) { > +dprintf(1, "Card requests 1.8 volt\n"); > +return -1; > +} > drive->card_type |= (param[0] & SR_OCR_CCS) ? SF_HIGHCAPACITY : 0; > // Select card (get cid, set rca, get csd, select card) > param[0] = 0x00; > ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Oct 26, 2017 at 09:04:57PM -0500, Matt DeVillier wrote: > On Thu, Oct 26, 2017 at 11:26 AM, Kevin O'Connor wrote: > > > On Thu, Oct 26, 2017 at 11:14:53AM -0400, Matt DeVillier wrote: > > > On Thu, Oct 26, 2017 at 10:59 AM, Kevin O'Connor > > wrote: > > > > > > with the patch, USB devices are not available from the boot menu either > > (it > > > appears to hang?), and therefore device cannot be booted to get said log > > > > That sounds like a bad compile then - nothing in the patch should have > > impacted usb. > > > > In any case, the patch below tests the same thing and it should work > > on eMMC also. > > still timing out on detection: https://paste.ubuntu.com/25826387/ Can you try the two patches below? (Go back to master, apply the first, gather the log, go back to master, apply the second, gather the log.) -Kevin == patch 1 = --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -181,7 +181,7 @@ static int sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) { u32 state = readl(®s->present_state); -dprintf(9, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); +dprintf(1, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); if ((state & SP_CMD_INHIBIT) || ((cmd & 0x03) == 0x03 && state & SP_DAT_INHIBIT)) { dprintf(1, "sdcard_pio not ready %x\n", state); @@ -203,7 +203,7 @@ sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) writew(®s->irq_status, SI_CMD_COMPLETE); // Read response memcpy(param, regs->response, sizeof(regs->response)); -dprintf(9, "sdcard cmd %x response %x %x %x %x\n" +dprintf(1, "sdcard cmd %x response %x %x %x %x\n" , cmd, param[0], param[1], param[2], param[3]); return 0; } @@ -403,7 +403,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) param[0] = vrange; ret = sdcard_pio(regs, SC_SEND_IF_COND, param); if (!ret && param[0] == vrange) -hcs = (1<<30); +hcs = (1<<30) | (1<<28); // Verify SD card (instead of MMC or SDIO) param[0] = 0x00; ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); == patch 2 = --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -123,6 +123,7 @@ struct sdhci_s { #define SRF_DATA 0x04 // SDHCI result flags +#define SR_OCR_S18R(1<<24) #define SR_OCR_CCS (1<<30) #define SR_OCR_NOTBUSY (1<<31) @@ -181,7 +182,7 @@ static int sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) { u32 state = readl(®s->present_state); -dprintf(9, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); +dprintf(1, "sdcard_pio cmd %x %x %x\n", cmd, *param, state); if ((state & SP_CMD_INHIBIT) || ((cmd & 0x03) == 0x03 && state & SP_DAT_INHIBIT)) { dprintf(1, "sdcard_pio not ready %x\n", state); @@ -203,7 +204,7 @@ sdcard_pio(struct sdhci_s *regs, int cmd, u32 *param) writew(®s->irq_status, SI_CMD_COMPLETE); // Read response memcpy(param, regs->response, sizeof(regs->response)); -dprintf(9, "sdcard cmd %x response %x %x %x %x\n" +dprintf(1, "sdcard cmd %x response %x %x %x %x\n" , cmd, param[0], param[1], param[2], param[3]); return 0; } @@ -416,6 +417,9 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) drive->card_type |= SF_MMC; hcs = (1<<30); } +// XXX +if (volt == (1<<20) && hcs && readl(®s->cap_lo) & SD_CAPLO_V18) +hcs |= SR_OCR_S18R; // Init card u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); for (;;) { @@ -434,6 +438,10 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) } msleep(5); // Avoid flooding log when debugging } +if (param[0] & SR_OCR_S18R) { +dprintf(1, "Card requests 1.8 volt\n"); +return -1; +} drive->card_type |= (param[0] & SR_OCR_CCS) ? SF_HIGHCAPACITY : 0; // Select card (get cid, set rca, get csd, select card) param[0] = 0x00; ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Oct 26, 2017 at 11:26 AM, Kevin O'Connor wrote: > On Thu, Oct 26, 2017 at 11:14:53AM -0400, Matt DeVillier wrote: > > On Thu, Oct 26, 2017 at 10:59 AM, Kevin O'Connor > wrote: > > > > with the patch, USB devices are not available from the boot menu either > (it > > appears to hang?), and therefore device cannot be booted to get said log > > That sounds like a bad compile then - nothing in the patch should have > impacted usb. > > In any case, the patch below tests the same thing and it should work > on eMMC also. > > -Kevin > > > --- a/src/hw/sdcard.c > +++ b/src/hw/sdcard.c > @@ -404,19 +404,8 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > ret = sdcard_pio(regs, SC_SEND_IF_COND, param); > if (!ret && param[0] == vrange) > hcs = (1<<30); > -// Verify SD card (instead of MMC or SDIO) > -param[0] = 0x00; > -ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > -if (ret) { > -// Check for MMC card > -param[0] = 0x00; > -ret = sdcard_pio(regs, SC_SEND_OP_COND, param); > -if (ret) > -return ret; > -drive->card_type |= SF_MMC; > -hcs = (1<<30); > -} > // Init card > +int firstloop = 1; > u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); > for (;;) { > param[0] = hcs | volt; // high-capacity support and voltage level > @@ -424,8 +413,18 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > ret = sdcard_pio(regs, SC_SEND_OP_COND, param); > else > ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > -if (ret) > +if (ret) { > +if (firstloop) { > +// Check for MMC card > +firstloop = 0; > +drive->card_type |= SF_MMC; > +hcs = (1<<30); > +end = timer_calc(SDHCI_POWERUP_TIMEOUT); > +continue; > +} > return ret; > +} > +firstloop = 0; > if (param[0] & SR_OCR_NOTBUSY) > break; > if (timer_check(end)) { > still timing out on detection: https://paste.ubuntu.com/25826387/ ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Oct 26, 2017 at 11:14:53AM -0400, Matt DeVillier wrote: > On Thu, Oct 26, 2017 at 10:59 AM, Kevin O'Connor wrote: > > > On Thu, Oct 26, 2017 at 10:46:06AM -0400, Matt DeVillier wrote: > > > On Thu, Oct 26, 2017 at 12:56 AM, Kevin O'Connor > > wrote: > > > > > > > Does the patch below help? > > > > > > > > -Kevin > > > > > > > > > > > > --- a/src/hw/sdcard.c > > > > +++ b/src/hw/sdcard.c > > > > @@ -405,6 +405,7 @@ sdcard_card_setup(struct sddrive_s *drive, int > > volt, > > > > int prio) > > > > if (!ret && param[0] == vrange) > > > > hcs = (1<<30); > > > > // Verify SD card (instead of MMC or SDIO) > > > > +#if 0 > > > > param[0] = 0x00; > > > > ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > > > > if (ret) { > > > > @@ -416,6 +417,7 @@ sdcard_card_setup(struct sddrive_s *drive, int > > volt, > > > > int prio) > > > > drive->card_type |= SF_MMC; > > > > hcs = (1<<30); > > > > } > > > > +#endif > > > > // Init card > > > > u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); > > > > for (;;) { > > > > > > > > > > with the patch applied, neither the internal eMMC nor the large-capacity > > > external SD card are detected > > > > Yeah - this disables MMC. Any chance to get the log from this run? > > (Let me know if eMMC is needed to get the log.) > > > > -Kevin > > > > with the patch, USB devices are not available from the boot menu either (it > appears to hang?), and therefore device cannot be booted to get said log That sounds like a bad compile then - nothing in the patch should have impacted usb. In any case, the patch below tests the same thing and it should work on eMMC also. -Kevin --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -404,19 +404,8 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) ret = sdcard_pio(regs, SC_SEND_IF_COND, param); if (!ret && param[0] == vrange) hcs = (1<<30); -// Verify SD card (instead of MMC or SDIO) -param[0] = 0x00; -ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); -if (ret) { -// Check for MMC card -param[0] = 0x00; -ret = sdcard_pio(regs, SC_SEND_OP_COND, param); -if (ret) -return ret; -drive->card_type |= SF_MMC; -hcs = (1<<30); -} // Init card +int firstloop = 1; u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); for (;;) { param[0] = hcs | volt; // high-capacity support and voltage level @@ -424,8 +413,18 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) ret = sdcard_pio(regs, SC_SEND_OP_COND, param); else ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); -if (ret) +if (ret) { +if (firstloop) { +// Check for MMC card +firstloop = 0; +drive->card_type |= SF_MMC; +hcs = (1<<30); +end = timer_calc(SDHCI_POWERUP_TIMEOUT); +continue; +} return ret; +} +firstloop = 0; if (param[0] & SR_OCR_NOTBUSY) break; if (timer_check(end)) { ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Oct 26, 2017 at 10:59 AM, Kevin O'Connor wrote: > On Thu, Oct 26, 2017 at 10:46:06AM -0400, Matt DeVillier wrote: > > On Thu, Oct 26, 2017 at 12:56 AM, Kevin O'Connor > wrote: > > > > > Does the patch below help? > > > > > > -Kevin > > > > > > > > > --- a/src/hw/sdcard.c > > > +++ b/src/hw/sdcard.c > > > @@ -405,6 +405,7 @@ sdcard_card_setup(struct sddrive_s *drive, int > volt, > > > int prio) > > > if (!ret && param[0] == vrange) > > > hcs = (1<<30); > > > // Verify SD card (instead of MMC or SDIO) > > > +#if 0 > > > param[0] = 0x00; > > > ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > > > if (ret) { > > > @@ -416,6 +417,7 @@ sdcard_card_setup(struct sddrive_s *drive, int > volt, > > > int prio) > > > drive->card_type |= SF_MMC; > > > hcs = (1<<30); > > > } > > > +#endif > > > // Init card > > > u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); > > > for (;;) { > > > > > > > with the patch applied, neither the internal eMMC nor the large-capacity > > external SD card are detected > > Yeah - this disables MMC. Any chance to get the log from this run? > (Let me know if eMMC is needed to get the log.) > > -Kevin > with the patch, USB devices are not available from the boot menu either (it appears to hang?), and therefore device cannot be booted to get said log ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Oct 26, 2017 at 10:46:06AM -0400, Matt DeVillier wrote: > On Thu, Oct 26, 2017 at 12:56 AM, Kevin O'Connor wrote: > > > Does the patch below help? > > > > -Kevin > > > > > > --- a/src/hw/sdcard.c > > +++ b/src/hw/sdcard.c > > @@ -405,6 +405,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > > int prio) > > if (!ret && param[0] == vrange) > > hcs = (1<<30); > > // Verify SD card (instead of MMC or SDIO) > > +#if 0 > > param[0] = 0x00; > > ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > > if (ret) { > > @@ -416,6 +417,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > > int prio) > > drive->card_type |= SF_MMC; > > hcs = (1<<30); > > } > > +#endif > > // Init card > > u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); > > for (;;) { > > > > with the patch applied, neither the internal eMMC nor the large-capacity > external SD card are detected Yeah - this disables MMC. Any chance to get the log from this run? (Let me know if eMMC is needed to get the log.) -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Oct 26, 2017 at 12:56 AM, Kevin O'Connor wrote: > Does the patch below help? > > -Kevin > > > --- a/src/hw/sdcard.c > +++ b/src/hw/sdcard.c > @@ -405,6 +405,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > if (!ret && param[0] == vrange) > hcs = (1<<30); > // Verify SD card (instead of MMC or SDIO) > +#if 0 > param[0] = 0x00; > ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); > if (ret) { > @@ -416,6 +417,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, > int prio) > drive->card_type |= SF_MMC; > hcs = (1<<30); > } > +#endif > // Init card > u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); > for (;;) { > with the patch applied, neither the internal eMMC nor the large-capacity external SD card are detected ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Wed, Oct 25, 2017 at 11:02:50PM -0500, Matt DeVillier wrote: > On Mon, Oct 23, 2017 at 12:04 PM, Kevin O'Connor wrote: > > > On Mon, Oct 23, 2017 at 11:59:16AM -0500, Matt DeVillier wrote: > > > On Mon, Oct 23, 2017 at 11:34 AM, Kevin O'Connor > > wrote: > > > > On Mon, Oct 23, 2017 at 10:55:57AM -0500, Matt DeVillier wrote: > > > > > On Mon, Oct 23, 2017 at 10:50 AM, Kevin O'Connor > > > > > > > > On Mon, Oct 23, 2017 at 10:39:03AM -0400, Kevin O'Connor wrote: > > > > > > Unfortunately, I can't see anything wrong in the log - the card > > isn't > > > > > > coming out of its initialization phase. I can't see any reason why > > > > > > that would be. Has the user verified the card works under Linux? > > > > > card is detected/usable under Linux, no problem there > > > > Can you grab the syslog/dmesg output from Linux as it detects and > > > > initializes the card? > > > sure, any special kernel params for debugging? > > > > The more info on the sdcard the better. I'm not hopeful, but maybe > > something Linux does to the sdcard will help point out why seabios > > isn't able to init the card. > > > > -Kevin > > > > dmesg: https://paste.ubuntu.com/25820588/ > cat /sys/kernel/debug/mmc1/ios : https://paste.ubuntu.com/25821138/ Does the patch below help? -Kevin --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -405,6 +405,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) if (!ret && param[0] == vrange) hcs = (1<<30); // Verify SD card (instead of MMC or SDIO) +#if 0 param[0] = 0x00; ret = sdcard_pio_app(regs, SC_APP_SEND_OP_COND, param); if (ret) { @@ -416,6 +417,7 @@ sdcard_card_setup(struct sddrive_s *drive, int volt, int prio) drive->card_type |= SF_MMC; hcs = (1<<30); } +#endif // Init card u32 end = timer_calc(SDHCI_POWERUP_TIMEOUT); for (;;) { ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Mon, Oct 23, 2017 at 12:04 PM, Kevin O'Connor wrote: > On Mon, Oct 23, 2017 at 11:59:16AM -0500, Matt DeVillier wrote: > > On Mon, Oct 23, 2017 at 11:34 AM, Kevin O'Connor > wrote: > > > On Mon, Oct 23, 2017 at 10:55:57AM -0500, Matt DeVillier wrote: > > > > On Mon, Oct 23, 2017 at 10:50 AM, Kevin O'Connor > > > > > > On Mon, Oct 23, 2017 at 10:39:03AM -0400, Kevin O'Connor wrote: > > > > > Unfortunately, I can't see anything wrong in the log - the card > isn't > > > > > coming out of its initialization phase. I can't see any reason why > > > > > that would be. Has the user verified the card works under Linux? > > > > card is detected/usable under Linux, no problem there > > > Can you grab the syslog/dmesg output from Linux as it detects and > > > initializes the card? > > sure, any special kernel params for debugging? > > The more info on the sdcard the better. I'm not hopeful, but maybe > something Linux does to the sdcard will help point out why seabios > isn't able to init the card. > > -Kevin > dmesg: https://paste.ubuntu.com/25820588/ cat /sys/kernel/debug/mmc1/ios : https://paste.ubuntu.com/25821138/ ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Mon, Oct 23, 2017 at 11:59:16AM -0500, Matt DeVillier wrote: > On Mon, Oct 23, 2017 at 11:34 AM, Kevin O'Connor wrote: > > On Mon, Oct 23, 2017 at 10:55:57AM -0500, Matt DeVillier wrote: > > > On Mon, Oct 23, 2017 at 10:50 AM, Kevin O'Connor > > > > On Mon, Oct 23, 2017 at 10:39:03AM -0400, Kevin O'Connor wrote: > > > > Unfortunately, I can't see anything wrong in the log - the card isn't > > > > coming out of its initialization phase. I can't see any reason why > > > > that would be. Has the user verified the card works under Linux? > > > card is detected/usable under Linux, no problem there > > Can you grab the syslog/dmesg output from Linux as it detects and > > initializes the card? > sure, any special kernel params for debugging? The more info on the sdcard the better. I'm not hopeful, but maybe something Linux does to the sdcard will help point out why seabios isn't able to init the card. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Mon, Oct 23, 2017 at 11:34 AM, Kevin O'Connor wrote: > On Mon, Oct 23, 2017 at 10:55:57AM -0500, Matt DeVillier wrote: > > On Mon, Oct 23, 2017 at 10:50 AM, Kevin O'Connor > wrote: > > > > > On Mon, Oct 23, 2017 at 10:39:03AM -0400, Kevin O'Connor wrote: > > > > Hi Matt, > > > > > > > > Can you gzip and attach the full log? (At a minimum, we need to see > > > > the log extracts around the failure.) > > > > > > Ah, nevermind - I see the timeout is generated in the wait for the > > > card to be in a non-busy state. > > > > > > Unfortunately, I can't see anything wrong in the log - the card isn't > > > coming out of its initialization phase. I can't see any reason why > > > that would be. Has the user verified the card works under Linux? > > > > > > > card is detected/usable under Linux, no problem there > > Can you grab the syslog/dmesg output from Linux as it detects and > initializes the card? > sure, any special kernel params for debugging? > > The failure is pretty early in the card detection process and the card > isn't responding with a particular failure - it's just not going into > a ready state. > > -Kevin > ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Mon, Oct 23, 2017 at 10:55:57AM -0500, Matt DeVillier wrote: > On Mon, Oct 23, 2017 at 10:50 AM, Kevin O'Connor wrote: > > > On Mon, Oct 23, 2017 at 10:39:03AM -0400, Kevin O'Connor wrote: > > > Hi Matt, > > > > > > Can you gzip and attach the full log? (At a minimum, we need to see > > > the log extracts around the failure.) > > > > Ah, nevermind - I see the timeout is generated in the wait for the > > card to be in a non-busy state. > > > > Unfortunately, I can't see anything wrong in the log - the card isn't > > coming out of its initialization phase. I can't see any reason why > > that would be. Has the user verified the card works under Linux? > > > > card is detected/usable under Linux, no problem there Can you grab the syslog/dmesg output from Linux as it detects and initializes the card? The failure is pretty early in the card detection process and the card isn't responding with a particular failure - it's just not going into a ready state. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Mon, Oct 23, 2017 at 10:50 AM, Kevin O'Connor wrote: > On Mon, Oct 23, 2017 at 10:39:03AM -0400, Kevin O'Connor wrote: > > Hi Matt, > > > > Can you gzip and attach the full log? (At a minimum, we need to see > > the log extracts around the failure.) > > Ah, nevermind - I see the timeout is generated in the wait for the > card to be in a non-busy state. > > Unfortunately, I can't see anything wrong in the log - the card isn't > coming out of its initialization phase. I can't see any reason why > that would be. Has the user verified the card works under Linux? > card is detected/usable under Linux, no problem there > > -Kevin > ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Mon, Oct 23, 2017 at 10:39:03AM -0400, Kevin O'Connor wrote: > On Thu, Oct 19, 2017 at 09:16:13PM -0500, Matt DeVillier wrote: > > I have a user running one of my SeaBIOS builds on a Asus Chromebook C302sa > > (google/cave) who is having trouble with high-capacity SD cards - they > > aren't detected at all due to timing out during init. I've tried adjusting > > the various timeouts, and the only change is longer log files. > > > > The SD card in question is a Samsung MB-MC128GA U3 Micro SDXC 128GB EVO > > Plus. Trimmed log below. The function start indicators were inserted by me > > as part of debugging. > > > > thanks in advance, > > Matt > > > > SeaBIOS (version rel-1.10.0-81-g0fff851-MrChromebox-2017.10.19) > > /7a9fe000\ Start thread > > |7a9fe000| Searching bootorder for: /pci@i0cf8/*@1e,6 > > |7a9fe000| sdcard_pci_setup() start > > |7a9fe000| sdcard_controller_setup() start > > |7a9fe000| sdhci@0xd1138000 ver=1002 cap=7568c881 807 > > |7a9fe000| sdcard_card_setup() start > > |7a9fe000| sdcard_set_frequency 200 400 fa00 > > |7a9fe000| sdcard_pio cmd 0 0 1ff > > |7a9fe000| sdcard cmd 0 response 0 0 0 0 > > |7a9fe000| sdcard_pio cmd 81a 1aa 1ff > > |7a9fe000| sdcard cmd 81a response 1aa 0 0 0 > > |7a9fe000| sdcard_pio cmd 371a 0 1ff > > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > > |7a9fe000| sdcard_pio cmd 2902 0 1ff > > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > > |7a9fe000| sdcard_pio cmd 371a 0 1ff > > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > > |7a9fe000| sdcard_pio cmd 2902 4010 1ff > > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > > |7a9fe000| sdcard_pio cmd 371a 0 1ff > > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > > |7a9fe000| sdcard_pio cmd 2902 4010 1ff > > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > > > > |7a9fe000| WARNING - Timeout at sdcard_card_setup:432! > > \7a9fe000/ End thread > > All threads complete. > > Hi Matt, > > Can you gzip and attach the full log? (At a minimum, we need to see > the log extracts around the failure.) Ah, nevermind - I see the timeout is generated in the wait for the card to be in a non-busy state. Unfortunately, I can't see anything wrong in the log - the card isn't coming out of its initialization phase. I can't see any reason why that would be. Has the user verified the card works under Linux? -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
no problem -- attached On Mon, Oct 23, 2017 at 9:39 AM, Kevin O'Connor wrote: > On Thu, Oct 19, 2017 at 09:16:13PM -0500, Matt DeVillier wrote: > > I have a user running one of my SeaBIOS builds on a Asus Chromebook > C302sa > > (google/cave) who is having trouble with high-capacity SD cards - they > > aren't detected at all due to timing out during init. I've tried > adjusting > > the various timeouts, and the only change is longer log files. > > > > The SD card in question is a Samsung MB-MC128GA U3 Micro SDXC 128GB EVO > > Plus. Trimmed log below. The function start indicators were inserted by > me > > as part of debugging. > > > > thanks in advance, > > Matt > > > > SeaBIOS (version rel-1.10.0-81-g0fff851-MrChromebox-2017.10.19) > > /7a9fe000\ Start thread > > |7a9fe000| Searching bootorder for: /pci@i0cf8/*@1e,6 > > |7a9fe000| sdcard_pci_setup() start > > |7a9fe000| sdcard_controller_setup() start > > |7a9fe000| sdhci@0xd1138000 ver=1002 cap=7568c881 807 > > |7a9fe000| sdcard_card_setup() start > > |7a9fe000| sdcard_set_frequency 200 400 fa00 > > |7a9fe000| sdcard_pio cmd 0 0 1ff > > |7a9fe000| sdcard cmd 0 response 0 0 0 0 > > |7a9fe000| sdcard_pio cmd 81a 1aa 1ff > > |7a9fe000| sdcard cmd 81a response 1aa 0 0 0 > > |7a9fe000| sdcard_pio cmd 371a 0 1ff > > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > > |7a9fe000| sdcard_pio cmd 2902 0 1ff > > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > > |7a9fe000| sdcard_pio cmd 371a 0 1ff > > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > > |7a9fe000| sdcard_pio cmd 2902 4010 1ff > > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > > |7a9fe000| sdcard_pio cmd 371a 0 1ff > > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > > |7a9fe000| sdcard_pio cmd 2902 4010 1ff > > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > > > > |7a9fe000| WARNING - Timeout at sdcard_card_setup:432! > > \7a9fe000/ End thread > > All threads complete. > > Hi Matt, > > Can you gzip and attach the full log? (At a minimum, we need to see > the log extracts around the failure.) > > -Kevin > sdcard_nodetect.txt.gz Description: GNU Zip compressed data ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Failure to detect high-capacity SD card
On Thu, Oct 19, 2017 at 09:16:13PM -0500, Matt DeVillier wrote: > I have a user running one of my SeaBIOS builds on a Asus Chromebook C302sa > (google/cave) who is having trouble with high-capacity SD cards - they > aren't detected at all due to timing out during init. I've tried adjusting > the various timeouts, and the only change is longer log files. > > The SD card in question is a Samsung MB-MC128GA U3 Micro SDXC 128GB EVO > Plus. Trimmed log below. The function start indicators were inserted by me > as part of debugging. > > thanks in advance, > Matt > > SeaBIOS (version rel-1.10.0-81-g0fff851-MrChromebox-2017.10.19) > /7a9fe000\ Start thread > |7a9fe000| Searching bootorder for: /pci@i0cf8/*@1e,6 > |7a9fe000| sdcard_pci_setup() start > |7a9fe000| sdcard_controller_setup() start > |7a9fe000| sdhci@0xd1138000 ver=1002 cap=7568c881 807 > |7a9fe000| sdcard_card_setup() start > |7a9fe000| sdcard_set_frequency 200 400 fa00 > |7a9fe000| sdcard_pio cmd 0 0 1ff > |7a9fe000| sdcard cmd 0 response 0 0 0 0 > |7a9fe000| sdcard_pio cmd 81a 1aa 1ff > |7a9fe000| sdcard cmd 81a response 1aa 0 0 0 > |7a9fe000| sdcard_pio cmd 371a 0 1ff > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > |7a9fe000| sdcard_pio cmd 2902 0 1ff > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > |7a9fe000| sdcard_pio cmd 371a 0 1ff > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > |7a9fe000| sdcard_pio cmd 2902 4010 1ff > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > |7a9fe000| sdcard_pio cmd 371a 0 1ff > |7a9fe000| sdcard cmd 371a response 120 0 0 0 > |7a9fe000| sdcard_pio cmd 2902 4010 1ff > |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 > > |7a9fe000| WARNING - Timeout at sdcard_card_setup:432! > \7a9fe000/ End thread > All threads complete. Hi Matt, Can you gzip and attach the full log? (At a minimum, we need to see the log extracts around the failure.) -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
[SeaBIOS] Failure to detect high-capacity SD card
I have a user running one of my SeaBIOS builds on a Asus Chromebook C302sa (google/cave) who is having trouble with high-capacity SD cards - they aren't detected at all due to timing out during init. I've tried adjusting the various timeouts, and the only change is longer log files. The SD card in question is a Samsung MB-MC128GA U3 Micro SDXC 128GB EVO Plus. Trimmed log below. The function start indicators were inserted by me as part of debugging. thanks in advance, Matt SeaBIOS (version rel-1.10.0-81-g0fff851-MrChromebox-2017.10.19) /7a9fe000\ Start thread |7a9fe000| Searching bootorder for: /pci@i0cf8/*@1e,6 |7a9fe000| sdcard_pci_setup() start |7a9fe000| sdcard_controller_setup() start |7a9fe000| sdhci@0xd1138000 ver=1002 cap=7568c881 807 |7a9fe000| sdcard_card_setup() start |7a9fe000| sdcard_set_frequency 200 400 fa00 |7a9fe000| sdcard_pio cmd 0 0 1ff |7a9fe000| sdcard cmd 0 response 0 0 0 0 |7a9fe000| sdcard_pio cmd 81a 1aa 1ff |7a9fe000| sdcard cmd 81a response 1aa 0 0 0 |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9fe000| sdcard cmd 371a response 120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 0 1ff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9fe000| sdcard cmd 371a response 120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 4010 1ff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 |7a9fe000| sdcard_pio cmd 371a 0 1ff |7a9fe000| sdcard cmd 371a response 120 0 0 0 |7a9fe000| sdcard_pio cmd 2902 4010 1ff |7a9fe000| sdcard cmd 2902 response ff8000 0 0 0 |7a9fe000| WARNING - Timeout at sdcard_card_setup:432! \7a9fe000/ End thread All threads complete. ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios