| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
To allow their use by efibootmgr.
Signed-off-by: stephane.rochoy@stormshield.eu
Reviewed by: imp
Sponsored by: Stormshield
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2167
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the MdePkg package
Note that the link above no longer exists. The commit message was kept
verbatim. An original copy of the bug report can be found at:
https://web.archive.org/web/20241008121707/https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Obtained from: https://github.com/tianocore/edk2/commit/2f88bd3a1296c522317f1c21377876de63de5be7
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760
Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.
Note that the link above no longer exists. The commit message was kept
verbatim. An archive of the bug report can be found at:
https://web.archive.org/web/20240714185609/https://bugzilla.tianocore.org/show_bug.cgi?id=3760
Obtained from: https://github.com/tianocore/edk2/commit/d0e2f8232a26453fc0191629ed44ff2a46ea073e
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change added an instance of UefiDevicePathLib for StandaloneMm. It
abstracts DevicePathFromHandle function into different files for
Standalone MM and other instances to avoid linking gBS into MM_STANDALONE
drivers.
No functional change intended, as this function and its invocation are ifdefd
out.
Obtained from: https://github.com/tianocore/edk2/commit/14a746bb6a92d59669c67a970479558734cf2383
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://bugzilla.tianocore.org/show_bug.cgi?id=1373
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
Note that the link above no longer exists. The commit message was kept
verbatim. An archive of the bug report can be found at:
https://web.archive.org/web/20240714192319/https://bugzilla.tianocore.org/show_bug.cgi?id=1373
Obtained from: https://github.com/tianocore/edk2/commit/9344f0921518309295da89c221d10cbead8531aa
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1497
Current implementation of IsDevicePathValid() is not enough for type
of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device
path. This patch add a simple NULL character check at Length position.
Note that the link above no longer exists. The commit message was kept
verbatim. An archived version of the bug report can be found at:
https://web.archive.org/web/20240714191428/https://bugzilla.tianocore.org/show_bug.cgi?id=1497
Add the const keyword to avoid errors/warnings about dropping a const
qualifier.
Obtained from: https://github.com/tianocore/edk2/commit/2f7a96d6ec13b292d6f31295f3195913921173e1
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a checking step in DevicePathUtilities.c to verify DevicePath.
https://bugzilla.tianocore.org/show_bug.cgi?id=1372
v2: Remove ASSERT() and the redundant checking step. Update related
description.
Note that the link above no longer exists. The commit message was kept
verbatim. An archived version of the bug report can be found at:
https://web.archive.org/web/20240714192353/bugzilla.tianocore.org/show_bug.cgi?id=1372
Obtained from: https://github.com/tianocore/edk2/commit/fd02394228ee1dc2378cccfde6098c461f96dd42
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
No functional change.
Obtained from: https://github.com/tianocore/edk2/commit/9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit introduces gratuitous white space and unused functions.
This functionality is guarded/commented out. This change is necessary
to reduce the differences with the reference file in subsequent commits.
No functional change intended.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
| |
Move a few functions to match their locations in the reference file.
No functional change intended.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
| |
Standardize preprocessor directives that comment out unused functions
(essentially #if 0).
No functional change intended.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix typos in the files that are owned by the project.
Bring back a "duplicate word" removal (node node), which should have
been "node Node", the second "node" is not capitalized in the reference
file (yet). We'll bring it back capitalized to avoid it from triggering
automated checking scripts and possibly reverting this change again. A
few other typos were not fixed, as we strive to keep as close to the
reference files as possible, these fixes should be submitted to the
reference project (tianocore/edk2) in the not so distant future.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Have our own ProcessorBind.h. It just includes sys/efi-edk2.h, but
undefines TRUE, FALSE and MAC. The first two are from acpica and are
redefined to something almost the same. MAC is a global option that,
well, interferes with using EDK2, dangit. I suppose I should redefine it
after, but I don't think you can save the value of a pre-processor
variable.
This breaks a little with the tradition of having this in a seprate
directory and using build magic. However, the build is already magical
enough and having this here makes things less magical. Also, EDK2 puts
this in a processor specific directory, so we won't have conflicts (they
need it there since they run on more processors than we do: we can just
include sys/efi-edk2.h which covers the smallar variance we have in
processors).
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create efi-freebsd.h, which is safe to include from the FreeBSD context
(all of userland, except the small bits we share with edk2 and the
kernel). This defines anything that we need. At the moment, it just
includes NULL definitions.
Create efi-edk2.h, which is approximately ProcessorBind.h from edk2 that
we can include in FreeBSD compontents that are re-using edk2 components
(bits of the boot laoder, and libefi*). Update the efi_gid definitions
to match edk2 better. Add this file to badfiles.inc, since we can't
write it in a way that's compatible. This is copied from the old
efi-osdep.h.
This has to be done in one commit that's bigger than I like since we
can't easily move things piecemeal around they are so inter-related.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D53651
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Sponsored by: Netflix
Reviewed by: tsoome, kib
Differential Revision: https://reviews.freebsd.org/D50059
|
| |
|
|
|
|
|
|
|
| |
Move to the newer ioctl 'struct efi_var_ioctl' which uses efi_guid_t
instead of struct uuid. This allows for direct assignment agaain.
Sponsored by: Netflix
Reviewed by: tsoome, kib
Differential Revision: https://reviews.freebsd.org/D50058
|
| |
|
|
|
| |
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D50038
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Since we know we're type-punning the EFI_GUID to a uuid_t, add some
explicit casts even though, at the moment, we typedef one to the other.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D50032
|
| |
|
|
|
|
|
| |
This really onl needs to be one zero long for the entire structure to be
initialized. Use this form instead.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
| |
There's more references to EFI_GUID than to GUID, so prefer using
that. The EFI_GUID is closely relate to UUID, but not quite identical to
it and those slight differences matter sometimes as well (which is how I
found these). Since nearly all the EFI code (ours and EDK2) prefers
EGI_GUID, use that proactively here.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Add a 'g' flag to allow the replacement to occur more than once on the
same line.
Reviewed by: imp, emaste
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D49058
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add logic that checks if the code doesn't overflow
ACPI_EXTENDED_HID_DEVICE_PATH node when searching for optional
strings. If the string is not provided in the device path node
default value of "\0" is used.
Upstream PR: https://bugzilla.tianocore.org/show_bug.cgi?id=4555
Obtained from: https://github.com/tianocore/edk2/commit/96ed60dfd7d4818a532216d64ee87b13fae5c726
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1388
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
|
| |
|
|
| |
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
| |
This "consumes" an otherwise unused argument.
Differential Revision: https://reviews.freebsd.org/D40650
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
Add a note about why we need these extra compiler flags to suppress
warnings. EDK2 upstream code is being used verbatim and as of the last
update these issuse persist, but are benign.
Sponsored by: Netflix
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D38613
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
DevPathToTextUsbWWID allocates a separate copy of the SerialNumber
string to append a null terminator if the original string is not
null terminated. However, by using AllocateCopyPool, it tries to
copy 'Length + 1' words from the existing string containing 'Length'
characters into the target string. Split the copy out to only
copy 'Length' characters instead.
Reviewed by: imp, emaste
Reported by: GCC 12 -Wstringop-overread
Differential Revision: https://reviews.freebsd.org/D36826
|
| |
|
|
|
|
| |
- s/partiton/partition/
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|