https://www.coreboot.org/index.php?title=User_talk:MrNuke/Block_Device_API&feed=atom&action=history
User talk:MrNuke/Block Device API - Revision history
2024-03-29T06:26:58Z
Revision history for this page on the wiki
MediaWiki 1.40.0
https://www.coreboot.org/index.php?title=User_talk:MrNuke/Block_Device_API&diff=13425&oldid=prev
MrNuke: /* Proposal 1: Unified API */
2014-03-06T20:11:41Z
<p><span dir="auto"><span class="autocomment">Proposal 1: Unified API</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:11, 6 March 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l24">Line 24:</td>
<td colspan="2" class="diff-lineno">Line 24:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> void (*power)(int); /* power mgt: power(1) ? on, power (0) ? off */</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> void (*power)(int); /* power mgt: power(1) ? on, power (0) ? off */</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> };</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> };</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==== Comments ====</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">This API is too big and too powerful for the needs of coreboot. It will need to be trimmed to present a coreboot-centric (simpler) interface.</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==== Questions ====</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==== Questions ====</div></td></tr>
</table>
MrNuke
https://www.coreboot.org/index.php?title=User_talk:MrNuke/Block_Device_API&diff=13424&oldid=prev
MrNuke: /* Ideas for generic handling of devices */
2014-03-06T20:10:20Z
<p><span dir="auto"><span class="autocomment">Ideas for generic handling of devices</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:10, 6 March 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l33">Line 33:</td>
<td colspan="2" class="diff-lineno">Line 33:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#* think "Device specfic storage drivers -> [*] Allwinner A10 MMC driver" in '''libpayload''' config</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#* think "Device specfic storage drivers -> [*] Allwinner A10 MMC driver" in '''libpayload''' config</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># More questions coming soon (TM)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># More questions coming soon (TM)</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==== Resources ====</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* Existing, but not merged, MMC code for cubieboard: [https://github.com/mrnuke/coreboot/commits/cubie_mmc mrnuke's github branch]</ins></div></td></tr>
</table>
MrNuke
https://www.coreboot.org/index.php?title=User_talk:MrNuke/Block_Device_API&diff=13302&oldid=prev
MrNuke: Created page with "== Ideas for generic handling of devices == IMPORTANT! Feel free to edit this page to share your thoughts and ideas. This is the official MMC open brainstorming page. === Pr..."
2014-02-06T18:04:10Z
<p>Created page with "== Ideas for generic handling of devices == IMPORTANT! Feel free to edit this page to share your thoughts and ideas. This is the official MMC open brainstorming page. === Pr..."</p>
<p><b>New page</b></p><div>== Ideas for generic handling of devices ==<br />
<br />
IMPORTANT! Feel free to edit this page to share your thoughts and ideas. This is the official MMC open brainstorming page.<br />
<br />
=== Proposal 1: Unified API ===<br />
Chan is an IO channel. <br />
<br />
This struct is used in Inferno and has been for a long time; so it works. <br />
It's also in the opcodes somewhat like what we did for EMMC on ARM.<br />
<br />
struct Dev<br />
{<br />
char* name;<br />
void (*reset)(void);<br />
void (*init)(void);<br />
void (*shutdown)(void);<br />
Chan* (*attach)(char*); /* tell the device you want to use it */<br />
Walkqid* (*walk)(Chan*, Chan*, char**, int); /* walk to a name in the device's managed name space; return a handle */<br />
int (*stat)(Chan*, uchar*, int); // status info<br />
Chan* (*open)(Chan*, int); /* get access to a resource in the device name space */<br />
void (*close)(Chan*); /* tell it you are done with whatever it is. */<br />
long (*read)(Chan*, void*, long, vlong);<br />
long (*write)(Chan*, void*, long, vlong);<br />
void (*power)(int); /* power mgt: power(1) ? on, power (0) ? off */<br />
};<br />
<br />
==== Questions ====<br />
<br />
# Do we want to expose or hide the block nature of some devces (i.e. force reading multiples of blocksize, or allow reading any number of bytes, with no alignment requirement) ?<br />
# How do we connect the dots, such that most of the details can be handled transparently ?<br />
# How simple or complex do we want the API to be such that it can work in any stage (including bootblock, assuming some SRAM and a stack are available) ?<br />
# Can we integrate this into '''libpayload''' such that the same sources can be used for both coreboot and libpayload ?<br />
#* think "Device specfic storage drivers -> [*] Allwinner A10 MMC driver" in '''libpayload''' config<br />
# More questions coming soon (TM)</div>
MrNuke