1 /* sfi_core.h Simple Firmware Interface, internal header */
2 
3 /*
4 
5   This file is provided under a dual BSD/GPLv2 license.  When using or
6   redistributing this file, you may do so under either license.
7 
8   GPL LICENSE SUMMARY
9 
10   Copyright(c) 2009 Intel Corporation. All rights reserved.
11 
12   This program is free software; you can redistribute it and/or modify
13   it under the terms of version 2 of the GNU General Public License as
14   published by the Free Software Foundation.
15 
16   This program is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19   General Public License for more details.
20 
21   You should have received a copy of the GNU General Public License
22   along with this program; if not, write to the Free Software
23   Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
24   The full GNU General Public License is included in this distribution
25   in the file called LICENSE.GPL.
26 
27   BSD LICENSE
28 
29   Copyright(c) 2009 Intel Corporation. All rights reserved.
30 
31   Redistribution and use in source and binary forms, with or without
32   modification, are permitted provided that the following conditions
33   are met:
34 
35     * Redistributions of source code must retain the above copyright
36       notice, this list of conditions and the following disclaimer.
37     * Redistributions in binary form must reproduce the above copyright
38       notice, this list of conditions and the following disclaimer in
39       the documentation and/or other materials provided with the
40       distribution.
41     * Neither the name of Intel Corporation nor the names of its
42       contributors may be used to endorse or promote products derived
43       from this software without specific prior written permission.
44 
45   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
46   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
47   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
48   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
49   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
50   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
51   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
52   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
53   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
54   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
55   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 
57 */
58 
59 #include <linux/sysfs.h>
60 
61 struct sfi_table_key{
62 	char	*sig;
63 	char	*oem_id;
64 	char	*oem_table_id;
65 };
66 
67 /* sysfs interface */
68 struct sfi_table_attr {
69 	struct bin_attribute attr;
70 	char name[8];
71 };
72 
73 #define SFI_ANY_KEY { .sig = NULL, .oem_id = NULL, .oem_table_id = NULL }
74 
75 extern int __init sfi_acpi_init(void);
76 extern  struct sfi_table_header *sfi_check_table(u64 paddr,
77 					struct sfi_table_key *key);
78 struct sfi_table_header *sfi_get_table(struct sfi_table_key *key);
79 extern void sfi_put_table(struct sfi_table_header *table);
80 extern struct sfi_table_attr __init *sfi_sysfs_install_table(u64 pa);
81 extern void __init sfi_acpi_sysfs_init(void);
82