]> Git Repo - u-boot.git/blobdiff - include/efi_selftest.h
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
[u-boot.git] / include / efi_selftest.h
index 1515fdaa02b05fcc6015dff3e33ec9176ea9795f..1b708849bcb9f3b07995b399d996add754324b2e 100644 (file)
@@ -8,7 +8,6 @@
 #ifndef _EFI_SELFTEST_H
 #define _EFI_SELFTEST_H
 
-#include <common.h>
 #include <efi.h>
 #include <efi_api.h>
 #include <efi_loader.h>
 
 #define EFI_ST_SUCCESS 0
 #define EFI_ST_FAILURE 1
-#define EFI_ST_SUCCESS_STR L"SUCCESS"
+#define EFI_ST_SUCCESS_STR u"SUCCESS"
+
+extern const struct efi_system_table *st_systable;
+extern const struct efi_boot_services *st_boottime;
 
 /**
  * efi_st_printf() - print a message
  */
 enum efi_test_phase {
        /**
-        * @EFI_EXECUTE_BEFORE_BOOTTIME_EXIT: - execute before ExitBootServices
+        * @EFI_EXECUTE_BEFORE_BOOTTIME_EXIT:
         *
         * Setup, execute, and teardown are executed before ExitBootServices().
         */
        EFI_EXECUTE_BEFORE_BOOTTIME_EXIT = 1,
        /**
-        * @EFI_SETUP_BEFORE_BOOTTIME_EXIT: - setup before ExitBootServices
+        * @EFI_SETUP_BEFORE_BOOTTIME_EXIT:
         *
         * Setup is executed before ExitBootServices() while execute, and
         * teardown are executed after ExitBootServices().
         */
        EFI_SETUP_BEFORE_BOOTTIME_EXIT,
        /**
-        * @EFI_SETUP_AFTER_BOOTTIME_EXIT: - setup after ExitBootServices
+        * @EFI_SETTING_VIRTUAL_ADDRESS_MAP:
         *
-        * Setup, execute, and teardown are executed after ExitBootServices().
+        * Execute calls SetVirtualAddressMap(). Setup is executed before
+        * ExitBootServices() while execute is executed after
+        * ExitBootServices(), and after the execute of tests marked as
+        * @EFI_SETUP_BEFORE_BOOTTIME_EXIT. Teardown is executed thereafter.
         */
-       EFI_SETUP_AFTER_BOOTTIME_EXIT,
+       EFI_SETTING_VIRTUAL_ADDRESS_MAP,
 };
 
 extern struct efi_simple_text_output_protocol *con_out;
@@ -108,7 +113,7 @@ u16 *efi_st_translate_char(u16 code);
  * efi_st_translate_code() - translate a scan code to a human readable string
  *
  * This function translates the scan code returned by the simple text input
- * protocol to a human readable string, e.g. 0x04 is translated to L"Left".
+ * protocol to a human readable string, e.g. 0x04 is translated to u"Left".
  *
  * @code:      scan code
  * Return:     Unicode string
@@ -125,7 +130,15 @@ u16 *efi_st_translate_code(u16 code);
  * @buf2:      char string
  * Return:     0 if both buffers contain equivalent strings
  */
-int efi_st_strcmp_16_8(const u16 *buf1, const char *buf2);
+int efi_st_strcmp_16_8(const u16 *buf1, const unsigned char *buf2);
+
+/**
+ * efi_st_get_config_table() - get configuration table
+ *
+ * @guid:      GUID of the configuration table
+ * Return:     pointer to configuration table or NULL
+ */
+void *efi_st_get_config_table(const efi_guid_t *guid);
 
 /**
  * efi_st_get_key() - reads an Unicode character from the input device
@@ -134,6 +147,17 @@ int efi_st_strcmp_16_8(const u16 *buf1, const char *buf2);
  */
 u16 efi_st_get_key(void);
 
+/**
+ * efi_st_query_variable_common - Common variable tests for boottime/runtime
+ *
+ * @runtime:   Pointer to services table
+ * @attributes: Attributes used
+ *
+ * Return:     EFI_ST_SUCCESS/FAILURE
+ */
+int efi_st_query_variable_common(struct efi_runtime_services *runtime,
+                                u32 attributes);
+
 /**
  * struct efi_unit_test - EFI unit test
  *
This page took 0.030101 seconds and 4 git commands to generate.