diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-05-19 17:05:38 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-05-21 15:03:35 +1000 |
commit | 1e03bfbedc46ab7792f0fc4617df28e49af11cff (patch) | |
tree | 700a4d87af76b5016d400d940910b7906b47238e /include | |
parent | f7b322e049bcf599511af475be340e86b3049001 (diff) | |
download | skiboot-1e03bfbedc46ab7792f0fc4617df28e49af11cff.zip skiboot-1e03bfbedc46ab7792f0fc4617df28e49af11cff.tar.gz skiboot-1e03bfbedc46ab7792f0fc4617df28e49af11cff.tar.bz2 |
prd: Don't expose full opal_prd_msg to kernel
The kernel is only accessing part of struct opal_prd_msg, and doesn't
need to know about the rest. This change moves the "internal" parts of
opal_prd_msg to a separate header.
In order for the kernel to pass full messages between userspace and
firmware, it needs the total size of the struct. We put this in the
header for the kernel to access.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/opal-api.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/opal-api.h b/include/opal-api.h index 1698311..5be548c 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -847,16 +847,21 @@ typedef struct oppanel_line { enum opal_prd_msg_type { OPAL_PRD_MSG_TYPE_INIT = 0, /* HBRT --> OPAL */ - OPAL_PRD_MSG_TYPE_FINI, /* HBRT --> OPAL */ + OPAL_PRD_MSG_TYPE_FINI, /* HBRT/kernel --> OPAL */ OPAL_PRD_MSG_TYPE_ATTN, /* HBRT <-- OPAL */ OPAL_PRD_MSG_TYPE_ATTN_ACK, /* HBRT --> OPAL */ OPAL_PRD_MSG_TYPE_OCC_ERROR, /* HBRT <-- OPAL */ OPAL_PRD_MSG_TYPE_OCC_RESET, /* HBRT <-- OPAL */ }; -struct opal_prd_msg { +struct opal_prd_msg_header { uint8_t type; - uint8_t pad[3]; + uint8_t pad[1]; + __be16 size; +}; + +struct opal_prd_msg { + struct opal_prd_msg_header hdr; __be32 token; union { struct { |