From nobody Mon Sep 26 19:57:21 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mbtnx6LyFz4Txwv; Mon, 26 Sep 2022 19:57:25 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mbtnx5pQ1z3hxF; Mon, 26 Sep 2022 19:57:25 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664222245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m8VWLsjouVTQnc2hVys0i8iliL7V1ow3N8aABR/iDnQ=; b=jMb37f5opPcE5+1xf1JttYRfyZdYQNfMFbk4doQoKwUdj0lG7dvpwoIUYw0Qx2n4RSRec3 9Zqvdm0aqL/GdISl+4/NG64JTQhfAHjW9HLUjkqRg+yBwxuMfcFd13W9Yqvw+tQOy4DKPl BZ5o6Vi7HjYSzUVJxuJMaw7cJSmmHrPbWhNElGtWIWxKNB7Rdi3INzgX3cSd0V9MImiNQ3 igzQqTOe7pX9ZzOf8yzIBvRLUdnwqp1DIxBz/ofTvLifoLT4jQNvPBdC0CE3Tcw3HxLQnn rDEsFzTVKJsTE9M6kymsVGZTX4xMAhoJMi3DLjcoH48dtTAGkGiA6KUvTT25vw== Received: from [172.17.133.71] (unknown [207.141.91.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Mbtnx1jxVzj56; Mon, 26 Sep 2022 19:57:25 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.65.22091101 Date: Mon, 26 Sep 2022 12:57:21 -0700 Subject: Re: f486b352470e - main - LinuxKPI: add struct dmi_header and unsupported dmi_walk() From: Ravi Pokala To: "Bjoern A. Zeeb" , , , Message-ID: <9474AE78-4B8B-489A-8EAB-1AC15765C2C8@panasas.com> Thread-Topic: f486b352470e - main - LinuxKPI: add struct dmi_header and unsupported dmi_walk() References: <202209261942.28QJghOa062254@gitrepo.freebsd.org> In-Reply-To: <202209261942.28QJghOa062254@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664222245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m8VWLsjouVTQnc2hVys0i8iliL7V1ow3N8aABR/iDnQ=; b=YgPu7a5AeAuWFsRJoFg2EUT9oixOl5iANExiXfXIGA1vca+CIn+wntLJF7aIu3V61skW1d 9tu6yfBrOjgLcSUrrpuR9AYUyY25y6slKBeMvwRFVEK3MkesQmcWSoFVI/KXWFBSMDtpkl zT6b8wYLo5kOJ8tI6Y44ISHqv47MvuDKLLvz1XpkpmIPiOtn8LjyNQlq9JlnQj8nbWlg1p Ap9feRtwEC9RuVLDhVtPzLesNeUyRRYqJ5axvyraiF7FKwfkiDJnDTbv0HxP4Ft9hd/35D oPLyL0JeE7c1q07SEXMeO3ubk1xBGK/lu2xifxc8+gkkywgd8AK3SCBV6/iAZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664222245; a=rsa-sha256; cv=none; b=or/FTH4IbsE187AAkapc9JfATBa/ddfHJRxrosaSNcTSCuz08MYQ3JFzgVDREJ6/RyfbaU yCCalLNEFw1sj3wICfRCnlhfnCSxloqXqTrHwLDh6px3KTEdNS15X6YoUBZnNn4SGhkp6D nWSzAHnqS2Da20Itjsyt/k2LtSGCCBl8qD8UjUs+b9dS8HP6y2doMZScnMw0xYtZrS6vOa O3gM5Qjh/4y6Rd54YwF1jv3GvmRMdHlv5tjqT9gdQpdg7YljrVdkulsIz/KztXQuf3V+zq C46oNKuE7wTlQTso6vwF6tybYgM/5rQzUvMRZl2KA9IptzEnyn5RcxR5skjsbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N -----Original Message----- From: on behalf of "Bjoern A. Zeeb" Date: 2022-09-26, Monday at 12:42 To: , , Subject: git: f486b352470e - main - LinuxKPI: add struct dmi_header and unsupported dmi_walk() The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f486b352470edc82142766c2f3da2b8220774b7f commit f486b352470edc82142766c2f3da2b8220774b7f Author: Bjoern A. Zeeb AuthorDate: 2022-09-23 22:21:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-26 19:40:49 +0000 LinuxKPI: add struct dmi_header and unsupported dmi_walk() Add a structure definition as well as a dummy dmi_walk for now which returns an error as not supported. Our current dmi implementation is special but does not give access to all details but rather only information from kenv which does not suffice all use cases. It seems to me that if we do a proper implementation of DMI parsing, it should probably be in smbios(4). Right? -Ravi (rpokala@) MFC after: 1 week Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D36687 --- sys/compat/linuxkpi/common/include/linux/dmi.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/dmi.h b/sys/compat/linuxkpi/common/include/linux/dmi.h index 339f622f89b2..a3514c66f9cd 100644 --- a/sys/compat/linuxkpi/common/include/linux/dmi.h +++ b/sys/compat/linuxkpi/common/include/linux/dmi.h @@ -34,6 +34,12 @@ #include #include +struct dmi_header { + uint8_t type; + uint8_t length; + uint16_t handle; +}; + int linux_dmi_check_system(const struct dmi_system_id *); bool linux_dmi_match(enum dmi_field, const char *); const struct dmi_system_id *linux_dmi_first_match(const struct dmi_system_id *); @@ -44,4 +50,11 @@ const char *linux_dmi_get_system_info(int); #define dmi_first_match(sysid) linux_dmi_first_match(sysid) #define dmi_get_system_info(sysid) linux_dmi_get_system_info(sysid) +static inline int +dmi_walk(void (*callbackf)(const struct dmi_header *, void *), void *arg) +{ + + return (-ENXIO); +} + #endif /* __LINUXKPI_LINUX_DMI_H__ */