History log of /u-boot/lib/efi_selftest/efi_selftest_console.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 3dd719d4 20-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: correct function comment style

Replace @return and @param.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 7884a098 16-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: implement printing GUIDs

The ESRT test may try to print a GUID if an error occurs.
Implement the %pU print code.

Correct the ESRT test to use %pU instead of %pUl to avoid the output
of character 'l'.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 65ab48d6 16-Jan-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide initrddump test tool

Provide an UEFI application to save the initial RAM disk provided by U-Boot
via the Load File2 protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

# 94876838 03-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: enable printing hexadecimal numbers

Add code to use %x in efi_st_print().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3e603ec7 08-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: struct efi_simple_text_input_protocol

%s/efi_simple_input_interface/efi_simple_text_input_protocol/

We should be consistent in the naming of the EFI protocol interface
structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

%s/ExtendedVerification/extended_verification/

Use consistent naming of function parameters. Do not use CamelCase.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 42e2b563 07-Jul-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: support printing leading zeroes

Allow specifying the precision when printing integers, e.g.

efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day);

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 853540c8 11-Jan-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: colored test output

Add color coding to output:
test section blue
success green
errors red
todo yellow
summary white
others light gray

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agraf: Fold in move of set_attribute before the print]
Signed-off-by: Alexander Graf <agraf@suse.de>

# e0abeacc 22-Dec-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: do not cut off u16 strings when printing

Device paths can be very long. Due to a limited output buffer
the output for device paths is cut off. We can avoid this by
directly calling the boottime service with the the device path
string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: Remove coloring code change]
Signed-off-by: Alexander Graf <agraf@suse.de>

# d78e40d6 18-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow to select a single test for execution

Environment variable efi_selftest is passed as load options
to the selftest application. It is used to select a single
test to be executed.

The load options are an UTF8 string. Yet I decided to keep
the name propertiy of the tests as char[] to reduce code
size.

Special value 'list' displays a list of all available tests.

Tests get an on_request property. If this property is set
the tests are only executed if explicitly requested.

The invocation of efi_selftest is changed to reflect that
bootefi selftest with efi_selftest = 'list' will call the
Exit bootservice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 1b633259 05-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow printing MAC addresses

Add %pm as format string to print a MAC address.
This is helpful when analyzing network problems.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 623b3a57 15-Sep-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide an EFI selftest application

A testing framework for the EFI API is provided.
It can be executed with the 'bootefi selftest' command.

It is coded in a way that at a later stage we may turn it
into a standalone EFI application. The current build system
does not allow this yet.

All tests use a driver model and are run in three phases:
setup, execute, teardown.

A test may be setup and executed at boottime,
it may be setup at boottime and executed at runtime,
or it may be setup and executed at runtime.

After executing all tests the system is reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 7884a098 16-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: implement printing GUIDs

The ESRT test may try to print a GUID if an error occurs.
Implement the %pU print code.

Correct the ESRT test to use %pU instead of %pUl to avoid the output
of character 'l'.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 65ab48d6 16-Jan-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide initrddump test tool

Provide an UEFI application to save the initial RAM disk provided by U-Boot
via the Load File2 protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

# 94876838 03-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: enable printing hexadecimal numbers

Add code to use %x in efi_st_print().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3e603ec7 08-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: struct efi_simple_text_input_protocol

%s/efi_simple_input_interface/efi_simple_text_input_protocol/

We should be consistent in the naming of the EFI protocol interface
structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

%s/ExtendedVerification/extended_verification/

Use consistent naming of function parameters. Do not use CamelCase.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 42e2b563 07-Jul-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: support printing leading zeroes

Allow specifying the precision when printing integers, e.g.

efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day);

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 853540c8 11-Jan-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: colored test output

Add color coding to output:
test section blue
success green
errors red
todo yellow
summary white
others light gray

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agraf: Fold in move of set_attribute before the print]
Signed-off-by: Alexander Graf <agraf@suse.de>

# e0abeacc 22-Dec-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: do not cut off u16 strings when printing

Device paths can be very long. Due to a limited output buffer
the output for device paths is cut off. We can avoid this by
directly calling the boottime service with the the device path
string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: Remove coloring code change]
Signed-off-by: Alexander Graf <agraf@suse.de>

# d78e40d6 18-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow to select a single test for execution

Environment variable efi_selftest is passed as load options
to the selftest application. It is used to select a single
test to be executed.

The load options are an UTF8 string. Yet I decided to keep
the name propertiy of the tests as char[] to reduce code
size.

Special value 'list' displays a list of all available tests.

Tests get an on_request property. If this property is set
the tests are only executed if explicitly requested.

The invocation of efi_selftest is changed to reflect that
bootefi selftest with efi_selftest = 'list' will call the
Exit bootservice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 1b633259 05-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow printing MAC addresses

