summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_boottime.c4
-rw-r--r--lib/efi_loader/efi_memory.c2
-rw-r--r--lib/efi_loader/efi_runtime.c2
-rw-r--r--lib/efi_loader/helloworld.c13
-rw-r--r--lib/efi_loader/initrddump.c5
-rw-r--r--lib/efi_selftest/efi_selftest_exitbootservices.c2
-rw-r--r--lib/efi_selftest/efi_selftest_load_file.c20
7 files changed, 26 insertions, 22 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index caaab685ee0..d5065f296ae 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -35,7 +35,7 @@ LIST_HEAD(efi_obj_list);
__efi_runtime_data LIST_HEAD(efi_events);
/* List of queued events */
-LIST_HEAD(efi_event_queue);
+static LIST_HEAD(efi_event_queue);
/* Flag to disable timer activity in ExitBootServices() */
static bool timers_enabled = true;
@@ -44,7 +44,7 @@ static bool timers_enabled = true;
bool efi_st_keep_devices;
/* List of all events registered by RegisterProtocolNotify() */
-LIST_HEAD(efi_register_notify_events);
+static LIST_HEAD(efi_register_notify_events);
/* Handle of the currently executing image */
static efi_handle_t current_image;
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 8f82496740f..e2ca78d935f 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -36,7 +36,7 @@ struct efi_mem_list {
#define EFI_CARVE_OVERLAPS_NONRAM -3
/* This list contains all memory map items */
-LIST_HEAD(efi_mem);
+static LIST_HEAD(efi_mem);
#ifdef CONFIG_EFI_LOADER_BOUNCE_BUFFER
void *efi_bounce_buffer;
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index cee96bfc7fc..bf54d6ad871 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -32,7 +32,7 @@ struct efi_runtime_mmio_list {
};
/* This list contains all runtime available mmio regions */
-LIST_HEAD(efi_runtime_mmio);
+static LIST_HEAD(efi_runtime_mmio);
static efi_status_t __efi_runtime EFIAPI efi_unimplemented(void);
diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
index 49fa8cc2f00..6405f58ec3f 100644
--- a/lib/efi_loader/helloworld.c
+++ b/lib/efi_loader/helloworld.c
@@ -197,8 +197,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
print_config_tables();
/* Get the loaded image protocol */
- ret = boottime->handle_protocol(handle, &loaded_image_guid,
- (void **)&loaded_image);
+ ret = boottime->open_protocol(handle, &loaded_image_guid,
+ (void **)&loaded_image, NULL, NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+
if (ret != EFI_SUCCESS) {
con_out->output_string
(con_out, u"Cannot open loaded image protocol\r\n");
@@ -219,9 +221,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
(con_out, u"Missing device handle\r\n");
goto out;
}
- ret = boottime->handle_protocol(loaded_image->device_handle,
- &device_path_guid,
- (void **)&device_path);
+ ret = boottime->open_protocol(loaded_image->device_handle,
+ &device_path_guid,
+ (void **)&device_path, NULL, NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (ret != EFI_SUCCESS) {
con_out->output_string
(con_out, u"Missing device path for device handle\r\n");
diff --git a/lib/efi_loader/initrddump.c b/lib/efi_loader/initrddump.c
index 971a3b6236c..5b470f48194 100644
--- a/lib/efi_loader/initrddump.c
+++ b/lib/efi_loader/initrddump.c
@@ -291,8 +291,9 @@ static efi_status_t get_initrd(void **initrd, efi_uintn_t *initrd_size)
error(u"Load File2 protocol not found\r\n");
return ret;
}
- ret = bs->handle_protocol(handle, &load_file2_guid,
- (void **)&load_file2_prot);
+ ret = bs->open_protocol(handle, &load_file2_guid,
+ (void **)&load_file2_prot, NULL, NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);
ret = load_file2_prot->load_file(load_file2_prot, dp, false,
initrd_size, NULL);
if (ret != EFI_BUFFER_TOO_SMALL) {
diff --git a/lib/efi_selftest/efi_selftest_exitbootservices.c b/lib/efi_selftest/efi_selftest_exitbootservices.c
index 11b43fdd90b..b090ce74d23 100644
--- a/lib/efi_selftest/efi_selftest_exitbootservices.c
+++ b/lib/efi_selftest/efi_selftest_exitbootservices.c
@@ -27,7 +27,7 @@ struct notification_context {
static struct efi_boot_services *boottime;
static struct efi_event *efi_st_event_notify;
-struct notification_record record;
+static struct notification_record record;
struct notification_context context_before = {
.record = &record,
diff --git a/lib/efi_selftest/efi_selftest_load_file.c b/lib/efi_selftest/efi_selftest_load_file.c
index 8784a761721..14df7611727 100644
--- a/lib/efi_selftest/efi_selftest_load_file.c
+++ b/lib/efi_selftest/efi_selftest_load_file.c
@@ -206,11 +206,11 @@ static efi_status_t decompress(u8 **image)
* @buffer_size: (required) buffer size
* @buffer: buffer to which the file is to be loaded
*/
-efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
- struct efi_device_path *file_path,
- bool boot_policy,
- efi_uintn_t *buffer_size,
- void *buffer)
+static efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
+ struct efi_device_path *file_path,
+ bool boot_policy,
+ efi_uintn_t *buffer_size,
+ void *buffer)
{
++load_file_call_count;
if (memcmp(file_path, dp_lf_file_remainder,
@@ -243,11 +243,11 @@ efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
* @buffer_size: (required) buffer size
* @buffer: buffer to which the file is to be loaded
*/
-efi_status_t EFIAPI load_file2(struct efi_load_file_protocol *this,
- struct efi_device_path *file_path,
- bool boot_policy,
- efi_uintn_t *buffer_size,
- void *buffer)
+static efi_status_t EFIAPI load_file2(struct efi_load_file_protocol *this,
+ struct efi_device_path *file_path,
+ bool boot_policy,
+ efi_uintn_t *buffer_size,
+ void *buffer)
{
++load_file2_call_count;
if (memcmp(file_path, dp_lf2_file_remainder,