iscsi_ibft.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2007 Red Hat, Inc.
  3. * by Peter Jones <pjones@redhat.com>
  4. * Copyright 2007 IBM, Inc.
  5. * by Konrad Rzeszutek <konradr@linux.vnet.ibm.com>
  6. * Copyright 2008
  7. * by Konrad Rzeszutek <ketuzsezr@darnok.org>
  8. *
  9. * This code exposes the iSCSI Boot Format Table to userland via sysfs.
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License v2.0 as published by
  13. * the Free Software Foundation
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. */
  20. #ifndef ISCSI_IBFT_H
  21. #define ISCSI_IBFT_H
  22. struct ibft_table_header {
  23. char signature[4];
  24. u32 length;
  25. u8 revision;
  26. u8 checksum;
  27. char oem_id[6];
  28. char oem_table_id[8];
  29. char reserved[24];
  30. } __attribute__((__packed__));
  31. /*
  32. * Logical location of iSCSI Boot Format Table.
  33. * If the value is NULL there is no iBFT on the machine.
  34. */
  35. extern struct ibft_table_header *ibft_addr;
  36. /*
  37. * Routine used to find and reserve the iSCSI Boot Format Table. The
  38. * mapped address is set in the ibft_addr variable.
  39. */
  40. #ifdef CONFIG_ISCSI_IBFT_FIND
  41. extern void __init reserve_ibft_region(void);
  42. #else
  43. static inline void reserve_ibft_region(void) { }
  44. #endif
  45. #endif /* ISCSI_IBFT_H */