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 .nf
.B bind #v /dev .B bind #v /dev
.B /dev/vgabios
.B /dev/vgactl .B /dev/vgactl
.B /dev/vgaovl .B /dev/vgaovl
.B /dev/vgaovlctl .B /dev/vgaovlctl
@ -23,10 +22,6 @@ it is used to implement configuration and setup of VGA controller cards.
This is usually performed by This is usually performed by
.IR vga (8). .IR vga (8).
.PP .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 Writing strings to
.B vgactl .B vgactl
configures the VGA device. configures the VGA device.

View file

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

View file

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