Add %pm as format string to print a MAC address.
This is helpful when analyzing network problems.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 623b3a57 15-Sep-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide an EFI selftest application

A testing framework for the EFI API is provided.
It can be executed with the 'bootefi selftest' command.

It is coded in a way that at a later stage we may turn it
into a standalone EFI application. The current build system
does not allow this yet.

All tests use a driver model and are run in three phases:
setup, execute, teardown.

A test may be setup and executed at boottime,
it may be setup at boottime and executed at runtime,
or it may be setup and executed at runtime.

After executing all tests the system is reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 65ab48d6 16-Jan-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide initrddump test tool

Provide an UEFI application to save the initial RAM disk provided by U-Boot
via the Load File2 protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

# 94876838 03-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: enable printing hexadecimal numbers

Add code to use %x in efi_st_print().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3e603ec7 08-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: struct efi_simple_text_input_protocol

%s/efi_simple_input_interface/efi_simple_text_input_protocol/

We should be consistent in the naming of the EFI protocol interface
structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

%s/ExtendedVerification/extended_verification/

Use consistent naming of function parameters. Do not use CamelCase.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 42e2b563 07-Jul-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: support printing leading zeroes

Allow specifying the precision when printing integers, e.g.

efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day);

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 853540c8 11-Jan-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: colored test output

Add color coding to output:
test section blue
success green
errors red
todo yellow
summary white
others light gray

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agraf: Fold in move of set_attribute before the print]
Signed-off-by: Alexander Graf <agraf@suse.de>

# e0abeacc 22-Dec-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: do not cut off u16 strings when printing

Device paths can be very long. Due to a limited output buffer
the output for device paths is cut off. We can avoid this by
directly calling the boottime service with the the device path
string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: Remove coloring code change]
Signed-off-by: Alexander Graf <agraf@suse.de>

# d78e40d6 18-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow to select a single test for execution

Environment variable efi_selftest is passed as load options
to the selftest application. It is used to select a single
test to be executed.

The load options are an UTF8 string. Yet I decided to keep
the name propertiy of the tests as char[] to reduce code
size.

Special value 'list' displays a list of all available tests.

Tests get an on_request property. If this property is set
the tests are only executed if explicitly requested.

The invocation of efi_selftest is changed to reflect that
bootefi selftest with efi_selftest = 'list' will call the
Exit bootservice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 1b633259 05-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow printing MAC addresses

Add %pm as format string to print a MAC address.
This is helpful when analyzing network problems.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 623b3a57 15-Sep-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide an EFI selftest application

A testing framework for the EFI API is provided.
It can be executed with the 'bootefi selftest' command.

It is coded in a way that at a later stage we may turn it
into a standalone EFI application. The current build system
does not allow this yet.

All tests use a driver model and are run in three phases:
setup, execute, teardown.

A test may be setup and executed at boottime,
it may be setup at boottime and executed at runtime,
or it may be setup and executed at runtime.

After executing all tests the system is reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 94876838 03-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: enable printing hexadecimal numbers

Add code to use %x in efi_st_print().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3e603ec7 08-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: struct efi_simple_text_input_protocol

%s/efi_simple_input_interface/efi_simple_text_input_protocol/

We should be consistent in the naming of the EFI protocol interface
structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

%s/ExtendedVerification/extended_verification/

Use consistent naming of function parameters. Do not use CamelCase.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 42e2b563 07-Jul-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: support printing leading zeroes

Allow specifying the precision when printing integers, e.g.

efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day);

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 853540c8 11-Jan-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: colored test output

Add color coding to output:
test section blue
success green
errors red
todo yellow
summary white
others light gray

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agraf: Fold in move of set_attribute before the print]
Signed-off-by: Alexander Graf <agraf@suse.de>

# e0abeacc 22-Dec-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: do not cut off u16 strings when printing

Device paths can be very long. Due to a limited output buffer
the output for device paths is cut off. We can avoid this by
directly calling the boottime service with the the device path
string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: Remove coloring code change]
Signed-off-by: Alexander Graf <agraf@suse.de>

# d78e40d6 18-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow to select a single test for execution

Environment variable efi_selftest is passed as load options
to the selftest application. It is used to select a single
test to be executed.

The load options are an UTF8 string. Yet I decided to keep
the name propertiy of the tests as char[] to reduce code
size.

Special value 'list' displays a list of all available tests.

Tests get an on_request property. If this property is set
the tests are only executed if explicitly requested.

The invocation of efi_selftest is changed to reflect that
bootefi selftest with efi_selftest = 'list' will call the
Exit bootservice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 1b633259 05-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow printing MAC addresses

Add %pm as format string to print a MAC address.
This is helpful when analyzing network problems.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 623b3a57 15-Sep-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide an EFI selftest application

