Dummy SAN device.
More...
#include <errno.h>
#include <ipxe/sanboot.h>
Go to the source code of this file.
|
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
|
static int | dummy_san_hook (unsigned int drive, struct uri **uris, unsigned int count, unsigned int flags) |
| Hook dummy SAN device. More...
|
|
static void | dummy_san_unhook (unsigned int drive) |
| Unhook dummy SAN device. More...
|
|
static int | dummy_san_boot (unsigned int drive __unused, struct san_boot_config *config __unused) |
| Boot from dummy SAN device. More...
|
|
static int | dummy_install (struct acpi_header *acpi) |
| Install ACPI table. More...
|
|
static int | dummy_san_describe (void) |
| Describe dummy SAN device. More...
|
|
| PROVIDE_SANBOOT (dummy, san_hook, dummy_san_hook) |
|
| PROVIDE_SANBOOT (dummy, san_unhook, dummy_san_unhook) |
|
| PROVIDE_SANBOOT (dummy, san_boot, dummy_san_boot) |
|
| PROVIDE_SANBOOT (dummy, san_describe, dummy_san_describe) |
|
Dummy SAN device.
Definition in file dummy_sanboot.c.
◆ FILE_LICENCE()
FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL |
| ) |
|
◆ dummy_san_hook()
static int dummy_san_hook |
( |
unsigned int |
drive, |
|
|
struct uri ** |
uris, |
|
|
unsigned int |
count, |
|
|
unsigned int |
flags |
|
) |
| |
|
static |
Hook dummy SAN device.
- Parameters
-
drive | Drive number |
uris | List of URIs |
count | Number of URIs |
flags | Flags |
- Return values
-
drive | Drive number, or negative error |
Definition at line 44 of file dummy_sanboot.c.
58 DBGC ( sandev->
drive,
"SAN %#02x could not register: %s\n",
struct arbelprm_rc_send_wqe rc
void unregister_sandev(struct san_device *sandev)
Unregister SAN device.
static void sandev_put(struct san_device *sandev)
Drop reference to SAN device.
uint8_t drive
Drive number.
#define ENOMEM
Not enough space.
unsigned int drive
Drive number.
int register_sandev(struct san_device *sandev, unsigned int drive, unsigned int flags)
Register SAN device.
uint16_t count
Number of entries.
char * strerror(int errno)
Retrieve string representation of error number.
struct san_device * alloc_sandev(struct uri **uris, unsigned int count, size_t priv_size)
Allocate SAN device.
References alloc_sandev(), count, DBGC, drive, san_device::drive, ENOMEM, flags, rc, register_sandev(), sandev_put(), strerror(), and unregister_sandev().
◆ dummy_san_unhook()
static void dummy_san_unhook |
( |
unsigned int |
drive | ) |
|
|
static |
Unhook dummy SAN device.
- Parameters
-
Definition at line 77 of file dummy_sanboot.c.
void unregister_sandev(struct san_device *sandev)
Unregister SAN device.
static void sandev_put(struct san_device *sandev)
Drop reference to SAN device.
uint8_t drive
Drive number.
struct san_device * sandev_find(unsigned int drive)
Find SAN device by drive number.
References DBGC, drive, sandev_find(), sandev_put(), and unregister_sandev().
◆ dummy_san_boot()
Boot from dummy SAN device.
- Parameters
-
drive | Drive number |
config | Boot configuration parameters |
- Return values
-
Definition at line 101 of file dummy_sanboot.c.
#define EOPNOTSUPP
Operation not supported on socket.
References EOPNOTSUPP.
◆ dummy_install()
Install ACPI table.
- Parameters
-
acpi | ACPI description header |
- Return values
-
Definition at line 113 of file dummy_sanboot.c.
#define le32_to_cpu(value)
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
References acpi, acpi_name(), DBGC, DBGC_HDA, and le32_to_cpu.
Referenced by dummy_san_describe().
◆ dummy_san_describe()
static int dummy_san_describe |
( |
void |
| ) |
|
|
static |
Describe dummy SAN device.
- Return values
-
Definition at line 125 of file dummy_sanboot.c.
int acpi_install(int(*install)(struct acpi_header *acpi))
Install ACPI tables.
static int dummy_install(struct acpi_header *acpi)
Install ACPI table.
References acpi_install(), and dummy_install().
◆ PROVIDE_SANBOOT() [1/4]
◆ PROVIDE_SANBOOT() [2/4]
◆ PROVIDE_SANBOOT() [3/4]
◆ PROVIDE_SANBOOT() [4/4]