From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 12/12] HACK: efi_loader: hacks for SCT
Date: Sun, 10 Sep 2017 09:22:33 -0400 [thread overview]
Message-ID: <20170910132236.14318-13-robdclark@gmail.com> (raw)
In-Reply-To: <20170910132236.14318-1-robdclark@gmail.com>
Not intended to be merged, just to show the remaning TODOs to get
SCT.efi working.
---
include/config_distro_bootcmd.h | 2 +-
lib/efi_loader/efi_boottime.c | 4 ++--
lib/efi_loader/efi_console.c | 3 ++-
lib/efi_loader/efi_file.c | 11 +++++++++--
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index e0d0034ed3..e232a62996 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -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
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 9628bef474..5db8ea9090 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -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(
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index fcd65ca488..139f7ea55b 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -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(
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 118d83ad7c..d66b0d0370 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -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;
--
2.13.5
prev parent reply other threads:[~2017-09-10 13:22 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-10 13:22 [U-Boot] [PATCH v1 00/12] efi_loader+video: support for Shell.efi Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 01/12] efi_loader: add stub EFI_DEVICE_PATH_UTILITIES_PROTOCOL Rob Clark
2017-10-04 17:13 ` Heinrich Schuchardt
2017-10-04 17:29 ` Heinrich Schuchardt
2017-10-04 18:00 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 02/12] efi_loader: add stub HII protocols Rob Clark
2017-10-04 17:45 ` Heinrich Schuchardt
2017-10-04 17:59 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 03/12] efi_loader: add EFI_UNICODE_COLLATION_PROTOCOL stub Rob Clark
2017-10-04 17:57 ` Heinrich Schuchardt
2017-10-04 18:35 ` Rob Clark
2017-10-04 18:57 ` Heinrich Schuchardt
2017-10-04 19:02 ` Heinrich Schuchardt
2017-10-04 19:01 ` Peter Jones
2017-09-10 13:22 ` [U-Boot] [PATCH v1 04/12] efi_loader: start fleshing out HII Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 05/12] efi_loader: flesh out unicode protocol Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 06/12] efi_loader: start fleshing out efi_device_path_utilities Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 07/12] efi_loader: SIMPLE_TEXT_INPUT_EX plus wire up objects properly Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 08/12] efi_loader: console support for color attributes Rob Clark
2017-10-04 18:53 ` Heinrich Schuchardt
2017-10-04 20:54 ` Rob Clark
2017-10-04 22:01 ` Heinrich Schuchardt
2017-10-04 23:19 ` Rob Clark
2017-10-04 23:53 ` Heinrich Schuchardt
2017-10-05 0:00 ` Rob Clark
2017-10-05 0:12 ` Rob Clark
2017-10-05 0:33 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 09/12] dm: video: Fix cache flushes Rob Clark
2017-10-04 19:29 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 10/12] dm: video: Add basic ANSI escape sequence support Rob Clark
2017-09-12 12:30 ` Simon Glass
2017-09-12 13:06 ` Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 11/12] dm: video: Add color " Rob Clark
2017-09-10 13:22 ` Rob Clark [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170910132236.14318-13-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox