]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[linux] Add empty smbios
authorPiotr Jaroszyński <p.jaroszynski@gmail.com>
Wed, 26 May 2010 17:04:47 +0000 (19:04 +0200)
committerMichael Brown <mcb30@ipxe.org>
Thu, 19 Aug 2010 11:38:34 +0000 (12:38 +0100)
There exists an smbios userspace library so implementing this is
probably possible, but doesn't seem really important to have in
userspace.  Hence provide a dummy implementation returning an error.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/config/defaults/linux.h
src/include/ipxe/errfile.h
src/include/ipxe/linux/linux_smbios.h [new file with mode: 0644]
src/include/ipxe/smbios.h
src/interface/linux/linux_smbios.c [new file with mode: 0644]

index 8a587ba408a63af7c8a7fe5590c42508a0e12b04..a678aa4f164dd1985e3a1d823feea3d5712adff0 100644 (file)
@@ -12,6 +12,7 @@
 #define UACCESS_LINUX
 #define UMALLOC_LINUX
 #define NAP_LINUX
+#define SMBIOS_LINUX
 
 #define IMAGE_SCRIPT
 
index ec0703396e8359ba1c24cde586add29c5a3f8f90..baeeec6caacce87c48b509a1cb3ab8e0c7a25dce 100644 (file)
@@ -213,6 +213,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
 #define ERRFILE_login_ui             ( ERRFILE_OTHER | 0x00170000 )
 #define ERRFILE_ib_srpboot           ( ERRFILE_OTHER | 0x00180000 )
 #define ERRFILE_iwmgmt               ( ERRFILE_OTHER | 0x00190000 )
+#define ERRFILE_linux_smbios         ( ERRFILE_OTHER | 0x001a0000 )
 
 /** @} */
 
diff --git a/src/include/ipxe/linux/linux_smbios.h b/src/include/ipxe/linux/linux_smbios.h
new file mode 100644 (file)
index 0000000..6d51e13
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef _IPXE_LINUX_SMBIOS_H
+#define _IPXE_LINUX_SMBIOS_H
+
+/** @file
+ *
+ * iPXE SMBIOS API for linux
+ *
+ */
+
+FILE_LICENCE(GPL2_OR_LATER);
+
+#ifdef SMBIOS_LINUX
+#define SMBIOS_PREFIX_linux
+#else
+#define SMBIOS_PREFIX_linux __linux_
+#endif
+
+#endif /* _IPXE_LINUX_SMBIOS_H */
index dc34bbeb90958b94f722b935a6cf0a2fc76a1158..fcf149ea7353031e8233e669982d1c604d9cfe5b 100644 (file)
@@ -26,6 +26,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
 
 /* Include all architecture-independent SMBIOS API headers */
 #include <ipxe/efi/efi_smbios.h>
+#include <ipxe/linux/linux_smbios.h>
 
 /* Include all architecture-dependent SMBIOS API headers */
 #include <bits/smbios.h>
diff --git a/src/interface/linux/linux_smbios.c b/src/interface/linux/linux_smbios.c
new file mode 100644 (file)
index 0000000..f99120b
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2010 Piotr Jaroszyński <p.jaroszynski@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+FILE_LICENCE(GPL2_OR_LATER);
+
+#include <errno.h>
+#include <ipxe/smbios.h>
+
+/**
+ * Find SMBIOS
+ *
+ * Not implemented currently.
+ *
+ * @v smbios           SMBIOS entry point descriptor structure to fill in
+ * @ret rc             Return status code
+ */
+static int linux_find_smbios(struct smbios *smbios __unused)
+{
+       return -ENODEV;
+}
+
+PROVIDE_SMBIOS(linux, find_smbios, linux_find_smbios);