summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2024-08-13 20:48:01 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2024-08-13 20:48:01 +0000
commit8155774db9290d4f3093e46c9c9cc068cfb2cbe6 (patch)
tree8fe666e13543ccdfb0121b726135c62162b629ac /sys/dev/ic
parentc5bb23368d2c4e68e7424c7130f597d87e48b4a4 (diff)
For AMD SEV use correct command mask in ccp(4) driver.
According to AMD SEV API specification, the mask for command ID is supposed to be of length 10 (Bits [25:16]), rather than length 6. This ensures that all commands are properly processed by the PSP. from Aaron Debebe; OK hshoexer@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ccp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/ccp.c b/sys/dev/ic/ccp.c
index 79650a6c63a..5981ae43450 100644
--- a/sys/dev/ic/ccp.c
+++ b/sys/dev/ic/ccp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccp.c,v 1.5 2024/06/13 17:59:08 bluhm Exp $ */
+/* $OpenBSD: ccp.c,v 1.6 2024/08/13 20:48:00 bluhm Exp $ */
/*
* Copyright (c) 2018 David Gwynne <dlg@openbsd.org>
@@ -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;