Skip to content

Host Control API does not enforce 'cmd' read/write bit, but expects the caller to assign it correctly. #151

@humphrey-xmos

Description

@humphrey-xmos

control_read_command(control_resid_t resid, control_cmd_t cmd,

bit 8 in the cmd field indicates read or write. But the API read/write functions do not set or clear this bit. This leads to issues that both the right API function and the bit set when accessing the API.

Side-effect, due to bit 8 being reserved, there is no indication to the user when the user attempts to access a register above 0x7F.

So, it is possible, and some implementations make use of it, performing reads with the Write bit set or visa-versa. For side-band data access or similar.

TODO: decide if the above side-band use-case is valid. If not, enforce the the bit within the read and write functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions