Page MenuHomeFreeBSD

ipmi_smbios: Deduplicate smbios entry point discovery logic
ClosedPublic

Authored by imp on Feb 17 2021, 9:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 10, 9:20 PM
Unknown Object (File)
Sun, Nov 24, 1:35 AM
Unknown Object (File)
Sat, Nov 23, 2:28 PM
Unknown Object (File)
Nov 21 2024, 11:56 AM
Unknown Object (File)
Nov 20 2024, 5:58 PM
Unknown Object (File)
Nov 19 2024, 10:03 PM
Unknown Object (File)
Nov 19 2024, 5:21 PM
Unknown Object (File)
Nov 19 2024, 4:34 PM
Subscribers

Details

Summary

Sponsored by: Ampere Computing LLC

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37343
Build 34232: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 17 2021, 11:21 PM

This broke build on amd64:

/usr/src/sys/dev/smbios/smbios.c:212:14: error: no member named 'eps_64bit' in 'struct smbios_softc'
        if (smbios->eps_64bit) {
            ~~~~~~  ^
/usr/src/sys/dev/smbios/smbios.c:213:20: error: no member named 'eps3' in 'struct smbios_softc'; did you mean 'eps'?
                *table = smbios->eps3->structure_table_address;
                                 ^~~~
                                 eps
/usr/src/sys/dev/smbios/smbios.c:66:22: note: 'eps' declared here
        struct smbios_eps *     eps;
                                ^
/usr/src/sys/dev/smbios/smbios.c:214:19: error: no member named 'eps3' in 'struct smbios_softc'; did you mean 'eps'?
                *size = smbios->eps3->structure_table_max_size;
                                ^~~~
                                eps
/usr/src/sys/dev/smbios/smbios.c:66:22: note: 'eps' declared here
        struct smbios_eps *     eps;
                                ^
/usr/src/sys/dev/smbios/smbios.c:214:25: error: no member named 'structure_table_max_size' in 'struct smbios_eps'; did you mean 'structure_table_address'?
                *size = smbios->eps3->structure_table_max_size;
                                      ^~~~~~~~~~~~~~~~~~~~~~~~
                                      structure_table_address
/usr/src/sys/dev/smbios/smbios.h:58:11: note: 'structure_table_address' declared here
        uint32_t        structure_table_address;
                        ^
4 errors generated.

It looks like the patch depends on D28707.

I had to revert this, as it depends on https://reviews.freebsd.org/D28739 which isn't ready to land yet

imp edited reviewers, added: allanjude; removed: imp.

Most of this change has been re-committed / re-implemented.
The only thing this adds that isn't in the tree is length checks, which I've added.

commit f689cb23b2782d0d0f586bcfabbad68f728ed1df
Author: Val Packett <val@packett.cool>
Date:   Wed Apr 7 15:05:49 2021 -0500

    ipmi,smbios: move smbios_walk_table to smbios.h

    This function will be used for exposing DMI info as sysctls in the
    smbios module (in an upcoming review).

    While here, add __packed to the structs.

    Reviewed by:    dab
    MFC after:      1 week
    Sponsored by:   Dell EMC Isilon
    Differential Revision:  https://reviews.freebsd.org/D29270

So I'm snagging this revision.
https://reviews.freebsd.org/D45763

This revision is now accepted and ready to land.Jun 27 2024, 9:59 PM

See https://reviews.freebsd.org/D45763 for what little missing functionality was missing.
As always, flag anything I missed, etc