mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 16:10:24 +09:00
Pull request for UEFI sub-system for efi-2020-07-rc4 (2)
The following problems are resolved: * When booting via UEFI an SMBIOS table is presented to the operating system. If U-Boot tries to add an empty string, this results in corrupted SMBIOS information. We will now use "Unknown" as property value. * The EFI_RNG_PROTOCOL uses the DM_RNG drivers. For the virtio RNG driver the missing DM_RNG Kconfig dependency is added. * Missing function descriptions for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL are added. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl7bMw8ACgkQxIHbvCwF GsTidBAAiJr0xpDK7fPh7/Q1vwqvuYJoFTvIYMna2rngjBsJbSFYf1noJtedwGbI KKYkwttU3DhOsyOw1FvbNixuLFFS/wDEYHZO5RgXJJoajd70aFAKWRvMtzC1DsW4 qTeSrFuph/LGWPZKrRUqqSQx6+ZPGN7dyMGZZK1uSm/C1aXPY9ahHUnJGD+e0qpF aGJKwFYMLslbp3HjP/81rhTYd8REnZjp1iyXcRRv67If1vWP8rLw3xXhsJHRRt9M 5C8u98Zq0qFjRZGcmIPTblA+tuQ+oAYUyz5eg0txyOxmcTiFXEbCknJa1N5vW1/V HPujgp/0v0WBqa2+ZGwK67Kkx4FQpDtt/Er3beboeeVYkeMFoKbGvz4YadJ6ltG9 caNWtFsjqMnQCD8kD1QMWjHD0Ut6ev5qBUnPEyzWWIviizO5j/O7W2kzrPUuOoIU mJzBVftMl4g9fytXvjan8VKCa4gkB7HcTliVsKGTen5kqM6ZUJ8XQZkGbuJbsAz6 iFoXEbrmA+IQo8pLb29uJ8h1TwAsJBT14MLHj4xT/6TgNVdcviHLiDcBFnVNXZag uv57YmpRRmLnCPPEk6j8xDaWOd7z5W44s3HTkUPZDNXk78Iy1rD1TVIamXtyhhcq iKb2xklhXdi9EQS6Oq4DePVtknWNwisGAbA8BWxdsrsHDBcozWA= =tmqF -----END PGP SIGNATURE----- Merge tag 'efi-2020-07-rc4-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-07-rc4 (2) The following problems are resolved: * When booting via UEFI an SMBIOS table is presented to the operating system. If U-Boot tries to add an empty string, this results in corrupted SMBIOS information. We will now use "Unknown" as property value. * The EFI_RNG_PROTOCOL uses the DM_RNG drivers. For the virtio RNG driver the missing DM_RNG Kconfig dependency is added. * Missing function descriptions for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL are added.
This commit is contained in:
commit
62005e2083
@ -60,9 +60,11 @@ config VIRTIO_BLK
|
||||
QEMU based targets.
|
||||
|
||||
config VIRTIO_RNG
|
||||
bool "virtio rng driver"
|
||||
depends on VIRTIO
|
||||
help
|
||||
This is the virtual random number generator driver. It can be used
|
||||
with Qemu based targets.
|
||||
bool "virtio rng driver"
|
||||
depends on DM_RNG
|
||||
depends on VIRTIO
|
||||
default y
|
||||
help
|
||||
This is the virtual random number generator driver. It can be used
|
||||
with QEMU based targets.
|
||||
endmenu
|
||||
|
@ -80,13 +80,13 @@ static int term_get_char(s32 *c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Receive and parse a reply from the terminal.
|
||||
*
|
||||
* @n: array of return values
|
||||
* @num: number of return values expected
|
||||
* @end_char: character indicating end of terminal message
|
||||
* @return: non-zero indicates error
|
||||
* Return: non-zero indicates error
|
||||
*/
|
||||
static int term_read_reply(int *n, int num, char end_char)
|
||||
{
|
||||
@ -127,6 +127,17 @@ static int term_read_reply(int *n, int num, char end_char)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_cout_output_string() - write Unicode string to console
|
||||
*
|
||||
* This function implements the OutputString service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* @this: simple text output protocol
|
||||
* @string: u16 string
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_output_string(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
const efi_string_t string)
|
||||
@ -202,6 +213,20 @@ out:
|
||||
return EFI_EXIT(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_cout_test_string() - test writing Unicode string to console
|
||||
*
|
||||
* This function implements the TestString service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* As in OutputString we simply convert UTF-16 to UTF-8 there are no unsupported
|
||||
* code points and we can always return EFI_SUCCESS.
|
||||
*
|
||||
* @this: simple text output protocol
|
||||
* @string: u16 string
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_test_string(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
const efi_string_t string)
|
||||
@ -210,6 +235,15 @@ static efi_status_t EFIAPI efi_cout_test_string(
|
||||
return EFI_EXIT(EFI_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* cout_mode_matches() - check if mode has given terminal size
|
||||
*
|
||||
* @mode: text mode
|
||||
* @rows: number of rows
|
||||
* @cols: number of columns
|
||||
* Return: true if number of rows and columns matches the mode and
|
||||
* the mode is present
|
||||
*/
|
||||
static bool cout_mode_matches(struct cout_mode *mode, int rows, int cols)
|
||||
{
|
||||
if (!mode->present)
|
||||
@ -221,6 +255,9 @@ static bool cout_mode_matches(struct cout_mode *mode, int rows, int cols)
|
||||
/**
|
||||
* query_console_serial() - query console size
|
||||
*
|
||||
* When using a serial console or the net console we can only devise the
|
||||
* terminal size by querying the terminal using ECMA-48 control sequences.
|
||||
*
|
||||
* @rows: pointer to return number of rows
|
||||
* @cols: pointer to return number of columns
|
||||
* Returns: 0 on success
|
||||
@ -261,8 +298,8 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the mode table.
|
||||
/**
|
||||
* query_console_size() - update the mode table.
|
||||
*
|
||||
* By default the only mode available is 80x25. If the console has at least 50
|
||||
* lines, enable mode 80x50. If we can query the console size and it is neither
|
||||
@ -306,6 +343,20 @@ static void query_console_size(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* efi_cout_query_mode() - get terminal size for a text mode
|
||||
*
|
||||
* This function implements the QueryMode service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* @this: simple text output protocol
|
||||
* @mode_number: mode number to retrieve information on
|
||||
* @columns: number of columns
|
||||
* @rows: number of rows
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_query_mode(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
unsigned long mode_number, unsigned long *columns,
|
||||
@ -341,7 +392,17 @@ static const struct {
|
||||
{ 37, 47 }, /* 7: light gray, map to white */
|
||||
};
|
||||
|
||||
/* See EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute(). */
|
||||
/**
|
||||
* efi_cout_set_attribute() - set fore- and background color
|
||||
*
|
||||
* This function implements the SetAttribute service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* @this: simple text output protocol
|
||||
* @attribute: foreground color - bits 0-3, background color - bits 4-6
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_set_attribute(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
unsigned long attribute)
|
||||
@ -364,9 +425,9 @@ static efi_status_t EFIAPI efi_cout_set_attribute(
|
||||
/**
|
||||
* efi_cout_clear_screen() - clear screen
|
||||
*
|
||||
* This function implements the ClearScreen service of the
|
||||
* EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. See the Unified Extensible Firmware
|
||||
* Interface (UEFI) specification for details.
|
||||
* This function implements the ClearScreen service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* @this: pointer to the protocol instance
|
||||
* Return: status code
|
||||
@ -387,6 +448,17 @@ static efi_status_t EFIAPI efi_cout_clear_screen(
|
||||
return EFI_EXIT(EFI_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_cout_clear_set_mode() - set text model
|
||||
*
|
||||
* This function implements the SetMode service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* @this: pointer to the protocol instance
|
||||
* @mode_number: number of the text mode to set
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_set_mode(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
unsigned long mode_number)
|
||||
@ -405,6 +477,17 @@ static efi_status_t EFIAPI efi_cout_set_mode(
|
||||
return EFI_EXIT(EFI_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_cout_reset() - reset the terminal
|
||||
*
|
||||
* This function implements the Reset service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* @this: pointer to the protocol instance
|
||||
* @extended_verification: if set an extended verification may be executed
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_reset(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
char extended_verification)
|
||||
@ -420,6 +503,18 @@ static efi_status_t EFIAPI efi_cout_reset(
|
||||
return EFI_EXIT(EFI_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_cout_set_cursor_position() - reset the terminal
|
||||
*
|
||||
* This function implements the SetCursorPosition service of the simple text
|
||||
* output protocol. See the Unified Extensible Firmware Interface (UEFI)
|
||||
* specification for details.
|
||||
*
|
||||
* @this: pointer to the protocol instance
|
||||
* @column: column to move to
|
||||
* @row: row to move to
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_set_cursor_position(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
unsigned long column, unsigned long row)
|
||||
@ -451,6 +546,17 @@ out:
|
||||
return EFI_EXIT(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_cout_enable_cursor() - enable the cursor
|
||||
*
|
||||
* This function implements the EnableCursor service of the simple text output
|
||||
* protocol. See the Unified Extensible Firmware Interface (UEFI) specification
|
||||
* for details.
|
||||
*
|
||||
* @this: pointer to the protocol instance
|
||||
* @enable: if true enable, if false disable the cursor
|
||||
* Return: status code
|
||||
*/
|
||||
static efi_status_t EFIAPI efi_cout_enable_cursor(
|
||||
struct efi_simple_text_output_protocol *this,
|
||||
bool enable)
|
||||
@ -522,7 +628,7 @@ void set_shift_mask(int mod, struct efi_key_state *key_state)
|
||||
* This gets called when we have already parsed CSI.
|
||||
*
|
||||
* @key_state: receives the state of the shift, alt, control, and logo keys
|
||||
* @return: the unmodified code
|
||||
* Return: the unmodified code
|
||||
*/
|
||||
static int analyze_modifiers(struct efi_key_state *key_state)
|
||||
{
|
||||
|
@ -31,6 +31,8 @@ static int smbios_add_string(char *start, const char *str)
|
||||
{
|
||||
int i = 1;
|
||||
char *p = start;
|
||||
if (!*str)
|
||||
str = "Unknown";
|
||||
|
||||
for (;;) {
|
||||
if (!*p) {
|
||||
|
Loading…
Reference in New Issue
Block a user