devvga: removing #v/vgabios, use /dev/realmodemem instead

This commit is contained in:
cinap_lenrek 2017-12-23 04:26:50 +01:00
parent 50bea0348c
commit 96eb90fba1
3 changed files with 1 additions and 16 deletions

View file

@ -5,7 +5,6 @@ vga \- VGA controller device
.nf
.B bind #v /dev
.B /dev/vgabios
.B /dev/vgactl
.B /dev/vgaovl
.B /dev/vgaovlctl
@ -23,10 +22,6 @@ it is used to implement configuration and setup of VGA controller cards.
This is usually performed by
.IR vga (8).
.PP
.B Vgabios
provides read-only access to the low 640kB of memory,
where the VGA and other BIOS ROMs are located.
.PP
Writing strings to
.B vgactl
configures the VGA device.

View file

@ -17,7 +17,6 @@
enum {
Qdir,
Qvgabios,
Qvgactl,
Qvgaovl,
Qvgaovlctl,
@ -25,7 +24,6 @@ enum {
static Dirtab vgadir[] = {
".", { Qdir, 0, QTDIR }, 0, 0550,
"vgabios", { Qvgabios, 0 }, 0x100000, 0440,
"vgactl", { Qvgactl, 0 }, 0, 0660,
"vgaovl", { Qvgaovl, 0 }, 0, 0660,
"vgaovlctl", { Qvgaovlctl, 0 }, 0, 0660,
@ -155,14 +153,6 @@ vgaread(Chan* c, void* a, long n, vlong off)
case Qdir:
return devdirread(c, a, n, vgadir, nelem(vgadir), devgen);
case Qvgabios:
if(offset >= 0x100000)
return 0;
if(offset+n >= 0x100000)
n = 0x100000 - offset;
memmove(a, (uchar*)kaddr(0)+offset, n);
return n;
case Qvgactl:
scr = &vgascreen[0];

View file

@ -245,7 +245,7 @@ doreadbios(char* buf, long len, long offset)
if(biosfd < 0)
biosfd = open("/dev/realmodemem", OREAD);
if(biosfd < 0)
biosfd = devopen("#v/vgabios", OREAD);
biosfd = open("#P/realmodemem", OREAD);
if(biosfd < 0)
return -1;
seek(biosfd, offset, 0);