efi: Move most of efi_device_path into lib/efi
Most of these utility functions are useful for the app, so move them into the common directory. Move the GUIDs used by this file from their various other location, so they are available to the app, even if it doesn't enabled EFI_LOADER Fix the rather large number of checkpath warnings in this file, except for the lwip one, best left to the maintainer to sort out. One noteable change is adding a return value to dp_fill() for the case where an option is not enabled but its uclass is referenced. This presuambly never happens during execution, since if the uclass is not supported there can be no device in that uclass and therefore nothing will ever request its path. So just handle this like an invalid device. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
#
|
||||
|
||||
obj-y += basename.o
|
||||
obj-y += device_path.o
|
||||
|
||||
1165
lib/efi/device_path.c
Normal file
1165
lib/efi/device_path.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -20,15 +20,6 @@
|
||||
#include <crypto/pkcs7_parser.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID;
|
||||
const efi_guid_t efi_guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID;
|
||||
const efi_guid_t efi_guid_loaded_image = EFI_LOADED_IMAGE_PROTOCOL_GUID;
|
||||
const efi_guid_t efi_guid_loaded_image_device_path =
|
||||
EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
|
||||
const efi_guid_t efi_simple_file_system_protocol_guid =
|
||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
|
||||
const efi_guid_t efi_file_info_guid = EFI_FILE_INFO_GUID;
|
||||
|
||||
static int machines[] = {
|
||||
#if defined(__aarch64__)
|
||||
IMAGE_FILE_MACHINE_ARM64,
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <efi_dt_fixup.h>
|
||||
#include <efi_loader.h>
|
||||
|
||||
const efi_guid_t efi_u_boot_guid = U_BOOT_GUID;
|
||||
|
||||
efi_handle_t efi_root = NULL;
|
||||
|
||||
struct efi_root_dp {
|
||||
|
||||
Reference in New Issue
Block a user