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)
Mon, Nov 11, 5:43 AM
Unknown Object (File)
Sun, Nov 10, 7:53 PM
Unknown Object (File)
Sat, Nov 9, 10:54 AM
Unknown Object (File)
Thu, Nov 7, 10:08 PM
Unknown Object (File)
Wed, Nov 6, 11:33 AM
Unknown Object (File)
Tue, Nov 5, 3:00 PM
Unknown Object (File)
Fri, Nov 1, 3:26 AM
Unknown Object (File)
Wed, Oct 30, 10:40 AM
Subscribers

Details

Summary

Sponsored by: Ampere Computing LLC

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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