<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style="--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style="font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";">
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.rtems.org/chris">Chris Johns</a>
commented on a
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_150982">discussion</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">This is device driver. It happens to need drivers for specific hardware to work. This is similer to PCIe drivers are needed to make the PCI driver frame work work. It has been implemented as a framework to ease usability. The module could be renamed to be <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">dev/io</code> and it can form a slightly more generic interface if IO peek and poke is added. FreeBSD has a similar approach with <a href="https://man.freebsd.org/cgi/man.cgi?query=io&apropos=0&sektion=0&manpath=FreeBSD+15.0-RELEASE+and+Ports.quarterly&format=html" rel="nofollow noreferrer noopener" target="_blank">man io</a> and it's implementation is in <a href="https://github.com/freebsd/freebsd-src/blob/main/sys/dev/io/iodev.c" rel="nofollow noreferrer noopener" target="_blank">sys/dev/io/iodev.c</a>.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">We do not need the interface to manage privileged access as FreeBSD does however it does provide us with the ability to manage abstractions where the IO area an application needs to access can and does vary. To date in RTEMS we have relied on hardware and BSPs returning the same address and us dealing with that be using defines in BSPs or applications. That is a hack and a bad one.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">This API is not for <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">mmap</code>. You can use <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">mmap</code> to get access to IO regions but that is your choice in your application. Support to use <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">mmap</code> to something we felt provided an easier interface for those coming to RTEMS from Unix. It does not little more.</p>
<h2 id="user-content-use-cases" dir="auto" style="margin-top: 20px; margin-bottom: 10px;" align="initial">Use cases<a href="#use-cases" aria-label="Link to heading 'Use cases'" data-heading-content="Use cases" class="anchor" style="margin-top: 0;"></a>
</h2>
<ol dir="auto" style="text-align: initial; margin: 0; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">PCIe where we can have devices on a bus on difference BSPs presenting different IO addresses. This driver presents the same device nodes and a consistent interface to an application can find the IO space and use it.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">VME bus for A16, A24 and A32 space. EPICS needs access to these address spaces to read and write to slave boards. Each board has a different address in memory for these IO spaces. If we provide an IO driver we can provide a consistent interface EPICS can use with out the need for conditional builds against specific hardware. Andrew Johnson recently asked if we support anything that can do this.</li>
</ol>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">

<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_150982">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/3-a4me61fbel5q4rvdh36no6agi/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_150982 at 1779676425
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_150982"}}</script>


</p>
</div>
</body>
</html>