9front - general discussion about 9front
 help / color / mirror / Atom feed
* termrc and aux/realemu
@ 2014-08-14  1:40 kokamoto
  2014-08-14  2:17 ` [9front] " Nick Owens
  0 siblings, 1 reply; 15+ messages in thread
From: kokamoto @ 2014-08-14  1:40 UTC (permalink / raw)
  To: 9front

Please rewrite the /rc/bin/termrc to load aux/realemu, 
enen if we have
monitor=vesa
vgasize=...x...x..
lines in the plan9.ini file.

Kenji



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-14  1:40 termrc and aux/realemu kokamoto
@ 2014-08-14  2:17 ` Nick Owens
  2014-08-15  0:10   ` kokamoto
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Owens @ 2014-08-14  2:17 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

kenji,

termrc does call aux/realemu at line 107.

		@{
			rfork n
			if(~ $monitor vesa)
				aux/realemu
			aux/vga -l $vgasize
		}

what is the problem with it?

On Thu, Aug 14, 2014 at 10:40:59AM +0900, kokamoto@hera.eonet.ne.jp wrote:
> Please rewrite the /rc/bin/termrc to load aux/realemu, 
> enen if we have
> monitor=vesa
> vgasize=...x...x..
> lines in the plan9.ini file.
> 
> Kenji
> 

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-14  2:17 ` [9front] " Nick Owens
@ 2014-08-15  0:10   ` kokamoto
  2014-08-15  0:28     ` Nick Owens
  2014-08-15  0:46     ` sl
  0 siblings, 2 replies; 15+ messages in thread
From: kokamoto @ 2014-08-15  0:10 UTC (permalink / raw)
  To: 9front

I don't like shell script, so this is from my experience.

 termrc does call aux/realemu at line 107.
> 
> 		@{
> 			rfork n
> 			if(~ $monitor vesa)
> 				aux/realemu
> 			aux/vga -l $vgasize
> 		}
> 
> what is the problem with it?

This is called only when vga and vgasize are set to be
asked?
I had to write aux/realemu line expricitly in
/cfg/xxx/termrc file.

Have you tested it when you have
monitor=vesa
vgasize=...x...x..?

Kenji



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-15  0:10   ` kokamoto
@ 2014-08-15  0:28     ` Nick Owens
  2014-08-15  0:46     ` sl
  1 sibling, 0 replies; 15+ messages in thread
From: Nick Owens @ 2014-08-15  0:28 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

On Fri, Aug 15, 2014 at 09:10:35AM +0900, kokamoto@hera.eonet.ne.jp wrote:
> This is called only when vga and vgasize are set to be
> asked?
> I had to write aux/realemu line expricitly in
> /cfg/xxx/termrc file.
> 
> Have you tested it when you have
> monitor=vesa
> vgasize=...x...x..?
> 
> Kenji
> 

in my thinkpad X301 plan9.ini is:

monitor=vesa
vgasize=1440x900x32

it works. when i tcpboot to my fileserver, rio starts automatically.

working as intended :-)

do you get any messages on the console when aux/realemu doesn't run?


[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-15  0:10   ` kokamoto
  2014-08-15  0:28     ` Nick Owens
@ 2014-08-15  0:46     ` sl
  2014-08-16  0:14       ` kokamoto
  2014-08-16  0:17       ` kokamoto
  1 sibling, 2 replies; 15+ messages in thread
From: sl @ 2014-08-15  0:46 UTC (permalink / raw)
  To: 9front

> I don't like shell script, so this is from my experience.
> 
>  termrc does call aux/realemu at line 107.
> > 
> > 		@{
> > 			rfork n
> > 			if(~ $monitor vesa)
> > 				aux/realemu
> > 			aux/vga -l $vgasize
> > 		}
> > 
> > what is the problem with it?
> 
> This is called only when vga and vgasize are set to be
> asked?
> I had to write aux/realemu line expricitly in
> /cfg/xxx/termrc file.
> 
> Have you tested it when you have
> monitor=vesa
> vgasize=...x...x..?

I think we may be misunderstanding what your situation is. The language
is too ambiguous. Can you please:

1.) describe what you did
2.) describe what you expected to happen
3.) describe what actually happened

Thanks!

sl


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-15  0:46     ` sl
@ 2014-08-16  0:14       ` kokamoto
  2014-08-16  0:17       ` kokamoto
  1 sibling, 0 replies; 15+ messages in thread
From: kokamoto @ 2014-08-16  0:14 UTC (permalink / raw)
  To: 9front


> I think we may be misunderstanding what your situation is. The language
> is too ambiguous. Can you please:
> 
> 1.) describe what you did
> 2.) describe what you expected to happen
> 3.) describe what actually happened

Ok.
my /rc/bin/termrc is the same as distribution.
My termrc.local has only one line of
TIMESYNCARGS=(-n ntp.jst.mfeed.ad.jp)

