Linux Kernel
3.7.1
|
Data Fields | |
u32 | len |
u32 | buf_offset |
u32 | resp_hdr_offset |
u32 | id |
u32 | buf [0] |
struct scm_command - one SCM command buffer : total available memory for command and response : start of command buffer : start of response buffer : command to be executed : buffer returned from scm_get_command_buffer()
An SCM command is laid out in memory as follows:
----------------— <— struct scm_command | command header | ----------------— <— scm_get_command_buffer() | command buffer | ----------------— <— struct scm_response and | response header | scm_command_to_response() ----------------— <— scm_get_response_buffer()
There can be arbitrary padding between the headers and buffers so you should always use the appropriate scm_get_*_buffer() routines to access the buffers in a safe manner.