10 Feb, 2018
2 commits
-
Add stubs for UpdateCapsule, QueryCapsuleCapabilities, and
QueryVariableInfo.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
Currently we set the function pointer for the CreateEventEx boot service
to NULL. When called this would lead to an immediate failure.A function stub is provided which handles the case that the boot service
is called without an event group and returns EFI_UNSUPPORTED otherwise.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf
23 Jan, 2018
6 commits
-
This patch lets the implementation of ExitBootServices conform to
the UEFI standard.The timer events must be disabled before calling the notification
functions of the exit boot services events.The boot services must be disabled in the system table.
The handles in the system table should be defined as efi_handle_t.
Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
Add the revision constants.
Depending on the revision additional fields are needed in the
media descriptor.
Use efi_uintn_t for number of bytes to read or write.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
We should consistently use the efi_handle_t typedef when
referring to handles.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
Handles should be passed as efi_handle_t and not as void *.
Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
Implement the ConnectController boot service.
A unit test is supplied in a subsequent patch.
Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
Correctly create the device path for IDE and SCSI disks.
Support for SATA remains to be done in a future patch.
Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf
01 Dec, 2017
4 commits
-
Use efi_uintn_t instead of unsigned long.
EFI_GRAPHICS_OUTPUT_BLT_OPERATION is an enum. If we don't
define an enum we have to pass it as u32.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
Consistenly use efi_uintn_t wherever the UEFI spec uses
UINTN in boot services interfaces.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
UINTN is used in the UEFI specification for unsigned integers
matching the bitness of the CPU.Types in U-Boot should be lower case. The patch replaces it
by efi_uintn_t.Suggested-by: Simon Glass
Suggested-by: Rob Clark
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
INTN is not used in the coding.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf
12 Oct, 2017
2 commits
-
Shell.efi uses this, and supporting color attributes makes things look
nicer. Map the EFI fg/bg color attributes to ANSI escape sequences.
Not all colors have a perfect match, but spec just says "Devices
supporting a different number of text colors are required to emulate the
above colors to the best of the device’s capabilities".Signed-off-by: Rob Clark
Tested-by: Heinrich Schuchardt
Reviewed-by: Alexander Graf
[agraf: s/unsigned/unsigned int/]
Signed-off-by: Alexander Graf -
When we don't have a real device/image path, such as 'bootefi hello',
construct a mem-mapped device-path.This fixes 'bootefi hello' after devicepath refactoring.
Fixes: 95c5553ea2 ("efi_loader: refactor boot device and loaded_image handling")
Signed-off-by: Rob Clark
Acked-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf
09 Oct, 2017
8 commits
-
The size fields in the Simple Network Protocol are all
UINTN in the UEFI spec. So use size_t.Provide a function description of the receive function.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
The returned interrupt status was wrong.
As out transmit buffer is empty we need to always set
EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT.When we have received a packet we need to set
EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT.Furthermore we should call efi_timer_check() to handle events.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
Provide the simple network protocol revision.
This revision number could be used to identify backwards compatible
enhancements of the protocol.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
Remove extraneous commas.
Add comment.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
WaitForPacket is an event and not a function pointer.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
The UEFI spec defines parameter index of WaitForEvent as UINTN*.
So we should use size_t here.I deliberately do not use UINTN because I hold a following patch
that will eliminate UINTN because uppercase types to not match
the U-Boot coding style.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
We need to call some boottime services internally.
Our GUIDs are stored as const efi_guid_t *.The boottime services never change GUIDs.
So we can define the parameters as const efi_guid_t *.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf -
The UEFI spec defines the length parameters of CopyMem and SetMem
as UINTN. We should size_t here.The source buffer of CopyMem should be marked as const.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
Signed-off-by: Alexander Graf
20 Sep, 2017
9 commits
-
1) use fputs() to reduce cache flushes from once-per-char to
once-per-string
2) handle \r, \t, and \b in addition to just \n for tracking
cursor position
3) cursor row/col are zero based, not one basedSigned-off-by: Rob Clark
[agraf: s/unsigned/unsigned int/]
Signed-off-by: Alexander Graf -
Signed-off-by: Rob Clark
Signed-off-by: Alexander Graf -
Similar to a "real" UEFI implementation, the bootmgr looks at the
BootOrder and BootXXXX variables to try to find an EFI payload to load
and boot. This is added as a sub-command of bootefi.The idea is that the distro bootcmd would first try loading a payload
via the bootmgr, and then if that fails (ie. first boot or corrupted
EFI variables) it would fallback to loading bootaa64.efi. (Which
would then load fallback.efi which would look for \EFI\*\boot.csv and
populate BootOrder and BootXXXX based on what it found.)Signed-off-by: Rob Clark
Signed-off-by: Alexander Graf -
fallback.efi (and probably other things) use UEFI's simple-file-system
protocol and file support to search for OS's to boot.Signed-off-by: Rob Clark
[agraf: whitespace fixes, unsigned fixes]
Signed-off-by: Alexander Graf -
It needs to handle more device-path node types, and also multiple levels
of path hierarchy. To simplify this, initially construct utf8 string to
a temporary buffer, and then allocate the real utf16 buffer that is
returned. This should be mostly for debugging or at least not critical-
path so an extra copy won't hurt, and is saner than the alternative.Signed-off-by: Rob Clark
Signed-off-by: Alexander Graf -
This is really the same thing as the efi_device_path struct.
Signed-off-by: Rob Clark
Signed-off-by: Alexander Graf -
Helpers to construct device-paths from devices, partitions, files, and
for parsing and manipulating device-paths.For non-legacy devices, this will use u-boot's device-model to construct
device-paths which include bus hierarchy to construct device-paths. For
legacy devices we still fake it, but slightly more convincingly.Signed-off-by: Rob Clark
Signed-off-by: Alexander Graf -
Signed-off-by: Peter Jones
Signed-off-by: Rob Clark
Signed-off-by: Alexander Graf -
All of the device-path related structures should be packed. UEFI
defines the device-path as a byte-aligned data structure.Signed-off-by: Rob Clark
Signed-off-by: Alexander Graf
25 Jul, 2017
1 commit
-
shim.efi (or rather gnu-efi's LibLocateProtocol() which shim.efi uses)
resolves protocols via efi_locate_handle() so the console protocols
need to be added to the efi object list.Signed-off-by: Rob Clark
[agraf: whitespace fixes]
Signed-off-by: Alexander Graf
24 Jul, 2017
1 commit
-
The first argument 'type' of CreateEvent is an 32bit unsigned
integer bitmap and not an enum.The second argument 'type' of SetTimer take values of an
enum which is called EFI_TIMER_DELAY in the UEFI standard.
To avoid confusion rename efi_event_type to efi_timer_delay.Reported-by: Alexander Graf
Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf
19 Jul, 2017
5 commits
-
The UEFI standard defines the type for the tpl level as EFI_TPL
alias UINTN.UINTN is an integer is defined as an unsigned integer of native
width. So we can use size_t for the definition.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
Up to now the boot time supported only a single event.
This patch now allows four events.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
In our implementation the internal structure of events is known.
So use the known type instead of void.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf -
ConvertPathToText is implemented for
* type 4 - media device path
* subtype 4 - file pathThis is the kind of device path we hand out for block devices.
All other cases may be implemented later.
Signed-off-by: Heinrich Schuchardt
[agraf: fix whitespace]
Signed-off-by: Alexander Graf -
efi_install_protocol_interface up to now only returned an error code.
The patch implements the UEFI specification for InstallProtocolInterface
with the exception that it will not create new handles.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf
03 Jul, 2017
1 commit
-
The UEFI specification states that the tpl, function and context
arguments are to be ignored if neither EVT_NOTIFY_WAIT or
EVT_NOTIFY_SIGNAL are specified. This matches observed behaviour with
an AMI EDK2 based UEFI implementation.Skip calling the notify function if neither flag is present.
Signed-off-by: Jonathan Gray
Acked-By: Heinrich Schuchardt
Signed-off-by: Alexander Graf
15 Nov, 2016
1 commit
-
When adding network interface node use Messaging device path with
subtype MAC Address and device's MAC address as a value instead
of Media Device path type with subtype File Path and path "Net"Signed-off-by: Oleksandr Tymoshenko
Signed-off-by: Alexander Graf