|
@@ -44,6 +44,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
44
|
44
|
#include <ipxe/pci.h>
|
45
|
45
|
#include <ipxe/iso9660.h>
|
46
|
46
|
#include <ipxe/eltorito.h>
|
|
47
|
+#include <ipxe/dhcp.h>
|
|
48
|
+#include <ipxe/settings.h>
|
47
|
49
|
#include <realmode.h>
|
48
|
50
|
#include <bios.h>
|
49
|
51
|
#include <biosint.h>
|
|
@@ -1986,7 +1988,32 @@ static int int13_describe ( unsigned int drive ) {
|
1986
|
1988
|
return 0;
|
1987
|
1989
|
}
|
1988
|
1990
|
|
1989
|
|
-PROVIDE_SANBOOT_INLINE ( pcbios, san_default_drive );
|
|
1991
|
+/** The "san-drive" setting */
|
|
1992
|
+const struct setting san_drive_setting __setting ( SETTING_SANBOOT_EXTRA,
|
|
1993
|
+ san-drive ) = {
|
|
1994
|
+ .name = "san-drive",
|
|
1995
|
+ .description = "SAN drive number",
|
|
1996
|
+ .tag = DHCP_EB_SAN_DRIVE,
|
|
1997
|
+ .type = &setting_type_uint8,
|
|
1998
|
+};
|
|
1999
|
+
|
|
2000
|
+/**
|
|
2001
|
+ * Get default SAN drive number
|
|
2002
|
+ *
|
|
2003
|
+ * @ret drive Default drive number
|
|
2004
|
+ */
|
|
2005
|
+static unsigned int int13_default_drive ( void ) {
|
|
2006
|
+ unsigned long drive;
|
|
2007
|
+
|
|
2008
|
+ /* Use "san-drive" setting, if specified */
|
|
2009
|
+ if ( fetch_uint_setting ( NULL, &san_drive_setting, &drive ) >= 0 )
|
|
2010
|
+ return drive;
|
|
2011
|
+
|
|
2012
|
+ /* Otherwise, default to booting from first hard disk */
|
|
2013
|
+ return 0x80;
|
|
2014
|
+}
|
|
2015
|
+
|
|
2016
|
+PROVIDE_SANBOOT ( pcbios, san_default_drive, int13_default_drive );
|
1990
|
2017
|
PROVIDE_SANBOOT ( pcbios, san_hook, int13_hook );
|
1991
|
2018
|
PROVIDE_SANBOOT ( pcbios, san_unhook, int13_unhook );
|
1992
|
2019
|
PROVIDE_SANBOOT ( pcbios, san_boot, int13_boot );
|