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.
This commit is contained in:
Tom Rini
2019-03-12 10:56:02 -04:00
2 changed files with 57 additions and 28 deletions

View File

@@ -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" },
{ }