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