History log of /src/sys/dev/efidev/efidev.c (Results 1 – 25 of 57)
Revision Date Author Comments
# 20a860ae 01-May-2025 Warner Losh <imp@FreeBSD.org>

efi: Move to using efi_guid_t in ioctl definitions

Start using efi_guid_t instead of struct uuid in the ioctl
definitions. These are binarily the same, but have different
structure definitions. EFI

efi: Move to using efi_guid_t in ioctl definitions

Start using efi_guid_t instead of struct uuid in the ioctl
definitions. These are binarily the same, but have different
structure definitions. EFI prefers this form, and to allow more
sharing with EDK2, make this slight addition.

I've not really defined new IOCTLs for this. They are the same
size, but I have defined new function.

Also fix in-kernel uses of uuid to efi_guid_t for anything related to
ioctl.

Sponsored by: Netflix
Reviewed by: tsoome, kib
Differential Revision: https://reviews.freebsd.org/D50057

show more ...


# 6366114c 01-May-2025 Warner Losh <imp@FreeBSD.org>

efi: Use EDK2 EFI_GUID instead of sturct uuid

So, while struct uuid and EFI_GUID are quite similar (they are the same
size, they have the same binary representation, etc), they aren not
identical. S

efi: Use EDK2 EFI_GUID instead of sturct uuid

So, while struct uuid and EFI_GUID are quite similar (they are the same
size, they have the same binary representation, etc), they aren not
identical. Speciifcally, the UUID and GUID defines are slightly
different and can't be swapped one for the other. Start to use EFI_GUID
for all EFI tables. This will allow increased sharing with the boot
laoder that already uses EDK2 variants as well as using the possibility
to use the EDK2 headers we've already imported more easily.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D50037

show more ...


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

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.

Remov

sys: Automated cleanup of cdefs and other formatting

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

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 3f3ad565 26-Apr-2023 Johannes Totz <jo@bruelltuete.com>

Expose EFI wake time API

Reviewed by: kib
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36714


# d12d651f 01-Jul-2021 Pavel Balaev <pavel.balaev@3mdeb.com>

EFI RT: resurrect EFIIOC_GET_TABLE

Make it work, but change the interface to be safe for non-root users. In
particular, right now interface only works for the tables which can be
minimally parsed by

EFI RT: resurrect EFIIOC_GET_TABLE

Make it work, but change the interface to be safe for non-root users. In
particular, right now interface only works for the tables which can be
minimally parsed by kernel to determine the table size. Then, userspace can
query the table size, after that it provides a buffer of needed size
and kernel copies out just table to userspace.

Main advantage is that user no longer need to be able to read /dev/mem,
the disadvantage is the need to have minimal parsers aware of the table
types. Right now the parsers are implemented for ESRT and PROP tables.

Future extension of the present interface might be a return of only
the table physical address, in case kernel does not have suitable
parser yet. Then, a privileged user could read the table from /dev/mem.
This extension, which logically equivalent to the old (non-worked)
EFIIOC_GET_TABLE variant, is not implemented until needed.

Submitted by: Pavel Balaev <pavel.balaev@3mdeb.com>
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D30104

show more ...


# 9be9771c 07-Jan-2021 Kyle Evans <kevans@FreeBSD.org>

efidev: remove EFIIOC_GET_TABLE ioctl

This ioctl would instantly induce a panic, likely since near inception, up
until 0861c7d3e048. Lack of previous interest in fixing it combined with
the problema

efidev: remove EFIIOC_GET_TABLE ioctl

This ioctl would instantly induce a panic, likely since near inception, up
until 0861c7d3e048. Lack of previous interest in fixing it combined with
the problematic interface (exports a pointer, really a physical address)
brings us to the natural conclusion: remove it until a useful consumer
forward.

If it eventually gets resurrected, the interface should definitely not
return in this exact form and likely needs to be reimagined.

The associated KPI, efi_get_table, is left intact for the time being.

Reviewed by: imp, jrtc27
Also discussed with: brooks, jhb
Differential Revision: https://reviews.freebsd.org/D28030

show more ...


# 8e69ae1c 05-Feb-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r343712 through r343806.


