comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: R/W hardware registers ?
Date: Fri, 30 Jun 2017 11:17:05 -0400
Date: 2017-06-30T11:17:05-04:00	[thread overview]
Message-ID: <jtpclc14oorfa03j3ehu52cpqlskn0efok@4ax.com> (raw)
In-Reply-To: f5d3adca-aa88-4d7e-a709-3e7092a1f683@googlegroups.com

On Fri, 30 Jun 2017 06:11:09 -0700 (PDT), patrick@spellingbeewinnars.org
declaimed the following:

>Thanks for answering my post. I am pretty sure you are right. I knew that DOS pretty much only has a root user and that user can access parallel ports and such and I knew that regular Posix users could not access hardware like this but I thought it could be by-passed with root access.
>
>However, if that was the case, people could still set pointers to hardware addresses in C and skip the use of outb(and similar calls).
>

	And you will find such restrictions in /any/ modern general purpose
multi-tasking OS* as they are designed to isolate the hardware from the
user.

	You have to descend to the realm of embedded RTOS to get direct
hardware access (and at that level, you likely have to write your own
device drivers anyway -- so getting close to creating a Linux kernel
module/driver to allow access from user-space).




* AmigaOS was a mixed blessing/bane -- it did not use memory protection,
all processes shared a flat memory space. This made it easy for a
mis-behaving process to kill the system, but it also made the IPC (message
ports => linked lists often carrying pointers to the data being passed)
very efficient -- and it needed to be as practically everything in the OS
went through message ports (opening a file sent IPC to file-handler process
[which new the filesystem]  which sent IPC to device handler [low-level
device access], etc.). Upgrading AmigaOS to use memory protection/virtual
memory would have required lots of overhead in copying/remapping IPC data
between the various processes.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


      parent reply	other threads:[~2017-06-30 15:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 22:38 R/W hardware registers ? patrick
2017-06-30  7:48 ` Jacob Sparre Andersen
2017-06-30 13:11   ` patrick
2017-06-30 14:40     ` patrick
2017-06-30 15:17     ` Dennis Lee Bieber [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox