2017-08-31 00:22:50 +02:00
|
|
|
From: Bruce Rogers <brogers@suse.com>
|
|
|
|
Date: Mon, 24 Jul 2017 10:44:24 -0600
|
2019-09-12 17:54:03 +02:00
|
|
|
Subject: stub out the SAN req's in int13
|
|
|
|
|
|
|
|
Include-If: %if 0%{?patch-possibly-applied-elsewhere}
|
2017-08-31 00:22:50 +02:00
|
|
|
|
2018-05-01 17:20:58 +02:00
|
|
|
We need to find some code or data to change so we can make the rom fit
|
|
|
|
into the legacy size requirements. Comment out SAN support, and
|
|
|
|
hopefully nobody will be impacted.
|
|
|
|
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
2017-08-31 00:22:50 +02:00
|
|
|
---
|
2018-05-01 17:20:58 +02:00
|
|
|
src/arch/x86/interface/pcbios/int13.c | 21 +++++++++++++++++++++
|
|
|
|
1 file changed, 21 insertions(+)
|
2017-08-31 00:22:50 +02:00
|
|
|
|
2019-09-12 17:54:03 +02:00
|
|
|
diff --git a/roms/ipxe/src/arch/x86/interface/pcbios/int13.c b/roms/ipxe/src/arch/x86/interface/pcbios/int13.c
|
|
|
|
index ca789a0d154e1fe3c2508a3aefea..40c61419c0c134120d1ce7c81a1e 100644
|
|
|
|
--- a/roms/ipxe/src/arch/x86/interface/pcbios/int13.c
|
|
|
|
+++ b/roms/ipxe/src/arch/x86/interface/pcbios/int13.c
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -23,6 +23,12 @@
|
2017-08-31 00:22:50 +02:00
|
|
|
|
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
|
|
|
|
|
|
|
+#define INCLUDE_SAN_HOOKS 0
|
2018-05-01 17:20:58 +02:00
|
|
|
+#pragma GCC diagnostic push
|
|
|
|
+#pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
|
|
+#pragma GCC diagnostic ignored "-Wunused-function"
|
|
|
|
+#pragma GCC diagnostic ignored "-Wunused-variable"
|
2017-08-31 00:22:50 +02:00
|
|
|
+
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <limits.h>
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1243,6 +1249,7 @@ static void int13_unhook_vector ( void ) {
|
2017-08-31 00:22:50 +02:00
|
|
|
*/
|
|
|
|
static int int13_hook ( unsigned int drive, struct uri **uris,
|
|
|
|
unsigned int count, unsigned int flags ) {
|
|
|
|
+#if INCLUDE_SAN_HOOKS
|
|
|
|
struct san_device *sandev;
|
|
|
|
struct int13_data *int13;
|
|
|
|
unsigned int natural_drive;
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1315,6 +1322,9 @@ static int int13_hook ( unsigned int drive, struct uri **uris,
|
2017-08-31 00:22:50 +02:00
|
|
|
sandev_put ( sandev );
|
|
|
|
err_alloc:
|
|
|
|
return rc;
|
|
|
|
+#else
|
|
|
|
+ return -1;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1328,6 +1338,7 @@ static int int13_hook ( unsigned int drive, struct uri **uris,
|
2017-08-31 00:22:50 +02:00
|
|
|
*/
|
|
|
|
static void int13_unhook ( unsigned int drive ) {
|
|
|
|
struct san_device *sandev;
|
|
|
|
+#if INCLUDE_SAN_HOOKS
|
|
|
|
|
|
|
|
/* Find drive */
|
|
|
|
sandev = sandev_find ( drive );
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1353,6 +1364,7 @@ static void int13_unhook ( unsigned int drive ) {
|
2017-08-31 00:22:50 +02:00
|
|
|
|
|
|
|
/* Drop reference to drive */
|
|
|
|
sandev_put ( sandev );
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1514,6 +1526,7 @@ static int int13_load_eltorito ( unsigned int drive, struct segoff *address ) {
|
2017-08-31 00:22:50 +02:00
|
|
|
* Note that this function can never return success, by definition.
|
|
|
|
*/
|
|
|
|
static int int13_boot ( unsigned int drive, const char *filename __unused ) {
|
|
|
|
+#if INCLUDE_SAN_HOOKS
|
|
|
|
struct memory_map memmap;
|
|
|
|
struct segoff address;
|
|
|
|
int rc;
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1539,6 +1552,9 @@ static int int13_boot ( unsigned int drive, const char *filename __unused ) {
|
2017-08-31 00:22:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return -ECANCELED; /* -EIMPOSSIBLE */
|
|
|
|
+#else
|
|
|
|
+ return -1;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Maximum size of boot firmware table(s) */
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1605,6 +1621,7 @@ static int int13_install ( struct acpi_header *acpi ) {
|
2017-08-31 00:22:50 +02:00
|
|
|
* @ret rc Return status code
|
|
|
|
*/
|
|
|
|
static int int13_describe ( void ) {
|
|
|
|
+#if INCLUDE_SAN_HOOKS
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
/* Clear tables */
|
2018-05-01 17:20:58 +02:00
|
|
|
@@ -1619,9 +1636,13 @@ static int int13_describe ( void ) {
|
2017-08-31 00:22:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
+#else
|
|
|
|
+ return -1;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
PROVIDE_SANBOOT ( pcbios, san_hook, int13_hook );
|
2018-05-01 17:20:58 +02:00
|
|
|
PROVIDE_SANBOOT ( pcbios, san_unhook, int13_unhook );
|
|
|
|
PROVIDE_SANBOOT ( pcbios, san_boot, int13_boot );
|
|
|
|
PROVIDE_SANBOOT ( pcbios, san_describe, int13_describe );
|
|
|
|
+#pragma GCC diagnostic pop
|