Module driver - RMoX device driver infrastructure

RMoX device driver infrastructure. The driver-core (dcore) is responsible for managing device-drivers within RMoX.

Most device-drivers are hard-coded into the OS, availability selected through configuration directives (see rmox:config). Device drivers will typically have the process interface:

PROC device.driver (CT.DRIVER? link, SHARED LOG! log, VAL []BYTE options) or: PROC device.driver (CT.DRIVER? link, SHARED LOG! log, SHARED CT.DRIVER! to.driver, VAL []BYTE options)

Index

Declarations

video_util.inc:25Record VIDEO.MODELINE

DATA TYPE VIDEO.MODELINE

Video modeline type (XFree86 style).

video_util.inc:29Variable bpp

INT

Bits per pixel.

video_util.inc:30Variable vfreq

INT

Vertical refresh (Hz * 10).

video_util.inc:31Variable hfreq

INT

Horizontal refresh (Hz * 10).

video_util.inc:33Variable dcf

INT

Dot-clock frequency (kHz).

video_util.inc:34Variable hres

INT

Horizontal resolution.

video_util.inc:35Variable sh1, sh2, hfl

INT

Horizontal timing data.

video_util.inc:36Variable vres

INT

Vertical resolution.

video_util.inc:37Variable sv1, sv2, vfl

INT

Vertical timing data.

video_util.inc:38Variable neg.vs

BOOL

Negative vertical sync (else positive).

video_util.inc:39Variable neg.hs

BOOL

Negative horizontal sync (else positive).

video_util.inc:43Record VIDEO.SCREENINFO

DATA TYPE VIDEO.SCREENINFO

Video screen information (framebuffer style).

video_util.inc:47Variable bpp

INT

Bits per pixel.

video_util.inc:48Variable vfreq

INT

Vertical refresh (Hz * 10).

video_util.inc:49Variable hfreq

INT

Horizontal refresh (Hz * 10).

video_util.inc:51Variable xres, yres

INT

X and Y resolution.

video_util.inc:52Variable left.margin

INT

Left margin timing.

video_util.inc:53Variable right.margin

INT

Right margin timing.

video_util.inc:54Variable hsync.len

INT

Horizontal sync length.

video_util.inc:55Variable top.margin

INT

Top margin timing.

video_util.inc:56Variable bottom.margin

INT

Bottom margin timing.

video_util.inc:57Variable vsync.len

INT

Vertical sync length.

video_util.inc:58Variable pixclock

INT

Pixel clock (kHz).

video_util.inc:59Variable neg.vs

BOOL

Negative vertical sync (else positive).

video_util.inc:60Variable neg.hs

BOOL

Negative horizontal sync (else positive).

video_util.inc:64Record VIDEO.CRTC

DATA TYPE VIDEO.CRTC

Video screen information (CRT controller style).

video_util.inc:68Variable bpp

INT

Bits per pixel.

video_util.inc:69Variable vfreq

INT

Vertical refresh (Hz * 10).

video_util.inc:70Variable hfreq

INT

Horizontal refresh (Hz * 10).

video_util.inc:72Variable xres, yres

INT

X and Y resolution.

video_util.inc:73Variable pixclock

INT

Pixel clock (kHz).

video_util.inc:75Variable h.total

INT

Horizontal total.

video_util.inc:76Variable h.disp.end

INT

Horizontal display end.

video_util.inc:77Variable h.blank.start

INT

Horizontal blanking start.

video_util.inc:78Variable h.blank.end

INT

Horizontal blanking end.

video_util.inc:79Variable h.sync.start

INT

Horizontal sync start.

video_util.inc:80Variable h.sync.end

INT

Horizontal sync end.

video_util.inc:81Variable v.total

INT

Vertical total.

video_util.inc:82Variable v.disp.end

INT

Vertical display end.

video_util.inc:83Variable v.blank.start

INT

Vertical blanking start.

video_util.inc:84Variable v.blank.end

INT

Vertical blanking end.

video_util.inc:85Variable v.sync.start

INT

Vertical sync start.

video_util.inc:86Variable v.sync.end

INT

Vertical sync end.

video_util.inc:87Variable line.compare

INT

Line compare value (screen A/B).

video_util.inc:88Variable pitch

INT

Display pitch (VRAM bytes per line).

video_util.inc:89Variable neg.vs

BOOL

Negative vertical sync (else positive).

video_util.inc:90Variable neg.hs

BOOL

Negative horizontal sync (else positive).

video_util.occ:132Process video.find.builtin.mode

PROC video.find.builtin.mode (BOOL ok, VAL INT xres, yres, bpp, vfreq, hfreq, RESULT VIDEO.MODELINE mline)

Finds a built-in modeline for the specified parameters.

Parameters:

BOOL ok Check and set success.
VAL INT xres X resolution (pixels).
VAL INT yres Y resolution (pixels).
VAL INT bpp Bits per pixel.
VAL INT vfreq Vertical frequency (Hz * 10), 0 = don't care.
VAL INT hfreq Horizontal frequency (Hz * 10), 0 = don't care.
RESULT VIDEO.MODELINE mline Resulting modeline.

video_util.occ:163Process video.modeline.to.screeninfo

PROC video.modeline.to.screeninfo (VAL VIDEO.MODELINE mline, RESULT VIDEO.SCREENINFO sinfo)

Turns a modeline into screen information.

Parameters:

VAL VIDEO.MODELINE mline Input modeline.
RESULT VIDEO.SCREENINFO sinfo Resulting screen information.

video_util.occ:192Process video.screeninfo.to.crtc

PROC video.screeninfo.to.crtc (VAL VIDEO.SCREENINFO sinfo, RESULT VIDEO.CRTC crtc)

Turns screen information into CRT controller timing information.

Parameters:

VAL VIDEO.SCREENINFO sinfo Input screen information.
RESULT VIDEO.CRTC crtc Resulting CRT controller settings.

video_util.occ:257Process video.modeline.to.crtc

PROC video.modeline.to.crtc (VAL VIDEO.MODELINE mline, RESULT VIDEO.CRTC crtc)

Turns a modeline into CRT controller data.

Parameters:

VAL VIDEO.MODELINE mline Input modeline.
RESULT VIDEO.CRTC crtc Resulting CRT controller data.

video_util.occ:306Process video.bit.blt

PROC video.bit.blt (VAL INT src.addr, src.x, src.y, src.pitch, src.bpp, dst.addr, dst.x, dst.y, dst.pitch, dst.bpp, width, height)

Does a bit-blt between two framebuffers.

Parameters:

VAL INT src.addr Source framebuffer memory address.
VAL INT src.x Source X offset (pixels).
VAL INT src.y Source Y offset (pixels).
VAL INT src.pitch Source pitch.
VAL INT src.bpp Source bits-per-pixel.
VAL INT dst.addr Destination framebuffer memory address.
VAL INT dst.x Destination X offset (pixels).
VAL INT dst.y Destination Y offset (pixels).
VAL INT dst.pitch Destination pitch.
VAL INT dst.bpp Destination bits-per-pixel.
VAL INT width Width of area to copy (pixels).
VAL INT height Height of area to copy (pixels).

video_util.occ:318Process video.print.modeline

PROC video.print.modeline (VAL VIDEO.MODELINE mline, CHAN BYTE out!)

Prints a modeline to a BYTE channel.

Parameters:

VAL VIDEO.MODELINE mline Modeline.
CHAN BYTE out Channel to output to.

video_util.occ:381Process video.print.screeninfo

PROC video.print.screeninfo (VAL VIDEO.SCREENINFO sinfo, CHAN BYTE out!)

Prints screen information to a BYTE channel.

Parameters:

VAL VIDEO.SCREENINFO sinfo Screen information.
CHAN BYTE out Channel to output to.

video_util.occ:448Process video.print.crtc

PROC video.print.crtc (VAL VIDEO.CRTC crtc, CHAN BYTE out!)

Prints CRTC settings to a BYTE channel.

Parameters:

VAL VIDEO.CRTC crtc CRT controller settings.
CHAN BYTE out Channel to output to.

driver_utils.occ:43Process connect.shared.block

PROC connect.shared.block (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, dev.name, RESULT SHARED CT.BLOCK! dev)

Connect to a shared block device.

This is used by one device driver to connect to another, shared-block, device driver.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
VAL []BYTE dev.name Name of the target driver.
RESULT SHARED CT.BLOCK! dev Returned shared block device connection.

driver_utils.occ:91Process connect.shared.device

PROC connect.shared.device (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, dev.name, RESULT SHARED MOBILE.CHAN dev)

Connect to any shared device.

This is used by one device driver to connect to another, shared, device driver. The channel-end returned in dev is generic, caller should handle typing.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
VAL []BYTE dev.name Name of the target driver.
RESULT SHARED MOBILE.CHAN dev Returned shared device connection.

driver_utils.occ:138Process connect.device

PROC connect.device (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, dev.name, RESULT MOBILE.CHAN dev)

Connect to any device.

This is used by one device driver to connect to another device driver. The channel-end returned in dev is generic, caller should handle typing.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
VAL []BYTE dev.name Name of the target driver.
RESULT MOBILE.CHAN dev Returned device connection.

driver_utils.occ:184Process connect.shared.output

PROC connect.shared.output (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, dev.name, RESULT SHARED CT.OUTPUT! dev)

Connect to shared output device.

This is used by one device driver to connect to another, shared output (see CT.OUTPUT), device driver.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
VAL []BYTE dev.name Name of the target driver.
RESULT SHARED CT.OUTPUT! dev Returned shared output device connection.

driver_utils.occ:230Process connect.input

PROC connect.input (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, dev.name, RESULT CT.INPUT! dev)

Connect to input device.

This is used by one device driver to connect to another, input (see CT.INPUT), device driver.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
VAL []BYTE dev.name Name of the target driver.
RESULT CT.INPUT! dev Returned input device connection.

driver_utils.occ:276Process connect.output

PROC connect.output (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, dev.name, RESULT CT.OUTPUT! dev)

Connect to output device.

This is used by one device driver to connect to another, output (see CT.OUTPUT), device driver.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
VAL []BYTE dev.name Name of the target driver.
RESULT CT.OUTPUT! dev Returned output device connection.

driver_utils.occ:323Process connect.dnotify

PROC connect.dnotify (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, RESULT SHARED CT.DNOTIFY! dnotify)

Connect to the device notification driver.

This is used by a device driver to connect to the device notification driver (pseudo device), responsible for orchestrating rendezvous between different drivers.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
RESULT SHARED CT.DNOTIFY! dnotify Returned connection to the dnotify driver.

driver_utils.occ:353Process connect.kernel

PROC connect.kernel (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, RESULT SHARED CT.KERNEL! krnl)

Connect to the kernel during driver startup.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the the invoking driver.
RESULT SHARED CT.KERNEL! krnl Returned connection to the kernel.

driver_utils.occ:377Process connect.service.core

PROC connect.service.core (CT.DRIVER? link, SHARED LOG! log, BOOL ok, VAL []BYTE my.name, RESULT SHARED CT.SERVICE! service)

Connect to the service-core during driver startup.

Parameters:

CT.DRIVER? link Connection to parent driver (as server).
SHARED LOG! log System log channels.
BOOL ok Check and set for operation / success.
VAL []BYTE my.name Name of the invoking driver.
RESULT SHARED CT.SERVICE! service Returned connection to the service-core.