/cfg/pxe/xxxxx file is as follows:
#saturn C2D machine
bootfile=/386/9pcf
bootargs=tcp
fs=192.168.11.5
auth=192.168.11.5
mouseport=ps2intellimouse
monitor=vesa
#monitor=s2231wA
#vgasize=1024x768x16
vgasize=1400x1050x16
#vgasize=1680x1050x32
#vgasize=1600x1200x32

and /cfg/saturn/termrc has a line of
#!/bin/rc
aux/realemu



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-15  0:46     ` sl
  2014-08-16  0:14       ` kokamoto
@ 2014-08-16  0:17       ` kokamoto
  2014-08-16  0:52         ` cinap_lenrek
  1 sibling, 1 reply; 15+ messages in thread
From: kokamoto @ 2014-08-16  0:17 UTC (permalink / raw)
  To: 9front


> I think we may be misunderstanding what your situation is. The language
> is too ambiguous. Can you please:
> 
> 1.) describe what you did
> 2.) describe what you expected to happen
> 3.) describe what actually happened

Ok.
my /rc/bin/termrc is the same as distribution.
My termrc.local has only one line of
TIMESYNCARGS=(-n ntp.jst.mfeed.ad.jp)

/cfg/pxe/xxxxx file is as follows:
#saturn C2D machine
bootfile=/386/9pcf
bootargs=tcp
fs=192.168.11.5
auth=192.168.11.5
mouseport=ps2intellimouse
monitor=vesa
#monitor=s2231wA
#vgasize=1024x768x16
vgasize=1400x1050x16
#vgasize=1680x1050x32
#vgasize=1600x1200x32

and /cfg/saturn/termrc has a line of
#!/bin/rc
aux/realemu

If I don't have the last file, it bootup with no problem.
However there is no /dev/realmode file.
To have this file I have to have the last file.

Is this Ok?

Kenji



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-16  0:17       ` kokamoto
@ 2014-08-16  0:52         ` cinap_lenrek
  2014-08-16  5:39           ` kokamoto
  0 siblings, 1 reply; 15+ messages in thread
From: cinap_lenrek @ 2014-08-16  0:52 UTC (permalink / raw)
  To: 9front

kenji, why do you need /dev/realmode file? the file is only used
when setting up graphics with the vesa driver which is done in
termrc. the reason you do not see the file is because termrc
*intentionally* forks the namespace and runs aux/realemu
and aux/vga in that namespace. so we wont clutter /dev
with slow userspace fileservers. it also doesnt start
realemu when you'r not using vesa. this is all intentional.

why do you need /dev/realmode file? why do you not just
set monitor=vesa and vgasize= variable to set graphics mode?
do you wish to set up graphics later in your own scripts?
in that case, you can just run aux/realemu yourself there
before running aux/vga. what are you trying todo?

--
cinap


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-16  0:52         ` cinap_lenrek
@ 2014-08-16  5:39           ` kokamoto
  0 siblings, 0 replies; 15+ messages in thread
From: kokamoto @ 2014-08-16  5:39 UTC (permalink / raw)
  To: 9front

> the reason you do not see the file is because termrc
> *intentionally* forks the namespace and runs aux/realemu
> and aux/vga in that namespace. so we wont clutter /dev
> with slow userspace fileservers. it also doesnt start
> realemu when you'r not using vesa. this is all intentional.

Ok, I got you intentionaly did so. Then,
I don't undestand why /dev/realmode makes the system slow.

> why do you need /dev/realmode file? why do you not just
> set monitor=vesa and vgasize= variable to set graphics mode?
> do you wish to set up graphics later in your own scripts?
> in that case, you can just run aux/realemu yourself there
> before running aux/vga. what are you trying todo?

Why we need to separate this.
You don't want user mode device should not appear in /dev?
We couldn't have /dev/realmode anytime?

If it's not good, we should make aux/vga do it automatically.
I'm wrong?

Kenji



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-17  1:54   ` cinap_lenrek
@ 2014-08-17  4:22     ` kokamoto
  0 siblings, 0 replies; 15+ messages in thread
From: kokamoto @ 2014-08-17  4:22 UTC (permalink / raw)
  To: 9front

> conflating aux/vga with realemu isnt right in my opinion.
> realemu can be used in many different ways and is not limited
> to running vesa bios code (see comload) and aux/vga has no
> need to depend on it directly.

Thanks cinap for kind explanation.

Kenji



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-16 23:42 ` kokamoto
@ 2014-08-17  1:54   ` cinap_lenrek
  2014-08-17  4:22     ` kokamoto
  0 siblings, 1 reply; 15+ messages in thread
From: cinap_lenrek @ 2014-08-17  1:54 UTC (permalink / raw)
  To: 9front

