On 8 Mar 2023, at 04:07, Rob Gingell
<gingell(a)computer.org> wrote:
On 3/6/23 12:51 AM, Paul Ruizendaal via TUHS wrote:
I’ve now read through SunOS man pages and it
would seem that the /dev/fb file was indeed similar to /dev/fbdev on Linux 15 years later.
Not quite the same though, as initially it seems to have been tied to the kernel part of
the SunWindows software.
/dev/fb was a basic device-independent interface that indirected to the hardware that was
actually installed for operations like open(), ioctl(), and mmap(). Through those the
window systems figured out what they were actually working with. The (4S) man pages had
entries for each of the frame buffers and graphics processors if you're able to find
them.
Sunview did have some kernel support but /dev/fb and the support of mmap() were more
generic and used by the non-kernel parts of the window systems (as well as diagnostics).
Sun had quite a collection of frame buffers through the years, including oscillating
usage of graphics accelerators that might be viewed as wobbles in the wheel rather than
true rotation per Sutherland's paper.
(Cultural note: the Computer History Museum published a 2-part oral history with Ivan
Sutherland, and its home page currently features the interviews. The first part can be
found at
https://youtu.be/Bjr7qLeyvlw. Each part is several hours long.)
On 3/6/23 12:51 AM, Paul Ruizendaal via TUHS wrote:
The later Linux usage is designed around mmap()
and I am not sure when that arrived in SunOS (the mmap call exists in the manpages of
4.2BSD, but was not implemented at that time). Maybe at the time of the Sun-1 and Sun-2 it
worked differently.
mmap() was in SunOS starting (I believe) with the BSD-derived SunOS 1.x. Prior to 4.0 it
could be used with character devices that supported being mapped into an address space:
frame buffers, graphics accelerators, and the bus address spaces of VME or Multibus being
possible sources. There might have been others that I'm not recalling now.
The implementation had a number of restrictions from the BSD specification. All mappings
had to be MAP_SHARED. The caller had to specify (page-aligned) addresses within its data
segment as the process address space had the traditional text, data, and stack segments
vs. being available as a vector of pages.
Thank you for those clarifications.
The man pages for SunOS 1.1 (March ’84) are available on Bitsavers and your comments
helped me along. Your memory is correct: the man pages for SunOS 1.1 describe it that way,
and this description matches with the mmap kernel code in 4.2BSD (it is ifdef'ed out
there; I had always assumed it was non-functional, but now it seems to have been a Sun
special -- unfortunately there is no matching driver in the 4.2BSD tree).
As far as I can tell, in SunOS 1.1 mmap only worked on the frame buffer device. Its mmap
implementation mapped out the normal memory pages for a data area and then mapped in the
frame buffer location into that area; I suppose this means that the data area of graphics
programs contained a large array as a placeholder for this space.
With that knowledge it is I think safe to say that SunOS had an mmap’ed frame buffer
device file as its access abstraction from its earliest days and that this design did not
really change throughout the lifetime of SunOS (it is still there in version 4.1.3).
It is then surprising that Linux did not come up with /dev/fbdev until 1999, especially in
view of the importance of X to the early Linux developers. Maybe the reason was that the
headache of video drivers was delegated to the XFree community.