# 52467047 04-Feb-2019 Warner Losh <imp@FreeBSD.org>

Regularize the Netflix copyright

Use recent best practices for Copyright form at the top of
the license:
1. Remove all the All Rights Reserved clauses on our stuff. Where we
piggybacked others, u

Regularize the Netflix copyright

Use recent best practices for Copyright form at the top of
the license:
1. Remove all the All Rights Reserved clauses on our stuff. Where we
piggybacked others, use a separate line to make things clear.
2. Use "Netflix, Inc." everywhere.
3. Use a single line for the copyright for grep friendliness.
4. Use date ranges in all places for our stuff.

Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files)

show more ...


# 20a860ae 01-May-2025 Warner Losh <imp@FreeBSD.org>

efi: Move to using efi_guid_t in ioctl definitions

Start using efi_guid_t instead of struct uuid in the ioctl
definitions. These are binarily the same, but have different
structure definitions. EFI

efi: Move to using efi_guid_t in ioctl definitions

Start using efi_guid_t instead of struct uuid in the ioctl
definitions. These are binarily the same, but have different
structure definitions. EFI prefers this form, and to allow more
sharing with EDK2, make this slight addition.

I've not really defined new IOCTLs for this. They are the same
size, but I have defined new function.

Also fix in-kernel uses of uuid to efi_guid_t for anything related to
ioctl.

Sponsored by: Netflix
Reviewed by: tsoome, kib
Differential Revision: https://reviews.freebsd.org/D50057

show more ...


# 6366114c 01-May-2025 Warner Losh <imp@FreeBSD.org>

efi: Use EDK2 EFI_GUID instead of sturct uuid

So, while struct uuid and EFI_GUID are quite similar (they are the same
size, they have the same binary representation, etc), they aren not
identical. S

efi: Use EDK2 EFI_GUID instead of sturct uuid

So, while struct uuid and EFI_GUID are quite similar (they are the same
size, they have the same binary representation, etc), they aren not
identical. Speciifcally, the UUID and GUID defines are slightly
different and can't be swapped one for the other. Start to use EFI_GUID
for all EFI tables. This will allow increased sharing with the boot
laoder that already uses EDK2 variants as well as using the possibility
to use the EDK2 headers we've already imported more easily.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D50037

show more ...


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

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.

Remov

sys: Automated cleanup of cdefs and other formatting

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

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 3f3ad565 26-Apr-2023 Johannes Totz <jo@bruelltuete.com>

Expose EFI wake time API

Reviewed by: kib
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36714


# d12d651f 01-Jul-2021 Pavel Balaev <pavel.balaev@3mdeb.com>

EFI RT: resurrect EFIIOC_GET_TABLE

Make it work, but change the interface to be safe for non-root users. In
particular, right now interface only works for the tables which can be
minimally parsed by

EFI RT: resurrect EFIIOC_GET_TABLE

Make it work, but change the interface to be safe for non-root users. In
particular, right now interface only works for the tables which can be
minimally parsed by kernel to determine the table size. Then, userspace can
query the table size, after that it provides a buffer of needed size
and kernel copies out just table to userspace.

Main advantage is that user no longer need to be able to read /dev/mem,
the disadvantage is the need to have minimal parsers aware of the table
types. Right now the parsers are implemented for ESRT and PROP tables.

Future extension of the present interface might be a return of only
the table physical address, in case kernel does not have suitable
parser yet. Then, a privileged user could read the table from /dev/mem.
This extension, which logically equivalent to the old (non-worked)
EFIIOC_GET_TABLE variant, is not implemented until needed.

Submitted by: Pavel Balaev <pavel.balaev@3mdeb.com>
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D30104

show more ...


# 9be9771c 07-Jan-2021 Kyle Evans <kevans@FreeBSD.org>

efidev: remove EFIIOC_GET_TABLE ioctl

This ioctl would instantly induce a panic, likely since near inception, up
until 0861c7d3e048. Lack of previous interest in fixing it combined with
the problema

efidev: remove EFIIOC_GET_TABLE ioctl

This ioctl would instantly induce a panic, likely since near inception, up
until 0861c7d3e048. Lack of previous interest in fixing it combined with
the problematic interface (exports a pointer, really a physical address)
brings us to the natural conclusion: remove it until a useful consumer
forward.

