Merge git://git.denx.de/u-boot-spi
[platform/kernel/u-boot.git] / include / efi_loader.h
index e1f0af3..6185055 100644 (file)
@@ -101,6 +101,8 @@ extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;
  * interface (usually a struct with callback functions), this struct maps the
  * protocol GUID to the respective protocol interface */
 struct efi_handler {
+       /* Link to the list of protocols of a handle */
+       struct list_head link;
        const efi_guid_t *guid;
        void *protocol_interface;
 };
@@ -115,8 +117,8 @@ struct efi_handler {
 struct efi_object {
        /* Every UEFI object is part of a global object list */
        struct list_head link;
-       /* We support up to 16 "protocols" an object can be accessed through */
-       struct efi_handler protocols[16];
+       /* The list of protocols */
+       struct list_head protocols;
        /* The object spawner can either use this for data or as identifier */
        void *handle;
 };
@@ -184,8 +186,12 @@ void efi_restore_gd(void);
 void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map);
 /* Call this to set the current device name */
 void efi_set_bootdev(const char *dev, const char *devnr, const char *path);
+/* Add a new object to the object list. */
+void efi_add_handle(struct efi_object *obj);
 /* Create handle */
 efi_status_t efi_create_handle(void **handle);
+/* Delete handle */
+void efi_delete_handle(struct efi_object *obj);
 /* Call this to validate a handle and find the EFI object for it */
 struct efi_object *efi_search_obj(const void *handle);
 /* Find a protocol on a handle */
@@ -245,9 +251,11 @@ uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
 int efi_memory_init(void);
 /* Adds new or overrides configuration table entry to the system table */
 efi_status_t efi_install_configuration_table(const efi_guid_t *guid, void *table);
-void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *obj,
-                           struct efi_device_path *device_path,
-                           struct efi_device_path *file_path);
+/* Sets up a loaded image */
+efi_status_t efi_setup_loaded_image(
+                       struct efi_loaded_image *info, struct efi_object *obj,
+                       struct efi_device_path *device_path,
+                       struct efi_device_path *file_path);
 efi_status_t efi_load_image_from_path(struct efi_device_path *file_path,
                                      void **buffer);