From 38c39dd8da26df3cd84cc043d22e8e2d73d6fbd8 Mon Sep 17 00:00:00 2001 From: Diane Bruce Date: Tue, 18 Oct 2016 14:23:50 +0000 Subject: Initial u-boot port for the Raspberry Pi 3 --- .../files/patch-lib_efi__loader_efi__console.c | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__console.c (limited to 'sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__console.c') diff --git a/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__console.c b/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__console.c new file mode 100644 index 000000000000..e412d0f92420 --- /dev/null +++ b/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__console.c @@ -0,0 +1,40 @@ +--- lib/efi_loader/efi_console.c.orig 2016-09-12 14:05:51 UTC ++++ lib/efi_loader/efi_console.c +@@ -9,9 +9,9 @@ + #include + #include + +-/* If we can't determine the console size, default to 80x24 */ ++/* If we can't determine the console size, default to 80x25 */ + static int console_columns = 80; +-static int console_rows = 24; ++static int console_rows = 25; + static bool console_size_queried; + + const efi_guid_t efi_guid_console_control = CONSOLE_CONTROL_GUID; +@@ -165,6 +165,8 @@ static efi_status_t EFIAPI efi_cout_quer + unsigned long mode_number, unsigned long *columns, + unsigned long *rows) + { ++ unsigned long current_mode; ++ + EFI_ENTRY("%p, %ld, %p, %p", this, mode_number, columns, rows); + + if (!console_size_queried) { +@@ -196,6 +198,16 @@ static efi_status_t EFIAPI efi_cout_quer + } + + out: ++ if (console_columns == 80 && console_rows == 25) ++ current_mode = 0; ++ else if (console_columns == 80 && console_rows == 50) ++ current_mode = 1; ++ else ++ current_mode = 2; ++ ++ if (mode_number != current_mode) ++ return EFI_EXIT(EFI_UNSUPPORTED); ++ + if (columns) + *columns = console_columns; + if (rows) -- cgit v1.2.3