A testing framework for the EFI API is provided.
It can be executed with the 'bootefi selftest' command.

It is coded in a way that at a later stage we may turn it
into a standalone EFI application. The current build system
does not allow this yet.

All tests use a driver model and are run in three phases:
setup, execute, teardown.

A test may be setup and executed at boottime,
it may be setup at boottime and executed at runtime,
or it may be setup and executed at runtime.

After executing all tests the system is reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3e603ec7 08-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: struct efi_simple_text_input_protocol

%s/efi_simple_input_interface/efi_simple_text_input_protocol/

We should be consistent in the naming of the EFI protocol interface
structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

%s/ExtendedVerification/extended_verification/

Use consistent naming of function parameters. Do not use CamelCase.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 42e2b563 07-Jul-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: support printing leading zeroes

Allow specifying the precision when printing integers, e.g.

efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day);

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 853540c8 11-Jan-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: colored test output

Add color coding to output:
test section blue
success green
errors red
todo yellow
summary white
others light gray

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agraf: Fold in move of set_attribute before the print]
Signed-off-by: Alexander Graf <agraf@suse.de>

# e0abeacc 22-Dec-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: do not cut off u16 strings when printing

Device paths can be very long. Due to a limited output buffer
the output for device paths is cut off. We can avoid this by
directly calling the boottime service with the the device path
string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: Remove coloring code change]
Signed-off-by: Alexander Graf <agraf@suse.de>

# d78e40d6 18-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow to select a single test for execution

Environment variable efi_selftest is passed as load options
to the selftest application. It is used to select a single
test to be executed.

The load options are an UTF8 string. Yet I decided to keep
the name propertiy of the tests as char[] to reduce code
size.

Special value 'list' displays a list of all available tests.

Tests get an on_request property. If this property is set
the tests are only executed if explicitly requested.

The invocation of efi_selftest is changed to reflect that
bootefi selftest with efi_selftest = 'list' will call the
Exit bootservice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 1b633259 05-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow printing MAC addresses

Add %pm as format string to print a MAC address.
This is helpful when analyzing network problems.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 623b3a57 15-Sep-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide an EFI selftest application

A testing framework for the EFI API is provided.
It can be executed with the 'bootefi selftest' command.

It is coded in a way that at a later stage we may turn it
into a standalone EFI application. The current build system
does not allow this yet.

All tests use a driver model and are run in three phases:
setup, execute, teardown.

A test may be setup and executed at boottime,
it may be setup at boottime and executed at runtime,
or it may be setup and executed at runtime.

After executing all tests the system is reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 3e603ec7 08-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: struct efi_simple_text_input_protocol

%s/efi_simple_input_interface/efi_simple_text_input_protocol/

We should be consistent in the naming of the EFI protocol interface
structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

%s/ExtendedVerification/extended_verification/

Use consistent naming of function parameters. Do not use CamelCase.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 42e2b563 07-Jul-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: support printing leading zeroes

Allow specifying the precision when printing integers, e.g.

efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day);

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 853540c8 11-Jan-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: colored test output

Add color coding to output:
test section blue
success green
errors red
todo yellow
summary white
others light gray

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agraf: Fold in move of set_attribute before the print]
Signed-off-by: Alexander Graf <agraf@suse.de>


# e0abeacc 22-Dec-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: do not cut off u16 strings when printing

Device paths can be very long. Due to a limited output buffer
the output for device paths is cut off. We can avoid this by
directly calling the boottime service with the the device path
string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: Remove coloring code change]
Signed-off-by: Alexander Graf <agraf@suse.de>


# d78e40d6 18-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow to select a single test for execution

Environment variable efi_selftest is passed as load options
to the selftest application. It is used to select a single
test to be executed.

The load options are an UTF8 string. Yet I decided to keep
the name propertiy of the tests as char[] to reduce code
size.

Special value 'list' displays a list of all available tests.

Tests get an on_request property. If this property is set
the tests are only executed if explicitly requested.

The invocation of efi_selftest is changed to reflect that
bootefi selftest with efi_selftest = 'list' will call the
Exit bootservice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1b633259 05-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: allow printing MAC addresses

Add %pm as format string to print a MAC address.
This is helpful when analyzing network problems.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 623b3a57 15-Sep-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_selftest: provide an EFI selftest application

A testing framework for the EFI API is provided.
It can be executed with the 'bootefi selftest' command.

It is coded in a way that at a later stage we may turn it
into a standalone EFI application. The current build system
does not allow this yet.

All tests use a driver model and are run in three phases:
setup, execute, teardown.

A test may be setup and executed at boottime,
it may be setup at boottime and executed at runtime,
or it may be setup and executed at runtime.

After executing all tests the system is reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>