Download raw body.
SEV: fix command id mask
Hi, On Tue, Aug 13, 2024 at 04:08:21PM +0200, Aaron Debebe wrote: > ... > according to the AMD-SEV API spec (version 0.24), the mask for the > command id (`cmd`) is supposed to be of length 10 (Bits [25:16]), > rather than of length 6. This ensures that all command ids will be > properly processed by the PSP. yes, you're right! The mask should be 0x3ff. Thanks! > Cya, > aaron > > ------------------------------------------------------------------- > diff --git a/sys/dev/ic/ccp.c b/sys/dev/ic/ccp.c > index 79650a6c63a..d8f17735e3c 100644 > --- a/sys/dev/ic/ccp.c > +++ b/sys/dev/ic/ccp.c > @@ -228,7 +228,7 @@ ccp_docmd(struct ccp_softc *sc, int cmd, uint64_t paddr) > > plo = ((paddr >> 0) & 0xffffffff); > phi = ((paddr >> 32) & 0xffffffff); > - cmdword = (cmd & 0x3f) << 16; > + cmdword = (cmd & 0x3ff) << 16; > if (!cold) > cmdword |= PSP_CMDRESP_IOC; >
SEV: fix command id mask