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 ...
|
ccf2121d | 16-Feb-2023 |
Warner Losh <imp@FreeBSD.org> |
efivar: Try harder to find label's efimedia
If there's no efimedia attribute on the provider, and the provider's a glabel, then find the 'parent' geom. In this case, the provider's name is label-typ
efivar: Try harder to find label's efimedia
If there's no efimedia attribute on the provider, and the provider's a glabel, then find the 'parent' geom. In this case, the provider's name is label-type/name, but the geom's label will that of the underlying device (eg ada0p1). If it is, recurisvely call find_geom_efimedia with the geom's name, which shuold have the efimedia attribute.
Sponsored by: Netflix Reviewed by: corvink, manu, asomers Differential Revision: https://reviews.freebsd.org/D38614
show more ...
|
5754f582 | 24-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Apply uncrustify changes
Apply uncrustify changes to .c/.h files.
Reduce the diffs with EDK2 to aid with future merges. The unconventional way we've imported this code makes using a ven
libefivar: Apply uncrustify changes
Apply uncrustify changes to .c/.h files.
Reduce the diffs with EDK2 to aid with future merges. The unconventional way we've imported this code makes using a vendor branch to manage it at the very least tricky. Update FreeBSD-update to reflect the slight shift in advise.
Reviewed by: imp Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Obtained from: https://github.com/tianocore/edk2/commit/2f88bd3a1296c522317f1c21377876de63de5be7 Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
60de142c | 25-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Change OPTIONAL keyword usage style
Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Obtained from: h
libefivar: Change OPTIONAL keyword usage style
Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Obtained from: https://github.com/tianocore/edk2/commit/d0e2f8232a26453fc0191629ed44ff2a46ea073e Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
11a9ff5b | 24-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Replace BSD License with BSD+Patent License
Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails:
https://lists.01.org/pipermail/edk2-dev
libefivar: Replace BSD License with BSD+Patent License
Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails:
https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html
RFCs with detailed process for the license change:
V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Obtained from: https://github.com/tianocore/edk2/commit/9344f0921518309295da89c221d10cbead8531aa Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
e871598a | 23-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Check Length para before use in DevPathToTextUsbWWID
In function DevPathToTextUsbWWID, the Length parameter is used without check. This patch is to add check before using it.
Upstream Bu
libefivar: Check Length para before use in DevPathToTextUsbWWID
In function DevPathToTextUsbWWID, the Length parameter is used without check. This patch is to add check before using it.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1336 Obtained from: https://github.com/tianocore/edk2/commit/d8e702693a8c292220131dc4234a36e2c9fff614 Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
c1fa6f4c | 24-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Fix incorrect check for DisplayOnly text format in AcpiEx
Text format for AcpiEx device path in UEFI Spec: AcpiEx(HID,CID,UID,HIDSTR,CIDSTR,UIDSTR) AcpiEx(HID|HIDSTR,(CID|CIDSTR,UID|UIDST
libefivar: Fix incorrect check for DisplayOnly text format in AcpiEx
Text format for AcpiEx device path in UEFI Spec: AcpiEx(HID,CID,UID,HIDSTR,CIDSTR,UIDSTR) AcpiEx(HID|HIDSTR,(CID|CIDSTR,UID|UIDSTR))(Display Only)
When convert device path to text for AcpiEx device path, current code check AllowShortcuts parameter to convert the device path to DisplayOnly text format(shorter text representation) by mistake. It should check DisplayOnly parameter.
This commit is to fix this issue.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1312 Obtained from: https://github.com/tianocore/edk2/commit/e9ab1635a2cfa1cb588996dcd5cc157fb44decb1 Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
492d9953 | 23-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Handle AcpiExp device path when optional para is not specified
AcpiExp text device path: AcpiExp(HID,CID,UIDSTR) And according to UEFI spec, the CID parameter is optional and has a defaul
libefivar: Handle AcpiExp device path when optional para is not specified
AcpiExp text device path: AcpiExp(HID,CID,UIDSTR) And according to UEFI spec, the CID parameter is optional and has a default value of 0. But current implementation miss to check following cases for the AcpiExp. FromText: when text device is AcpiExp(HID,,UIDSTR)/AcpiExp(HID,0,UIDSTR) ToText: when the CID is 0 in the node structure
This commit is to do the enhancement.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1243 Obtained from: https://github.com/tianocore/edk2/commit/a8b5750901faa63ff5570634851e648b8e335e5a Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
965f8527 | 25-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Handle USBxxx device path when optional para is not specified
According to UEFI spec, for the Messaging Device Path with USB Class SubType, some paras are optional in the text device path
libefivar: Handle USBxxx device path when optional para is not specified
According to UEFI spec, for the Messaging Device Path with USB Class SubType, some paras are optional in the text device path. Take UsbClass(VID,PID,Class,SubClass,Protocol) for example, The VID is an integer between 0 and 65535 and is optional. The default value is 0xFFFF. The PID is an integer between 0 and 65535 and is optional. The default value is 0xFFFF. The Class is an integer between 0 and 255 and is optional. The default value is 0xFF. The SubClass is an integer between 0 and 255 and is optional. The default value is 0xFF. The Protocol is an integer between 0 and 255 and is optional. The default value is 0xFF. So if any the optional para is not specified in the text device, we should set related para in the node structure to default value.
This commit is to do the enhancement for USB Class device path when optional para is not specified.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1243 Obtained from: https://github.com/tianocore/edk2/commit/3874108034eb3f1d5d5180df33a5dfdd5fab5d25 Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
4e83ac7d | 25-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Handle Sata device path when optional para is not specified
Sata device path format:Sata(HPN, PMPN, LUN) According to UEFI Spec, the PMPN is an integer between 0 and 65535 and is optional
libefivar: Handle Sata device path when optional para is not specified
Sata device path format:Sata(HPN, PMPN, LUN) According to UEFI Spec, the PMPN is an integer between 0 and 65535 and is optional. If not provided, the default is 0xFFFF.
This commit is to do the enhancement for Sata device path when optional para is not specified.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1243 Obtained from: https://github.com/tianocore/edk2/commit/6d9b9bbb6148831de2ca545994f31e27b3d4c675 Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
9a62aa93 | 25-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Use VENDOR_DEVICE_PATH structure for Debug Port device path
When converting DebugPort device path from text, current code use VENDOR_DEFINED_MESSAGING_DEVICE_PATH structure for Debug port
libefivar: Use VENDOR_DEVICE_PATH structure for Debug Port device path
When converting DebugPort device path from text, current code use VENDOR_DEFINED_MESSAGING_DEVICE_PATH structure for Debug port device node. typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; EFI_GUID Guid; UINT8 VendorDefinedData[1]; } VENDOR_DEFINED_MESSAGING_DEVICE_PATH;
And Debugport Device Path is a vendor-defined messaging device path with no data, only a GUID. So it's better to use VENDOR_DEVICE_PATH to create the Debug port device node. typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; EFI_GUID Guid; } VENDOR_DEVICE_PATH;
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1229 Obtained from: https://github.com/tianocore/edk2/commit/9343d0a1cd09544686b14dba5b428d7bc811f6b9 Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|
a51ae721 | 23-Feb-2022 |
Jose Luis Duran <jlduran@gmail.com> |
libefivar: Add PciRoot/PcieRoot text for ACPI Expanded Device Path
According to UEFI spec,for ACPI Expanded Device Path when HID=PNP0A03 or CID=PNP0A03 and HID != PNP0A08, the device path node can b
libefivar: Add PciRoot/PcieRoot text for ACPI Expanded Device Path
According to UEFI spec,for ACPI Expanded Device Path when HID=PNP0A03 or CID=PNP0A03 and HID != PNP0A08, the device path node can be displayed as: PciRoot(UID|UIDSTR) When HID=PNP0A08 or CID=PNP0A08, the device path node can be displayed as: PcieRoot(UID|UIDSTR). But current code miss the code logic.
This commit is to do the enhancement.
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1228 Obtained from: https://github.com/tianocore/edk2/commit/78af0984b45a780e45d57c22c85a1f594b969212 Pull Request: https://github.com/freebsd/freebsd-src/pull/581
show more ...
|