mirror of
https://github.com/ipxe/ipxe
synced 2025-12-28 18:42:53 +03:00
Almost working with own-queue allocation.
This commit is contained in:
@@ -112,6 +112,8 @@ static XHH_cmd_status_t cmd_invoke(command_fields_t * cmd_prms)
|
||||
__u32 hcr[7], data;
|
||||
__u8 status;
|
||||
|
||||
DBG ( "Executing command:\n" );
|
||||
|
||||
/* check if go bit is free */
|
||||
ret = cmdif_is_free(&is_free);
|
||||
if (ret) {
|
||||
@@ -129,6 +131,17 @@ static XHH_cmd_status_t cmd_invoke(command_fields_t * cmd_prms)
|
||||
edit_hcr(cmd_prms, hcr);
|
||||
__asm__ __volatile__("":::"memory");
|
||||
|
||||
DBG_HD ( &hcr[0], sizeof ( hcr ) );
|
||||
if ( cmd_prms->in_trans == TRANS_MAILBOX ) {
|
||||
size_t size = ( 4 * cmd_prms->in_param_size );
|
||||
if ( size > 256 )
|
||||
size = 256;
|
||||
#if ! CREATE_OWN
|
||||
DBG ( "Input mailbox:\n" );
|
||||
DBG_HD ( &cmd_prms->in_param[0], size );
|
||||
#endif
|
||||
}
|
||||
|
||||
for (i = 0; i < 7; ++i) {
|
||||
ret = gw_write_cr(HCR_BASE + i * 4, hcr[i]);
|
||||
if (ret) {
|
||||
@@ -168,6 +181,17 @@ static XHH_cmd_status_t cmd_invoke(command_fields_t * cmd_prms)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( cmd_prms->out_trans == TRANS_MAILBOX ) {
|
||||
size_t size = ( 4 * cmd_prms->out_param_size );
|
||||
if ( size > 256 )
|
||||
size = 256;
|
||||
#if ! CREATE_OWN
|
||||
DBG ( "Output mailbox:\n" );
|
||||
DBG_HD ( &cmd_prms->out_param[0], size );
|
||||
#endif
|
||||
}
|
||||
DBG ( "Command executed successfully\n" );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user