• Mario Limonciello's avatar
    platform/x86: dell-smbios-wmi: introduce userspace interface · f2645fa3
    Mario Limonciello authored
    It's important for the driver to provide a R/W ioctl to ensure that
    two competing userspace processes don't race to provide or read each
    others data.
    
    This userspace character device will be used to perform SMBIOS calls
    from any applications.
    
    It provides an ioctl that will allow passing the WMI calling
    interface buffer between userspace and kernel space.
    
    This character device is intended to deprecate the dcdbas kernel module
    and the interface that it provides to userspace.
    
    To perform an SMBIOS IOCTL call using the character device userspace will
    perform a read() on the the character device.  The WMI bus will provide
    a u64 variable containing the necessary size of the IOCTL buffer.
    
    The API for interacting with this interface is defined in documentation
    as well as the WMI uapi header provides the format of the structures.
    
    Not all userspace requests will be accepted.  The dell-smbios filtering
    functionality will be used to prevent access to certain tokens and calls.
    
    All whitelisted commands and tokens are now shared out to userspace so
    applications don't need to define them in their own headers.
    Signed-off-by: default avatarMario Limonciello <mario.limonciello@dell.com>
    Reviewed-by: default avatarEdward O'Callaghan <quasisec@google.com>
    Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
    f2645fa3
dell-smbios-wmi.c 6.57 KB