[PATCH v15 22/28] x86: Secure Launch kernel early boot stub
Dave Hansen
dave.hansen at intel.com
Tue Dec 16 14:32:30 PST 2025
On 12/15/25 15:33, Ross Philipson wrote:
> +static u64 sl_txt_read(u32 reg)
> +{
> + return readq((void *)(u64)(TXT_PRIV_CONFIG_REGS_BASE + reg));
> +}
> +
> +static void sl_txt_write(u32 reg, u64 val)
> +{
> + writeq(val, (void *)(u64)(TXT_PRIV_CONFIG_REGS_BASE + reg));
> +}
Man, that's a lot of casting. If TXT_PRIV_CONFIG_REGS_BASE were just a
pointer to being with, it could be:
writeq(val, TXT_PRIV_CONFIG_REGS_BASE + reg);
Right?
This _looks_ like it was just written and then had casts added to it
until it compiled.
More information about the kexec
mailing list