| Age | Commit message (Collapse) | Author | Files | Lines |
|
The scoped kfree cleanup already ignores error pointers, so passing the
pointer through no_free_ptr() before PTR_ERR() is unnecessary. It also
makes the IS_ERR/PTR_ERR expressions appear inconsistent to Coccinelle.
Return PTR_ERR() directly. The scoped cleanup still leaves error pointers
untouched while freeing successful allocations on later returns.
Fixes: f2e05ce9763f ("firmware: coreboot: Add CFR firmware attributes driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610210637.LiJ3U0ob-lkp@intel.com/
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Link: https://lore.kernel.org/r/CABtds-16eUH6ah3Rr9R=N2605TPdFgDekM5oXVeWqGcmYfWqag@mail.gmail.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
|
|
coreboot leaves CBMEM out of the /memory node of the device tree that it
passes to FIT payloads, e.g. LinuxBoot on arm64 Chromebooks, and only
lists it in the memory reservation block. The kernel has no resource for
that memory, so region_intersects() reports it as neither System RAM nor
Reserved memory, and since commit e31ecda9e3af ("firmware: coreboot:
Skip no-map CBMEM entries") all CBMEM entries are skipped on such boards.
That loses the coreboot log, the TPM event log and everything else that
CBMEM devices expose.
Also accept entries that don't intersect any memory resource. No-map
regions are still skipped, as they are IORESOURCE_MEM resources, as are
device regions.
Fixes: e31ecda9e3af ("firmware: coreboot: Skip no-map CBMEM entries")
Signed-off-by: Michał Kopeć <michal@nozomi.space>
Link: https://lore.kernel.org/r/20261017090351.1266064-1-michal@nozomi.space
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
|
|
coreboot can publish a CFR tree in its coreboot table to describe
firmware setup options. Add a firmware-attributes driver for that table
entry under the coreboot firmware driver directory.
The driver exposes runtime EFI variable-backed boolean, enum and integer
settings through the firmware-attributes ABI. It only registers settings
with readable runtime EFI variables, skips suppressed, volatile,
dependency-gated and non-runtime options, and keeps read-only or inactive
options read-only in sysfs.
For settings with an APM_CNT runtime-apply record, write the EFI
variable and ask firmware to apply the setting immediately with an I/O
port SMI command. If firmware reports a failure, restore the old EFI
variable value. Settings without a runtime apply hook keep the EFI
variable update and set pending_reboot. Depend on HAS_IOPORT because
APM_CNT uses legacy I/O ports.
Tested on a Star Labs Byte with firmware 26.07: runtime APM_CNT apply
was verified with power_led, and reboot-needed behavior was verified with
debug_level.
Link: https://doc.coreboot.org/drivers/cfr.html
Link: https://doc.coreboot.org/drivers/cfr_internal.html
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Link: https://lore.kernel.org/r/73204be94586622903da7fa90757fb091e8a7c2c.1788284852.git.sean@starlabs.systems
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
|
|
Use a named initializer for the acpi_device_id fields which
makes the code more readable and consistent with how lists
are initialized in the rest of the kernel code base. Also
drop explicitly setting fields to 0 where it is redundant.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Link: https://lore.kernel.org/r/20260907-acpi-firmware-v2-1-e0b6d40823d1@thegoodpenguin.co.uk
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
|
|
Most drivers in drivers/firmware/google are coreboot table drivers rather
than Google-specific firmware drivers. Rename the directory to coreboot
and update the Kconfig prompt, build path and maintainer entry.
Rename the generic firmware Kconfig symbols to CONFIG_COREBOOT_* at the
same time so new configurations describe the firmware interface rather
than one vendor. Keep the old CONFIG_GOOGLE_* names as transitional
symbols so existing configurations keep selecting the same drivers
during the rename.
Leave defconfig updates to a separate patch so the configuration churn
is easy to review independently.
Suggested-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Link: https://lore.kernel.org/r/0a81e0d8e15c13f6a65c45ce476e37b33564ad61.1788284852.git.sean@starlabs.systems
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
|