every video mode is special. aux/vga does special stuff for
every one of them like mapping mmio registers from named
hardware segments or reading/writing special control files
of the kernel half driver. vesa works with doing vesa bios
calls. /dev/realmode was initially provided by the kernel,
by doing a mode switch to realmode and executing the code.

with realemu /dev/realmode is provided by userspace fileserver
which binds over /dev and hides the kernel mode /dev/realmode
files.

these days, 9front has no kernel mode /dev/realmode anymore
as realemu works good enougth and realmode isnt even available
in 64 bit kernel. the modularity remains. this is good for
debugging, as you can run realemu with tracing modes
that let you see what io ports are read and written by
the video bios code. also, mounting and unmounting lets
us make snapshots of the bios memory areas to rerun tests
from a defined state the video bios memory. (theres the
vbt program and scripts to try to bruteforce hidden video
modes that uses this).

conflating aux/vga with realemu isnt right in my opinion.
realemu can be used in many different ways and is not limited
to running vesa bios code (see comload) and aux/vga has no
need to depend on it directly.

--
cinap


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-16  5:55 sl
@ 2014-08-16 23:42 ` kokamoto
  2014-08-17  1:54   ` cinap_lenrek
  0 siblings, 1 reply; 15+ messages in thread
From: kokamoto @ 2014-08-16 23:42 UTC (permalink / raw)
  To: 9front

> All you need to do in this case is start realemu again before running aux/vga.
> This is all explained in the realemu(8) man page.

then, my question is why the vesa mode is special as compared
to other vga devices?   If aux/vga can do this automatically,
we don't need to bother with it...

Kenji



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
@ 2014-08-16  5:55 sl
  2014-08-16 23:42 ` kokamoto
  0 siblings, 1 reply; 15+ messages in thread
From: sl @ 2014-08-16  5:55 UTC (permalink / raw)
  To: 9front

> I don't like shell script, however, I think I kew this.
> Why you don't need /dev/realmode?

Well, consider the problem /dev/realmode is solving. How many times in an
average session do you need to interrogate your VESA BIOS? As cinap explained,
there is no reason to keep it around after graphics are initialized.


> I had to set up which mode is supported by my AMD card,
> then, I did
> aux/vga -i
> then, I was said there is no /dev/realmode...

All you need to do in this case is start realemu again before running aux/vga.
This is all explained in the realemu(8) man page.

sl


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
  2014-08-16  0:40 sl
@ 2014-08-16  5:29 ` kokamoto
  0 siblings, 0 replies; 15+ messages in thread
From: kokamoto @ 2014-08-16  5:29 UTC (permalink / raw)
  To: 9front

> The realemu program did run (this is why graphics mode succeeded
> in running) but the /dev/realmode file is not in your namespace.
> The default /rc/bin/termrc does this:
> 
> 		@{
> 			rfork n
> 			if(~ $monitor vesa)
> 				aux/realemu
> 			aux/vga -l $vgasize
> 		}
> 
> which forks a new namespace before running realemu. Your
> /cfg/saturn/termrc is running another copy of realemu without
> forking the namespace, so you still see /dev/realmode everywhere
> in your environment after rio is started.

I don't like shell script, however, I think I kew this.
Why you don't need /dev/realmode?
I had to set up which mode is supported by my AMD card,
then, I did
aux/vga -i
then, I was said there is no /dev/realmode...

Kenji



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] termrc and aux/realemu
@ 2014-08-16  0:40 sl
  2014-08-16  5:29 ` kokamoto
  0 siblings, 1 reply; 15+ messages in thread
From: sl @ 2014-08-16  0:40 UTC (permalink / raw)
  To: 9front

> If I don't have the last file, it bootup with no problem.
> However there is no /dev/realmode file.
> To have this file I have to have the last file.

The realemu program did run (this is why graphics mode succeeded
in running) but the /dev/realmode file is not in your namespace.
The default /rc/bin/termrc does this:

		@{
			rfork n
			if(~ $monitor vesa)
				aux/realemu
			aux/vga -l $vgasize
		}

which forks a new namespace before running realemu. Your
/cfg/saturn/termrc is running another copy of realemu without
forking the namespace, so you still see /dev/realmode everywhere
in your environment after rio is started.

sl


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-08-17  4:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14  1:40 termrc and aux/realemu kokamoto
2014-08-14  2:17 ` [9front] " Nick Owens
2014-08-15  0:10   ` kokamoto
2014-08-15  0:28     ` Nick Owens
2014-08-15  0:46     ` sl
2014-08-16  0:14       ` kokamoto
2014-08-16  0:17       ` kokamoto
2014-08-16  0:52         ` cinap_lenrek
2014-08-16  5:39           ` kokamoto
2014-08-16  0:40 sl
2014-08-16  5:29 ` kokamoto
2014-08-16  5:55 sl
2014-08-16 23:42 ` kokamoto
2014-08-17  1:54   ` cinap_lenrek
2014-08-17  4:22     ` kokamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).