[PATCH RFC v2 2/6] firmware: arm_firme: introduce arm_firme

Yeoreum Yun yeoreum.yun at arm.com
Thu Dec 3 07:52:00 PST 2026


On Thu, Dec 03, 2026 at 11:44:15AM -0400, Jason Gunthorpe wrote:
> On Wed, Dec 02, 2026 at 04:49:41PM -0800, Jonathan Cameron wrote:
> > > +config ARM_FIRME
> > > +	bool "Arm Firmware Interfaces for Realm Management Extension (FIRME)"
> > > +	depends on ARM64 && HAVE_ARM_SMCCC_DISCOVERY
> > > +	default n
> > 
> > Unless something else is forcing things, everything is default n so don't
> > specify it.
> 
> It is a helper "library" it should be a hidden kconfig selected by the
> actual FIRME using subsystem drivers, like attestation and TSM.

Yeap. I'll remove this.

> 
> > Use the enum you have so we match them up directly
> > 		[FIRME_ATTEST_SERVICE_ID] = { .dev_name = "arm-firme-attest" },
> 
> +1

Done.

> 
> > > +/*
> > > + * FIRME version encoding
> > > + */
> > > +#define FIRME_MAJOR_VERSION_MASK	GENMASK(30, 16)
> > > +#define FIRME_MINOR_VERSION_MASK	GENMASK(15, 0)
> > > +#define FIRME_MAJOR_VERSION(x)		((u16)(FIELD_GET(FIRME_MAJOR_VERSION_MASK, (x))))
> > > +#define FIRME_MINOR_VERSION(x)		((u16)(FIELD_GET(FIRME_MINOR_VERSION_MASK, (x))))
> > > +#define FIRME_PACK_VERSION_INFO(major, minor)			\
> > > +	(FIELD_PREP(FIRME_MAJOR_VERSION_MASK, (major)) |	\
> > > +	 FIELD_PREP(FIRME_MINOR_VERSION_MASK, (minor)))
> > 
> > I'd just use FIELD_PREP / FIELD_GET inline. These sorts of macros
> > often just obscure things.  Only introduce them if they save a lot of code.
> 
> +1
> 
> And if you do want further wrappers use a static inline function.

Okay. might this FIRME_PACK_VERSION_INFO, wouldn't be used currently.
So in this round, I'll remove it.

Thanks!

-- 
Sincerely,
Yeoreum Yun



More information about the linux-arm-kernel mailing list