sfi_core.h 3.2 KB

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