From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: R/W hardware registers ? Date: Fri, 30 Jun 2017 09:48:32 +0200 Organization: JSA Research & Innovation Message-ID: <87zicpykz3.fsf@jacob-sparre.dk> References: NNTP-Posting-Host: 109.57.87.176.mobile.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: franka.jacob-sparre.dk 1498808912 29111 109.57.87.176 (30 Jun 2017 07:48:32 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 30 Jun 2017 07:48:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:MckyKdjW18xxM7Fyj9xHE51olCU= Xref: news.eternal-september.org comp.lang.ada:47210 Date: 2017-06-30T09:48:32+02:00 List-Id: patrick@spellingbeewinnars.org writes: > Assuming these: > 1)It's just hobby fun > 2)I am the only user > 3)it's on Posix, normally linux > 4)I am interacting with CPU-less, passive circuitry > > Then do you see any major problems with just reading and writing to a > device's registers though root access and without a kernel API? Yes. I'm pretty sure even processes running with UID = 0 have to go through the kernel for accessing the hardware. If you switch to DOS or some other "operating system" without memory management, it is a different story, but POSIX operating systems are supposed to provide memory management, and that blocks direct hardware access outside the kernel. But what's wrong with binding ioperm() and outb() to Ada? Greetings, Jacob -- "Human beings just can't not communicate."