8d136fb0 | 01-May-2025 |
Warner Losh <imp@FreeBSD.org> |
efivar: Use struct guid_table instead of uuid_table
uuid_table was the linux name. When libefivar was started, I tried to make it compatible with Linux. However, that's no longer relevant: (a) littl
efivar: Use struct guid_table instead of uuid_table
uuid_table was the linux name. When libefivar was started, I tried to make it compatible with Linux. However, that's no longer relevant: (a) little to no Linux code was subsequently ported and (b) Linux compat has eroded. This erodes it a bit more to cope with the uuid_t -> efi_guid_t changes. This also moves a couple of functions around to reduce copying and updates consumers for the visible parts of this change.
Sponsored by: Netflix Reviewed by: tsoome, kib Differential Revision: https://reviews.freebsd.org/D50060
show more ...
|
20c5e4b3 | 01-May-2025 |
Warner Losh <imp@FreeBSD.org> |
efivar: Allow uuid_t and efi_guid_t to be different types.
While they are binarily the same, the API are different. To use EDK2 more effectively, we need to transition to using EDK@'s API rather tha
efivar: Allow uuid_t and efi_guid_t to be different types.
While they are binarily the same, the API are different. To use EDK2 more effectively, we need to transition to using EDK@'s API rather than the uuid_t API. This change makes the code neutral on the subject.
Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D50035
show more ...
|
5f2dd25a | 01-May-2025 |
Warner Losh <imp@FreeBSD.org> |
efivar: Test uuid against zero
Test the passed in GuID against a guid of all 0's. This removes another place that has to worry about the difference between uuit_t and EFI_GUID.
Sponsored by: Netfl
efivar: Test uuid against zero
Test the passed in GuID against a guid of all 0's. This removes another place that has to worry about the difference between uuit_t and EFI_GUID.
Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50034
show more ...
|
3eb80ef8 | 01-May-2025 |
Warner Losh <imp@FreeBSD.org> |
efivar: Use memcmp instead of uuid_ functions to compare
In these cases, memcmp is a perfectly fine substitute for the uuid functions. We don't need checking to make sure the uuids are good, we know
efivar: Use memcmp instead of uuid_ functions to compare
In these cases, memcmp is a perfectly fine substitute for the uuid functions. We don't need checking to make sure the uuids are good, we know the pointers are non-ULL, etc. memcmp will reduce the number of places we need to know these are actually UUIDs, or similar.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D50033
show more ...
|
39d58c81 | 20-Feb-2025 |
Jose Luis Duran <jlduran@FreeBSD.org> |
libefivar: Add Display Only format for Hard Drive
Ref: UEFI Specification Version 2.1 (Errata D) (released October 2008)
Reviewed by: imp, emaste Approved by: emaste (mentor) Obtained from: https:/
libefivar: Add Display Only format for Hard Drive
Ref: UEFI Specification Version 2.1 (Errata D) (released October 2008)
Reviewed by: imp, emaste Approved by: emaste (mentor) Obtained from: https://github.com/tianocore/edk2/commit/9e6537469d4700d9d793ee21e9c2f2e7ddbb2176 Differential Revision: https://reviews.freebsd.org/D49060
show more ...
|
05653fc7 | 20-Feb-2025 |
Jose Luis Duran <jlduran@FreeBSD.org> |
libefivar: CodeQL Fixes
These libefivar files correspond to the following EDK2 Tianocore routines:
efivar-dp-format.c -> MdePkg/Library/UefiDevicePathLib/DevicePathToText.c efivar-dp-parse.c -> Md
libefivar: CodeQL Fixes
These libefivar files correspond to the following EDK2 Tianocore routines:
efivar-dp-format.c -> MdePkg/Library/UefiDevicePathLib/DevicePathToText.c efivar-dp-parse.c -> MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
The following changes were apparently applied upstream to appease their CodeQL workflows on GitHub. Note that some of these changes are logically contradictory, however avoiding differences between the two code bases is a priority, as noted in the review.
Commit message from upstream:
Includes changes across the repo for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest
Reviewed by: imp Approved by: emaste (mentor) Obtained from: https://github.com/tianocore/edk2/commit/b7735a087afce6a5157b61e5450b6848ed535a14 Differential Revision: https://reviews.freebsd.org/D49059
show more ...
|
2b460910 | 16-Feb-2023 |
Warner Losh <imp@FreeBSD.org> |
efivar: Really look for labels for the provider with right efimedia
The prior code mistakently thought that the g_consumer that hung off the provider we found were the right thing to use to find all
efivar: Really look for labels for the provider with right efimedia
The prior code mistakently thought that the g_consumer that hung off the provider we found were the right thing to use to find all the glabel aliases for this node. However, the only way to find that is to iterate through all the geoms that belong to the glabel geom class, looking for those geoms with the same name as the provider with the right efimedia. Do this in a way that caches glabel class, and allows for it to be absent. Tighten the filter for mounted filesystems to only look for the ones that are mounted on /dev/.. since the rest of the code assumes that.
MFC After: 3 days Sponsored by: Netflix Reviewed by: corvink, asomers Differential Revision: https://reviews.freebsd.org/D38619
show more ...
|
57d5ca4e | 16-Feb-2023 |
Warner Losh <imp@FreeBSD.org> |
efivar: support device paths as well as mounted paths in path_to_dp
In path_to_dp, allow passing in either the actual device path "eg /dev/foo/bar" or the path where the device is mounted (say /mnt/
efivar: support device paths as well as mounted paths in path_to_dp
In path_to_dp, allow passing in either the actual device path "eg /dev/foo/bar" or the path where the device is mounted (say /mnt/baz/bing). In the former case we'll assume the path within the device is nothing (the relpath). In the latter, we'll take from the mount point on down as the relpath.
Sponsored by: Netflix Reviewed by: corvink, manu, asomers Differential Revision: https://reviews.freebsd.org/D38616
show more ...
|
49fd6aff | 16-Feb-2023 |
Warner Losh <imp@FreeBSD.org> |
efivar: Allow NULL paths in build_dp
Allow there to be NULL paths in buildp. This lets us return the device path to the partition, as well as to files on the partition.
Sponsored by: Netflix Revie
efivar: Allow NULL paths in build_dp
Allow there to be NULL paths in buildp. This lets us return the device path to the partition, as well as to files on the partition.
Sponsored by: Netflix Reviewed by: corvink, manu, asomers Differential Revision: https://reviews.freebsd.org/D38615
show more ...
|