On Thu, Jan 15, 2026 at 08:57:21AM +0100, Thomas Zimmermann wrote:
> Add corebotdrm, a DRM driver for coreboot framebuffers. The driver
^ oo
> diff --git a/include/linux/coreboot.h b/include/linux/coreboot.h
> index 514c95f9d0e3..e81ee5746e2b 100644
> --- a/include/linux/coreboot.h
> +++ b/include/linux/coreboot.h
> @@ -14,6 +14,7 @@
>
> #include <linux/compiler_attributes.h>
> #include <linux/types.h>
> +#include <linux/stddef.h>
>
> /* List of coreboot entry structures that is used */
>
> @@ -64,4 +65,7 @@ struct lb_framebuffer {
> u8 reserved_mask_size;
> } __packed;
>
> +#define LB_FRAMEBUFFER_HAS_LFB(__fb) \
> + ((__fb)->size >= offsetofend(struct lb_framebuffer, reserved_mask_size))
> +
Does LFB stand for "Linear Frame Buffer"?
I supposed the LFB follows the struct lb_framebuffer in memory. If yes, I'm
wondering does LB_FRAMEBUFFER_HAS_LFB() work? As the struct lb_framebuffer
definition is different from [1].
`offsetofend(struct lb_framebuffer, reserved_mask_size)` is 37 in the kernel
but the tailing data (i.e., LFB in the context) might start from offset 40 in
coreboot.
[1]
https://github.com/coreboot/coreboot/blob/main/payloads/libpayload/include/coreboot_tables.h#L232