|
@@ -21,7 +21,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
21
|
21
|
|
22
|
22
|
#include <stdlib.h>
|
23
|
23
|
#include <ipxe/init.h>
|
|
24
|
+#include <ipxe/device.h>
|
24
|
25
|
#include <ipxe/efi/efi.h>
|
|
26
|
+#include <ipxe/efi/efi_driver.h>
|
25
|
27
|
|
26
|
28
|
/**
|
27
|
29
|
* EFI entry point
|
|
@@ -44,3 +46,36 @@ EFI_STATUS EFIAPI _efidrv_start ( EFI_HANDLE image_handle,
|
44
|
46
|
|
45
|
47
|
return 0;
|
46
|
48
|
}
|
|
49
|
+
|
|
50
|
+/**
|
|
51
|
+ * Probe EFI root bus
|
|
52
|
+ *
|
|
53
|
+ * @v rootdev EFI root device
|
|
54
|
+ */
|
|
55
|
+static int efi_probe ( struct root_device *rootdev __unused ) {
|
|
56
|
+
|
|
57
|
+ /* Do nothing */
|
|
58
|
+ return 0;
|
|
59
|
+}
|
|
60
|
+
|
|
61
|
+/**
|
|
62
|
+ * Remove EFI root bus
|
|
63
|
+ *
|
|
64
|
+ * @v rootdev EFI root device
|
|
65
|
+ */
|
|
66
|
+static void efi_remove ( struct root_device *rootdev __unused ) {
|
|
67
|
+
|
|
68
|
+ efi_driver_disconnect_all();
|
|
69
|
+}
|
|
70
|
+
|
|
71
|
+/** EFI root device driver */
|
|
72
|
+static struct root_driver efi_root_driver = {
|
|
73
|
+ .probe = efi_probe,
|
|
74
|
+ .remove = efi_remove,
|
|
75
|
+};
|
|
76
|
+
|
|
77
|
+/** EFI root device */
|
|
78
|
+struct root_device efi_root_device __root_device = {
|
|
79
|
+ .dev = { .name = "EFI" },
|
|
80
|
+ .driver = &efi_root_driver,
|
|
81
|
+};
|