If it eventually gets resurrected, the interface should definitely not
return in this exact form and likely needs to be reimagined.

The associated KPI, efi_get_table, is left intact for the time being.

Reviewed by: imp, jrtc27
Also discussed with: brooks, jhb
Differential Revision: https://reviews.freebsd.org/D28030

show more ...


# 8e69ae1c 05-Feb-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r343712 through r343806.


# 52467047 04-Feb-2019 Warner Losh <imp@FreeBSD.org>

Regularize the Netflix copyright

Use recent best practices for Copyright form at the top of
the license:
1. Remove all the All Rights Reserved clauses on our stuff. Where we
piggybacked others, u

Regularize the Netflix copyright

Use recent best practices for Copyright form at the top of
the license:
1. Remove all the All Rights Reserved clauses on our stuff. Where we
piggybacked others, use a separate line to make things clear.
2. Use "Netflix, Inc." everywhere.
3. Use a single line for the copyright for grep friendliness.
4. Use date ranges in all places for our stuff.

Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files)

show more ...


# ad456dd9 22-Mar-2018 Kyle Evans <kevans@FreeBSD.org>

Re-work efidev ordering to fix efirt preloaded by loader on amd64

On amd64, efi_enter calls fpu_kern_enter(). This may not be called until
fpuinitstate has been invoked, resulting in a kernel panic

Re-work efidev ordering to fix efirt preloaded by loader on amd64

On amd64, efi_enter calls fpu_kern_enter(). This may not be called until
fpuinitstate has been invoked, resulting in a kernel panic with
efirt_load="YES" in loader.conf(5).

Move fpuinitstate a little earlier in SI_SUB_DRIVERS so that we can squeeze
efirt between it and efirtc at SI_SUB_DRIVERS, SI_ORDER_ANY. efidev must be
after efirt and doesn't really need to be at SI_SUB_DEVFS, so drop it at
SI_SUB_DRIVER, SI_ORDER_ANY.

The not immediately obvious dependency of fpuinitstate by efirt has been
noted in both places.

Discussed with: kib, andrew
Reported by: Jakob Alvermark <jakob@alvermark.net>
X-MFC-With: r330868

show more ...


# 083c8ded 13-Aug-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r322451


# 0275f9db 11-Aug-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r321383 through r322397.


# 5b896b56 08-Aug-2017 Warner Losh <imp@FreeBSD.org>

Turns out to be even simpler to just not create /dev/efi if we don't
have a efi runtime.


# 9057f54d 08-Aug-2017 Warner Losh <imp@FreeBSD.org>

Fail to open efirt device when no EFI on system.

libefivar expects opening /dev/efi to indicate if the we can make efi
runtime calls. With a null routine, it was always succeeding leading
efi_variab

Fail to open efirt device when no EFI on system.

libefivar expects opening /dev/efi to indicate if the we can make efi
runtime calls. With a null routine, it was always succeeding leading
efi_variables_supported() to return the wrong value. Only succeed if
we have an efi_runtime table. Also, while I'm hear, out of an
abundance of caution, add a likely redundant check to make sure
efi_systbl is not NULL before dereferencing it. I know it can't be
NULL if efi_cfgtbl is non-NULL, but the compiler doesn't.

show more ...


# 5763f796 21-Oct-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r307383 through r307735.


# e4b9ff3a 16-Oct-2016 Konstantin Belousov <kib@FreeBSD.org>

Do not try to create /dev/efi device node before devfs is initialized.
Split efirt.ko initialization into early stage where runtime services
KPI environment is created, to be used e.g. for RTC, and t

Do not try to create /dev/efi device node before devfs is initialized.
Split efirt.ko initialization into early stage where runtime services
KPI environment is created, to be used e.g. for RTC, and the later
devfs node creation stage, per module.

Switch the efi device to use make_dev_s(9) instead of make_dev(9). At
least, this gracefully handles the duplicated device name issue.

Remove ARGSUSED comment from efidev_ioctl(), all unused arguments are
annotated with __unused attribute.

Reported by: ambrisko, O. Hartmann <ohartman@zedat.fu-berlin.de>
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

show more ...


123