@@ -88,7 +88,7 @@
#ifdef CONFIG_EFI_LOADER
#if defined(CONFIG_ARM64)
-#define BOOTEFI_NAME "bootaa64.efi"
+#define BOOTEFI_NAME "shell.efi"
#elif defined(CONFIG_ARM)
#define BOOTEFI_NAME "bootarm.efi"
#endif
@@ -172,7 +172,7 @@ static efi_status_t efi_unsupported(const char *funcname)
static unsigned long EFIAPI efi_raise_tpl(UINTN new_tpl)
{
EFI_ENTRY("0x%zx", new_tpl);
- return EFI_EXIT(0);
+ return EFI_EXIT(TPL_APPLICATION);
}
static void EFIAPI efi_restore_tpl(UINTN old_tpl)
@@ -1021,7 +1021,7 @@ static efi_status_t EFIAPI efi_set_watchdog_timer(unsigned long timeout,
{
EFI_ENTRY("%ld, 0x%"PRIx64", %ld, %p", timeout, watchdog_code,
data_size, watchdog_data);
- return efi_unsupported(__func__);
+ return EFI_EXIT(EFI_SUCCESS);
}
static efi_status_t EFIAPI efi_connect_controller(
@@ -561,7 +561,8 @@ static efi_status_t EFIAPI efi_cin_ex_register_key_notify(
efi_handle_t *notify_handle)
{
EFI_ENTRY("%p, %p, %p", this, notify_fn, notify_handle);
- return EFI_EXIT(EFI_OUT_OF_RESOURCES);
+// return EFI_EXIT(EFI_OUT_OF_RESOURCES);
+ return EFI_EXIT(EFI_SUCCESS);
}
static efi_status_t EFIAPI efi_cin_ex_unregister_key_notify(
@@ -218,8 +218,8 @@ static efi_status_t EFIAPI efi_file_delete(struct efi_file_handle *file)
{
struct file_handle *fh = to_fh(file);
EFI_ENTRY("%p", file);
- file_close(fh);
- return EFI_EXIT(EFI_WARN_DELETE_FAILURE);
+ // TODO need fs_rm()..
+ return EFI_EXIT(file_close(fh));
}
static efi_status_t file_read(struct file_handle *fh, u64 *buffer_size,
@@ -340,6 +340,13 @@ static efi_status_t EFIAPI efi_file_write(struct efi_file_handle *file,
EFI_ENTRY("%p, %p, %p", file, buffer_size, buffer);
+ // XXX hack because fat_write is horrible:
+ if (!fs_exists(fh->path)) {
+ char *p = fh->path;
+ while ((p = strchr(p, '/')))
+ *p++ = '_';
+ }
+
if (set_blk_dev(fh)) {
ret = EFI_DEVICE_ERROR;
goto error;