<!DOCTYPE html PUBLIC
"-//w3c//dtd html 4.0 transitional//en">
<title>SPARC Architectural Model: Device and Utility API
</title>
<body bgcolor=
"#ffffff" lang=
"en-US">
<h2>mmi_register_asi_action
</h2>
<i>mmi_register_asi_action()
</i> - Register specific ASI read/write
<tt><font color=
"#0000ff">#include
"mmi.h"</font></tt><span
style=
"font-family: monospace;"><br>
/* for non-peripheral
"devices" that implement ASIs */
<br>
/* register call back functions for asi load/store for a particular asi.
typedef int
(*mmi_ld_asi_action)
(void *cbd,
uint32_t asi, uint64_t vaddr, uint64_t *buf, int size,uint32_t cpuid);
<br>
typedef int
(*mmi_st_asi_action)
(void *cbd,
uint32_t asi, uint64_t vaddr, uint64_t buf, int size,uint32_t cpuid);
<br>
void mmi_register_asi_action (mmi_instance_t instance, uint32_t asi,
mmi_ld_asi_action ld_handler, mmi_st_asi_action st_handler);
<br>
Registers read (
<big><span
style=
"font-family: monospace; font-style: italic;">ld_handler)
</span><span
style=
"font-family: monospace;">and write(
</span></big><span
style=
"font-family: monospace;"><big><span style=
"font-style: italic;">st_handler
</span></big>)
<big><big style=
"font-style: italic;"><small> </small></big><big><small>call back functions for a particular
</small></big><big
style=
"font-style: italic;"><small> </small>asi
<br>
</big></big></span>The call back object data (
<span
style=
"font-style: italic;">cbd
</span>) which has been registered
through
<span style=
"font-style: italic;">mmi_
register_asi_cb_data
</span> API and the
<span
style=
"font-style: italic;">vaddr
</span>will also be
asi read/write
handlers along with the other parameters.
<span
style=
"font-family: monospace;"><big><big><br>
No return value.
<br>
<pre>extern
"C" int rock_siu_asi_read_handler(void *cbd, uint32_t asi, uint64_t vaddr, uint64_t *buf, int size,uint32_t strandId){
<br> return Rock_Siu::asiReadHandler(cbd,asi,vaddr,buf,size,strandId);
<br>}
<br>extern
"C" int rock_siu_asi_write_handler(void *cbd, uint32_t asi, uint64_t vaddr, uint64_t buf,int size, uint32_t strandId){
<br> return Rock_Siu::asiWriteHandler(cbd,asi,vaddr,buf,size,strandId);
<br>}
<br><br><br>bool
<br>Rock_Siu::check_args() {
<br> mmi_register_asi_cb_data(instance, this);
<br> mmi_register_asi_action(instance, Rock_Imu::ASI_QUEUE,rock_siu_asi_read_handler,rock_siu_asi_write_handler);
<br>}
<br><br></pre>
<h4 style=
"text-decoration: underline;">SEE ALSO
</h4>
<a href=
"mmi_register_asi_cb_data.html"><span
style=
"color: rgb(51, 51, 255); text-decoration: underline;">mmi_register_asi_cb_data
</span></a><br>
<a href=
"intro.html">Introduction
<br>