aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-03-12 10:56:02 -0400
committerTom Rini <trini@konsulko.com>2019-03-12 10:56:02 -0400
commit116a3a1ae085753e04b62c37a0f11f80cab9d730 (patch)
tree4cec43fd7036c42a5fd31b434077edc57eb19e30 /drivers
parent2e8092d94f40a5692baf3ec768ce3216a7bf032a (diff)
parent3eeb09b4c06fd6eb5c724b21cd2ac538fc015a31 (diff)
downloadu-boot-116a3a1ae085753e04b62c37a0f11f80cab9d730.zip
u-boot-116a3a1ae085753e04b62c37a0f11f80cab9d730.tar.gz
u-boot-116a3a1ae085753e04b62c37a0f11f80cab9d730.tar.bz2
Merge tag 'efi-2019-04-rc4-2' of https://github.com/xypron2/u-boot
Pull request for UEFI system for v2019.04-rc4 Fix an error with the serial communication on boards with a very small UART buffer which leads to a stalled system. Provide an X86 reset driver for the UEFI runtime.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sysreset/sysreset_x86.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
index 20b958c..009f376 100644
--- a/drivers/sysreset/sysreset_x86.c
+++ b/drivers/sysreset/sysreset_x86.c
@@ -10,8 +10,10 @@
#include <sysreset.h>
#include <asm/io.h>
#include <asm/processor.h>
+#include <efi_loader.h>
-static int x86_sysreset_request(struct udevice *dev, enum sysreset_t type)
+static __efi_runtime int x86_sysreset_request(struct udevice *dev,
+ enum sysreset_t type)
{
int value;
@@ -31,6 +33,25 @@ static int x86_sysreset_request(struct udevice *dev, enum sysreset_t type)
return -EINPROGRESS;
}
+#ifdef CONFIG_EFI_LOADER
+void __efi_runtime EFIAPI efi_reset_system(
+ enum efi_reset_type reset_type,
+ efi_status_t reset_status,
+ unsigned long data_size, void *reset_data)
+{
+ if (reset_type == EFI_RESET_COLD ||
+ reset_type == EFI_RESET_PLATFORM_SPECIFIC)
+ x86_sysreset_request(NULL, SYSRESET_COLD);
+ else if (reset_type == EFI_RESET_WARM)
+ x86_sysreset_request(NULL, SYSRESET_WARM);
+
+ /* TODO EFI_RESET_SHUTDOWN */
+
+ while (1) { }
+}
+#endif
+
+
static const struct udevice_id x86_sysreset_ids[] = {
{ .compatible = "x86,reset" },
{ }