xref: /linux-6.15/include/linux/iscsi_ibft.h (revision d9523678)
1*d9523678SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2138fe4e0SKonrad Rzeszutek /*
3138fe4e0SKonrad Rzeszutek  *  Copyright 2007 Red Hat, Inc.
4138fe4e0SKonrad Rzeszutek  *  by Peter Jones <[email protected]>
5138fe4e0SKonrad Rzeszutek  *  Copyright 2007 IBM, Inc.
6138fe4e0SKonrad Rzeszutek  *  by Konrad Rzeszutek <[email protected]>
7138fe4e0SKonrad Rzeszutek  *  Copyright 2008
8138fe4e0SKonrad Rzeszutek  *  by Konrad Rzeszutek <[email protected]>
9138fe4e0SKonrad Rzeszutek  *
10138fe4e0SKonrad Rzeszutek  * This code exposes the iSCSI Boot Format Table to userland via sysfs.
11138fe4e0SKonrad Rzeszutek  */
12138fe4e0SKonrad Rzeszutek 
13138fe4e0SKonrad Rzeszutek #ifndef ISCSI_IBFT_H
14138fe4e0SKonrad Rzeszutek #define ISCSI_IBFT_H
15138fe4e0SKonrad Rzeszutek 
169d24622cSLv Zheng #include <linux/acpi.h>
17138fe4e0SKonrad Rzeszutek 
18138fe4e0SKonrad Rzeszutek /*
19138fe4e0SKonrad Rzeszutek  * Logical location of iSCSI Boot Format Table.
20138fe4e0SKonrad Rzeszutek  * If the value is NULL there is no iBFT on the machine.
21138fe4e0SKonrad Rzeszutek  */
224e639fdfSPeter Jones extern struct acpi_table_ibft *ibft_addr;
23138fe4e0SKonrad Rzeszutek 
24138fe4e0SKonrad Rzeszutek /*
25138fe4e0SKonrad Rzeszutek  * Routine used to find and reserve the iSCSI Boot Format Table. The
26138fe4e0SKonrad Rzeszutek  * mapped address is set in the ibft_addr variable.
27138fe4e0SKonrad Rzeszutek  */
28138fe4e0SKonrad Rzeszutek #ifdef CONFIG_ISCSI_IBFT_FIND
29042be38eSYinghai Lu unsigned long find_ibft_region(unsigned long *sizep);
30138fe4e0SKonrad Rzeszutek #else
31042be38eSYinghai Lu static inline unsigned long find_ibft_region(unsigned long *sizep)
32042be38eSYinghai Lu {
33042be38eSYinghai Lu 	*sizep = 0;
34042be38eSYinghai Lu 	return 0;
35042be38eSYinghai Lu }
36138fe4e0SKonrad Rzeszutek #endif
37138fe4e0SKonrad Rzeszutek 
38138fe4e0SKonrad Rzeszutek #endif /* ISCSI_IBFT_H */
39