@ -23,7 +23,7 @@
* FOO = 0x7f ,
* # define BAR 0
* 2. Implement the handler
* static ret_c ode cmd_foo_bar ( struct cxl_cmd * cmd ,
* static CXLRetC ode cmd_foo_bar ( struct cxl_cmd * cmd ,
* CXLDeviceState * cxl_dstate , uint16_t * len )
* 3. Add the command to the cxl_cmd_set [ ] [ ]
* [ FOO ] [ BAR ] = { " FOO_BAR " , cmd_foo_bar , x , y } ,
@ -90,10 +90,10 @@ typedef enum {
CXL_MBOX_UNSUPPORTED_MAILBOX = 0x15 ,
CXL_MBOX_INVALID_PAYLOAD_LENGTH = 0x16 ,
CXL_MBOX_MAX = 0x17
} ret_c ode;
} CXLRetC ode;
struct cxl_cmd ;
typedef ret_c ode ( * opcode_handler ) ( struct cxl_cmd * cmd ,
typedef CXLRetC ode ( * opcode_handler ) ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate , uint16_t * len ) ;
struct cxl_cmd {
const char * name ;
@ -105,7 +105,7 @@ struct cxl_cmd {
# define DEFINE_MAILBOX_HANDLER_ZEROED(name, size) \
uint16_t __zero # # name = size ; \
static ret_c ode cmd_ # # name ( struct cxl_cmd * cmd , \
static CXLRetC ode cmd_ # # name ( struct cxl_cmd * cmd , \
CXLDeviceState * cxl_dstate , uint16_t * len ) \
{ \
* len = __zero # # name ; \
@ -113,7 +113,7 @@ struct cxl_cmd {
return CXL_MBOX_SUCCESS ; \
}
# define DEFINE_MAILBOX_HANDLER_NOP(name) \
static ret_c ode cmd_ # # name ( struct cxl_cmd * cmd , \
static CXLRetC ode cmd_ # # name ( struct cxl_cmd * cmd , \
CXLDeviceState * cxl_dstate , uint16_t * len ) \
{ \
return CXL_MBOX_SUCCESS ; \
@ -125,7 +125,7 @@ DEFINE_MAILBOX_HANDLER_ZEROED(events_get_interrupt_policy, 4);
DEFINE_MAILBOX_HANDLER_NOP ( events_set_interrupt_policy ) ;
/* 8.2.9.2.1 */
static ret_c ode cmd_firmware_update_get_info ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_firmware_update_get_info ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -159,7 +159,7 @@ static ret_code cmd_firmware_update_get_info(struct cxl_cmd *cmd,
}
/* 8.2.9.3.1 */
static ret_c ode cmd_timestamp_get ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_timestamp_get ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -181,7 +181,7 @@ static ret_code cmd_timestamp_get(struct cxl_cmd *cmd,
}
/* 8.2.9.3.2 */
static ret_c ode cmd_timestamp_set ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_timestamp_set ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -201,7 +201,7 @@ static const QemuUUID cel_uuid = {
} ;
/* 8.2.9.4.1 */
static ret_c ode cmd_logs_get_supported ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_logs_get_supported ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -224,7 +224,7 @@ static ret_code cmd_logs_get_supported(struct cxl_cmd *cmd,
}
/* 8.2.9.4.2 */
static ret_c ode cmd_logs_get_log ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_logs_get_log ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -265,7 +265,7 @@ static ret_code cmd_logs_get_log(struct cxl_cmd *cmd,
}
/* 8.2.9.5.1.1 */
static ret_c ode cmd_identify_memory_device ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_identify_memory_device ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -309,7 +309,7 @@ static ret_code cmd_identify_memory_device(struct cxl_cmd *cmd,
return CXL_MBOX_SUCCESS ;
}
static ret_c ode cmd_ccls_get_partition_info ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_ccls_get_partition_info ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -339,7 +339,7 @@ static ret_code cmd_ccls_get_partition_info(struct cxl_cmd *cmd,
return CXL_MBOX_SUCCESS ;
}
static ret_c ode cmd_ccls_get_lsa ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_ccls_get_lsa ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{
@ -364,7 +364,7 @@ static ret_code cmd_ccls_get_lsa(struct cxl_cmd *cmd,
return CXL_MBOX_SUCCESS ;
}
static ret_c ode cmd_ccls_set_lsa ( struct cxl_cmd * cmd ,
static CXLRetC ode cmd_ccls_set_lsa ( struct cxl_cmd * cmd ,
CXLDeviceState * cxl_dstate ,
uint16_t * len )
{