Skip to content

[FEATURE] IPC4: verify-firmware-presence.sh: use actual firmware  #841

Closed

Description

@plbossart

With the IPC4 file path and filename changes, this test needs to be updated:

[   40.931241] sof-audio-pci-intel-tgl 0000:00:1f.3: request_firmware intel/avs/tgl/dsp_basefw.bin successful
2022-01-27 23:55:25 UTC Sub-Test: [INFO] Checking file: /lib/firmware/intel/sof/sof-tgl.ri

The paths and filenames need to be updated.

Activity

  1. marc-hb commented on Jan 28, 2022

    @marc-hb
    Collaborator

    Checking file: /lib/firmware/intel/sof/community/sof-tgl.ri

    The /lib/firmware/intel/sof/community/ part comes from ./sof-test/tools/sof-dump-status.py --fwpath
    The tgl part comes from ./sof-test/tools/sof-dump-status.py --platform

    --platform output comes from a table of PCI and DMI identifiers embedded in sof-dump-status.py + some /sys/ exploration.

    --fwpath output is mostly hardcoded except for the community part that is added based on matching DMI System Information -> Manufacturer, Product Name against a list of values embedded in the script.

    Is intel/avs/tgl/dsp_basefw.bin a good model / good filename example representative of all configurations? For both open and closed source?

    This test is designed to PASS before the firmware is loaded. I doubt it's possible to predict the IPC version before the firmware is loaded, is there? So should the test just look for both and pass when any is found?

    If this gets too complicated this test should simply be removed from IPC4 test plans. It's never been terribly useful IMHO.

  2. marc-hb commented on Jan 28, 2022

    @marc-hb
    Collaborator

    Is intel/avs/tgl/dsp_basefw.bin a good model / good filename example representative of all configurations? For both open and closed source?

    Thanks @ranj063 for answering this: yes this is a good template for closed source. Open source will hopefully have a template too but a different one, probably something like intel/sof/community/sof-abc4.ri

  3. plbossart commented on Jan 28, 2022

    @plbossart
    MemberAuthor

    we are going to use a different path for SOF w/ IPC4, e.g. inte/sof-ipc4/. So I wonder if this test should be removed completely.
    It makes no sense anyway because the distribution typically has firmwares installed, but likely not the ones you want to test. This model of hard-coding path and overriding distribution files is not good. We should use /lib/firmware/updates for CI and tests.

  4. mengdonglin commented on Feb 10, 2022

    @mengdonglin
    Contributor

    we are going to use a different path for SOF w/ IPC4, e.g. inte/sof-ipc4/. So I wonder if this test should be removed completely. It makes no sense anyway because the distribution typically has firmwares installed, but likely not the ones you want to test. This model of hard-coding path and overriding distribution files is not good. We should use /lib/firmware/updates for CI and tests.

    @miRoox I think we need to revise our DUT deployment script? What do you think?

  5. marc-hb commented on Feb 10, 2022

    @marc-hb
    Collaborator

    I will upgrade the installer/Makefile so it supports the new /lib/firmware layout for IPC4

    We should all use the same scripts, laying out files in /lib/firmware/ is not a CI-specific task.

    Probably off-topic.

  6. mengdonglin commented on Feb 14, 2022

    @mengdonglin
    Contributor

    @marc-hb Are you good to be the feature owner?

  7. self-assigned this
    on Feb 14, 2022
  8. marc-hb commented on Feb 14, 2022

    @marc-hb
    Collaborator

    Yes and the plan is in #855

  9. marc-hb commented on Feb 16, 2022

    @marc-hb
    Collaborator

    Sorry I got confused: the plan in #855 (PR #860) was for bugs #842 and #845, not for this.

    ... but I will have a look a this anyway tomorrow (I was focused on #860 and others)

  10. marc-hb commented on Feb 16, 2022

    @marc-hb
    Collaborator

    I think we should get rid of this test. At the SOF level we simply have no control on what the request_firmware() loader does in the kernel. request_firmware does not provide any feedback either and never tells what it loaded and where from (which is IMHO a security problem, I digress). I mean it never tells which of multiple paths it picked https://www.kernel.org/doc/html/latest/driver-api/firmware/fw_search_path.html

    The good news is ./sof-test/tools/sof-dump-status.py --fwpath is used only once in sof-test, only in that test. We can change to print community/ or a blank string so it mimics the SOF driver exactly. Callers can then hardcode anything in they want in front of that if they so desire.

  11. plbossart commented on Feb 16, 2022

    @plbossart
    MemberAuthor

    we could also check that the request_firmware succeeds, but if that fails we'll also never see the boot complete stage, so no problem with removing this test.

  12. plbossart commented on Mar 7, 2022

    @plbossart
    MemberAuthor

    @marc-hb I can't recall if we ever reached a consensus on this, and if we even have an issue to fix.

  13. marc-hb commented on Mar 8, 2022

    @marc-hb
    Collaborator

    I think people either agree to remove this test from every test plan where it is an issue, or they don't care. No one will miss it.

    @thesofproject/test-maintainers

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

Metadata

Metadata

Assignees

Labels

P1Blocker bugs or important features

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions