Skip to content

FW authentication questions regarding Apollo Lake chromebooks #5361

Closed

Description

@coolstar

Hi, I have an Apollo lake Chromebook and had a few questions with SOF

According to the docs, they say that Apollo Lake is supported but it requires a BIOS change. What changes are required in the BIOS for this to work? I have a custom coreboot + tianocore firmware loaded on my Apollo lake Chromebook already (and don’t boot chrome os on there), so if the BIOS change could be documented or upstreamed into coreboot that would be great to get audio working with SOF (it seems audio does work on geminilake already with the same coreboot tree).

Activity

  1. MrChromebox commented on Feb 14, 2022

    @MrChromebox

    ditto. I'm not seeing any differences between APL and GLK Chromebooks firmware-wise on the audio side, so clarification on what needs to be changed would be appreciated

  2. marc-hb commented on Feb 14, 2022

    @marc-hb
    Collaborator

    According to the docs, they say...

    Which docs, this one? https://thesofproject.github.io/latest/platforms/intel-cavs/apollolake/index.html

    This section is a bit confusing, chromebooks never require any BIOS change (only Chromebooks after some date), I mean at least not for authentication reasons. Switching to developer mode is enough, all chromebooks (EDIT: after some date) ship with the community key:
    https://thesofproject.github.io/latest/getting_started/intel_debug/introduction.html#chromebooks-and-sof

    See confirmation in thesofproject/sof-docs#379

    Please submit doc fixes to https://github.com/thesofproject/sof-docs , thanks!

    I'm not seeing any differences between APL and GLK Chromebooks firmware-wise on the audio side

    Indeed, check the symbolic links in https://github.com/thesofproject/sof-bin/tree/main/v2.0.x/sof-v2.0 (cloning may make that easier). They're created by https://github.com/thesofproject/sof/blob/main/installer/GNUmakefile where you can find this:

    target_of_glk := apl
    
  3. plbossart commented on Feb 15, 2022

    @plbossart
    Member

    @coolstar @MrChromebox the issue is the CSME keys used for the SOF firmware authentication. ApolloLake Chromebooks rely on the Intel production key - which means an SOF firmware that you compile yourself would simply be rejected during the boot time. Starting with GeminiLake the key used changed, and you CAN generate the SOF firmware yourself as long as you have access to the Tensilica tools, put the device in developer mode and remove the write protection.

    I did test SOF some 3 years ago on ApolloLake, but we had to find devices where we could update coreBoot with the Servo board. It failed on all devices past a specific production milestone, I have exactly ONE device that I could configure with SOF.
    It's also impossible to update that key with a regular update.

    Bottom line: ApolloLake Chromebooks, despite using the same audio DSP as GeminiLake, will not support SOF. It is what it is, there's nothing we can do about it.

  4. MrChromebox commented on Feb 15, 2022

    @MrChromebox

    ok, so same issue as SKL/KBL then =(

  5. plbossart commented on Feb 15, 2022

    @plbossart
    Member

    ok, so same issue as SKL/KBL then =(

    yes indeed.

  6. coolstar commented on Feb 15, 2022

    @coolstar
    ContributorAuthor

    @plbossart just wondering, is it possible to update the key with a custom coreboot (even if an external flasher is required to write over the ME region), or are Apollo Lake chromebooks SOL when it comes to SOF?

  7. marc-hb commented on Feb 15, 2022

    @marc-hb
    Collaborator

    @cujomalainey , in the docs you helped review recently we have:

    As stated above, starting from 2019/2020, Intel Chromeboooks have been configured with the community key.

    Could we add more specific product references there? It would obviously help answer the questions here. Thanks!

  8. marc-hb commented on Feb 15, 2022

    @marc-hb
    Collaborator

    (even if an external flasher is required to write over the ME region)

    Note merely adding a key does AFAIK not require replacing any firmware code. However I'm not familiar with the flash layout so I unfortunately don't know which region(s) it requires to overwrite (if possible)

    This looks relevant: https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts/

  9. plbossart commented on Feb 15, 2022

    @plbossart
    Member

    @plbossart just wondering, is it possible to update the key with a custom coreboot (even if an external flasher is required to write over the ME region), or are Apollo Lake chromebooks SOL when it comes to SOF?

    I don't fully recall the details but there was something fused or preventing updates at or after the DVT1 hw prototype stage. In other words none of the actual products can be updated.

  10. marc-hb commented on Feb 15, 2022

    @marc-hb
    Collaborator

    Starting with GeminiLake [...] as long as you have access to the Tensilica tools,

    For non-performance sensitive testing you can use the free, crosstool-ng-based toolchain:
    https://thesofproject.github.io/latest/introduction/index.html?highlight=toolchain#toolchain-faq
    Don't release binaries compiled with it.

    All binaries released in https://github.com/thesofproject/sof-bin are compiled with XCC.

  11. cujomalainey commented on Feb 16, 2022

    @cujomalainey
    Contributor

    @plbossart just wondering, is it possible to update the key with a custom coreboot (even if an external flasher is required to write over the ME region), or are Apollo Lake chromebooks SOL when it comes to SOF?

    I don't fully recall the details but there was something fused or preventing updates at or after the DVT1 hw prototype stage. In other words none of the actual products can be updated.

    I am pretty sure if you disable RO FW write protect you can still get in there and change the key. How to do that is a completely different question as I am not a coreboot guy. Also note the many warnings you will see if you venture down that path.

    @cujomalainey , in the docs you helped review recently we have:

    As stated above, starting from 2019/2020, Intel Chromeboooks have been configured with the community key.

    Could we add more specific product references there? It would obviously help answer the questions here. Thanks!

    GLK/CML/TGL/JSL/ADL and all following intel chips are signed with the community key. IIRC BYT/CHT/BDW can also run unsigned FW. There is just that gap of APL/SKL/KBL/AML/HSW that can't be switched over easily. Any AMD/MTK platform supported here will also have the community keys. This is again specific to chromebooks.

  12. plbossart commented on Feb 16, 2022

    @plbossart
    Member

    I am pretty sure if you disable RO FW write protect you can still get in there and change the key. How to do that is a completely different question as I am not a coreboot guy. Also note the many warnings you will see if you venture down that path.

    @cujomalainey you are very optimistic on this one. I tried with the support of the Intel team and the Google team (Dylan, Duncan et. al) and did not succeed except on the 'Elektro' device which was pre-production hardware. The same process failed on all other devices. It would take master hacker skills to make this work without any formal support.

  13. cujomalainey commented on Feb 16, 2022

    @cujomalainey
    Contributor

    I am pretty sure if you disable RO FW write protect you can still get in there and change the key. How to do that is a completely different question as I am not a coreboot guy. Also note the many warnings you will see if you venture down that path.

    @cujomalainey you are very optimistic on this one. I tried with the support of the Intel team and the Google team (Dylan, Duncan et. al) and did not succeed except on the 'Elektro' device which was pre-production hardware. The same process failed on all other devices. It would take master hacker skills to make this work without any formal support.

    I don't doubt, I have yet to see anything happen easily in that space. And this would be a high risk activity too, even with servod/ccd

  14. MrChromebox commented on Feb 18, 2022

    @MrChromebox

    Q: Since APL Chromebooks can load, and SoF provides as part of sof-bin, the intel-signed firmware for Apollolake, why can't that be used instead? Seems others have gotten that to work by disabling route checking on the bxt-da7219-max98357a driver (ref: https://github.com/EMLommers/Apollolake_Audio/)

  15. 56 remaining items

  16. ericwoud commented on Mar 26, 2022

    @ericwoud

    Thanks. I deleted my unrelated posts.

  17. Denisuu commented on Mar 26, 2022

    @Denisuu

    I deleted my comments too. Do we open a topic surrounding GLK/APL Chromebook audio here or should we take the discussion elsewhere? Maybe here? pulseaudio-issues

  18. mryndzionek commented on Sep 4, 2022

    @mryndzionek

    one additional note - the volume control seems to be a bit off - it scales from 0-10%, but 11-100 is constant. So 10% is full volume (and quite loud)

    I've tested the topology file on my X360 G1 EE and have the exact same effect/result. aplay -l lists however Speakers and Headset. After some digging I found this, but no luck so far. Editing default.pa like here seems to have the best effect - I can now see 'better behaving' speaker and two mics under pavucontrol. Would be good to have it all figured out, but might be 'good enough' solution for now also for other people, so I thought I'll post it here.

  19. ellyq commented on Sep 4, 2022

    @ellyq

    I think this issue can be closed.

    @plbossart submitted patches to Linux kernel 6.0 and alsa-ucm for GeminiLake devices.

    Thanks to Intel engineers introducing AVS kernel module, we've moved audio development for SKL/KBL/APL (and their refresh variants) to snd_soc_avs.

    It is currently unclear whether GLK and GLK-R devices will be supported by AVS. Source code for that module shows that it should, but it hasn't been tested yet.

    I've asked Fedora developers to include DA7219 definitions in rawhide kernel.

    https://bugzilla.redhat.com/show_bug.cgi?id=2120725

    Below can see APL chromebook (google/reef - hp/snappy) almost completely functional on kernel 6.0-rc1.

    https://user-images.githubusercontent.com/81479208/188331887-e3159795-a0b4-4f68-8d5c-9ffefadb2145.mp4
    https://user-images.githubusercontent.com/81479208/188331889-8ee74dad-0ff5-4c1f-b669-446c641be4c4.mp4

  20. mryndzionek commented on Sep 4, 2022

    @mryndzionek

    Okay then. Lets wait for 6.0. Thanks for the update!

  21. mryndzionek commented on Sep 4, 2022

    @mryndzionek

    Thanks to Intel engineers introducing AVS kernel module, we've moved audio development for SKL/KBL/APL (and their refresh variants) to snd_soc_avs.

    Can I somewhere find info on how to test this? I've installed kernel 6.0-rc3 and without any additional kernel args on SNAPPY I can see only this in dmesg:

    [    7.344432] snd_soc_avs 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
    

    With options snd-intel-dspcfg dsp_driver=3 nothing seems to change in comparison to the older kernel.

  22. ellyq commented on Sep 4, 2022

    @ellyq

    Can I somewhere find info on how to test this?

    Best place would be to check out our discord: https://discord.gg/tkPTk5w

    With options snd-intel-dspcfg dsp_driver=3 nothing seems to change in comparison to the older kernel.

    Because AVS gets selected if you select dsp_driver=4. That being said, 6.0-rc3 from fedora maintainers still doesn't enable it be default, so you'd have to compile it yourself :)

  23. mryndzionek commented on Sep 4, 2022

    @mryndzionek

    Okay, so with dsp_driver=4 speaker works okay. Some logs:

    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: avsmax98357a [avs_max98357a], device 1: Built-in Speakers (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 2: hdaudioB0D2 [hdaudioB0D2], device 1: HDMI1 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 2: hdaudioB0D2 [hdaudioB0D2], device 2: HDMI2 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 2: hdaudioB0D2 [hdaudioB0D2], device 3: HDMI3 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 3: avsda7219 [avs_da7219], device 1: Headset (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    
    [    7.514029] snd_soc_avs 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
    [    8.081461] avs_max98357a avs_max98357a.32: ASoC: Parent card not yet available, widget card binding deferred
    [    8.108268] avs_dmic avs_dmic: ASoC: Parent card not yet available, widget card binding deferred
    [    8.230520] snd_hda_codec_hdmi hdaudioB0D2: creating for HDMI 0 0
    [    8.230533] snd_hda_codec_hdmi hdaudioB0D2: skipping capture dai for HDMI 0
    [    8.230535] snd_hda_codec_hdmi hdaudioB0D2: creating for HDMI 1 1
    [    8.230538] snd_hda_codec_hdmi hdaudioB0D2: skipping capture dai for HDMI 1
    [    8.230540] snd_hda_codec_hdmi hdaudioB0D2: creating for HDMI 2 2
    [    8.230542] snd_hda_codec_hdmi hdaudioB0D2: skipping capture dai for HDMI 2
    [    8.231566] avs_hdaudio avs_hdaudio.2: ASoC: Parent card not yet available, widget card binding deferred
    [    8.231746] avs_hdaudio avs_hdaudio.2: avs_card_late_probe: mapping HDMI converter 1 to PCM 1 (000000009ad619ca)
    [    8.231752] avs_hdaudio avs_hdaudio.2: avs_card_late_probe: mapping HDMI converter 2 to PCM 2 (00000000c5de3d5a)
    [    8.231756] avs_hdaudio avs_hdaudio.2: avs_card_late_probe: mapping HDMI converter 3 to PCM 3 (0000000013682b0d)
    [    8.246204] input: hdaudioB0D2 HDMI/DP,pcm=1 as /devices/platform/avs_hdaudio.2/sound/card2/input12
    [    8.246767] input: hdaudioB0D2 HDMI/DP,pcm=2 as /devices/platform/avs_hdaudio.2/sound/card2/input13
    [    8.247397] input: hdaudioB0D2 HDMI/DP,pcm=3 as /devices/platform/avs_hdaudio.2/sound/card2/input14
    [    8.248877] avs_da7219 avs_da7219.2: ASoC: Parent card not yet available, widget card binding deferred
    [    8.248945] da7219 i2c-DLGS7219:00: supply VDD not found, using dummy regulator
    [    8.249022] da7219 i2c-DLGS7219:00: supply VDDMIC not found, using dummy regulator
    [    8.249040] da7219 i2c-DLGS7219:00: supply VDDIO not found, using dummy regulator
    [    8.249057] da7219 i2c-DLGS7219:00: Invalid VDDIO voltage
    [    8.274047] input: avs_da7219 Headset Jack as /devices/platform/avs_da7219.2/sound/card3/input15
    
  24. cujomalainey commented on Sep 7, 2022

    @cujomalainey
    Contributor

    For GLK on Chromebooks, SOF is still the plan of action, not AVS, even post 6.0

  25. mryndzionek commented on Sep 7, 2022

    @mryndzionek

    For GLK on Chromebooks, SOF is still the plan of action, not AVS, even post 6.0

    I just wanted to see/check if I have a chance of fully working sound (on APL). Things are happening, so I'm happy :)

  26. ellyq commented on Sep 7, 2022

    @ellyq

    For GLK on Chromebooks, SOF is still the plan of action, not AVS, even post 6.0

    Sure, but it looks like GLK might work on AVS. We're currently trying to get someone from our community to boot APL firmware on GLK, since it should be compatible. AVS is looking for APL path if you select it as DSP driver.

    I just wanted to see/check if I have a chance of fully working sound (on APL). Things are happening, so I'm happy :)

    You need Intel's AVS firmware from ChromeOS and rewritten UCM. Both can be found on our discord server. Fedora maintainers included DA7219 in rc4.

  27. mryndzionek commented on Sep 7, 2022

    @mryndzionek

    You need Intel's AVS firmware from ChromeOS and rewritten UCM. Both can be found on our discord server. Fedora maintainers included DA7219 in rc4.

    Yes, so I've downloaded avs.zip. The dmesg above is with this fw.

  28. ellyq commented on Sep 7, 2022

    @ellyq

    Yes, so I've downloaded avs.zip. The dmesg above is with this fw.

    Makes sense :)

    You also need UCM configuration, @coolstar posted hers (for some reason automatic jack detection doesn't work, but we'll look into that later) in the same channel I believe.

    When you'll have FW, UCM and kernel 6.0-rc, audio should be working perfectly fine. I haven't tested external microphone, but internal mic does work :)

  29. mryndzionek commented on Sep 7, 2022

    @mryndzionek

    Yeah, so I have kernel 6.0.0-rc3, the FW from discord and UCM files copied to /usr/share/alsa/ucm2/Intel. Pavucontrol shows one output and one input, but no sound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions