Browse Source

Plan 9 from Bell Labs Fourth Edition 2005-08-10

David du Colombier 19 years ago
parent
commit
964da6025a

+ 6 - 2
dist/replica/_plan9.db

@@ -7968,7 +7968,7 @@ sys/src/9/pc/memory.c - 664 sys sys 1071245460 13028
 sys/src/9/pc/mkfile - 664 sys sys 1067810339 3219
 sys/src/9/pc/mmu.c - 664 sys sys 1123438210 10452
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
-sys/src/9/pc/mp.c - 664 sys sys 1084475127 17013
+sys/src/9/pc/mp.c - 664 sys sys 1123637234 17024
 sys/src/9/pc/mp.h - 664 sys sys 1015014520 6575
 sys/src/9/pc/nv_dma.h - 664 sys sys 1081384508 12943
 sys/src/9/pc/pc - 664 sys sys 1079575705 1367
@@ -12235,7 +12235,7 @@ sys/src/cmd/ndb/convM2DNS.c - 664 sys sys 1060612175 7248
 sys/src/cmd/ndb/cs.c - 664 sys sys 1104854491 33070
 sys/src/cmd/ndb/csgetval.c - 664 sys sys 957402051 1051
 sys/src/cmd/ndb/csquery.c - 664 sys sys 1014926159 1062
-sys/src/cmd/ndb/dblookup.c - 664 sys sys 1087406287 18127
+sys/src/cmd/ndb/dblookup.c - 664 sys sys 1123602793 18275
 sys/src/cmd/ndb/dn.c - 664 sys sys 1090409399 26970
 sys/src/cmd/ndb/dnarea.c - 664 sys sys 1121977162 2128
 sys/src/cmd/ndb/dnnotify.c - 664 sys sys 1055701929 3062
@@ -14956,3 +14956,7 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/ndb/dns - 775 sys sys 1123643766 220090
+386/bin/ndb/dnsdebug - 775 sys sys 1123643767 194702
+386/bin/ndb/dnstcp - 775 sys sys 1123643767 193343
+sys/man/8/gpsfs - 664 sys sys 1123643451 4924

+ 6 - 5
dist/replica/plan9.db

@@ -331,10 +331,10 @@
 386/bin/ndb - 20000000775 sys sys 985743147 0
 386/bin/ndb/cs - 775 sys sys 1116126321 149237
 386/bin/ndb/csquery - 775 sys sys 1115950095 61476
-386/bin/ndb/dns - 775 sys sys 1119496651 219934
-386/bin/ndb/dnsdebug - 775 sys sys 1119496652 194546
+386/bin/ndb/dns - 775 sys sys 1123643766 220090
+386/bin/ndb/dnsdebug - 775 sys sys 1123643767 194702
 386/bin/ndb/dnsquery - 775 sys sys 1120619354 63643
-386/bin/ndb/dnstcp - 775 sys sys 1119496652 193187
+386/bin/ndb/dnstcp - 775 sys sys 1123643767 193343
 386/bin/ndb/ipquery - 775 sys sys 1116126323 95480
 386/bin/ndb/mkdb - 775 sys sys 1115950097 63982
 386/bin/ndb/mkhash - 775 sys sys 1115950097 83917
@@ -7679,6 +7679,7 @@ sys/man/8/drawterm - 664 sys sys 958419689 2458
 sys/man/8/fossilcons - 664 sys sys 1087406046 17788
 sys/man/8/fs - 664 sys sys 1055701170 15029
 sys/man/8/fsconfig - 664 sys sys 1045501600 8142
+sys/man/8/gpsfs - 664 sys sys 1123643451 4924
 sys/man/8/httpd - 664 sys sys 1121198377 6675
 sys/man/8/init - 664 sys sys 944959679 1430
 sys/man/8/ipconfig - 664 sys sys 1116383710 6170
@@ -7968,7 +7969,7 @@ sys/src/9/pc/memory.c - 664 sys sys 1071245460 13028
 sys/src/9/pc/mkfile - 664 sys sys 1067810339 3219
 sys/src/9/pc/mmu.c - 664 sys sys 1123438210 10452
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
-sys/src/9/pc/mp.c - 664 sys sys 1084475127 17013
+sys/src/9/pc/mp.c - 664 sys sys 1123637234 17024
 sys/src/9/pc/mp.h - 664 sys sys 1015014520 6575
 sys/src/9/pc/nv_dma.h - 664 sys sys 1081384508 12943
 sys/src/9/pc/pc - 664 sys sys 1079575705 1367
@@ -12235,7 +12236,7 @@ sys/src/cmd/ndb/convM2DNS.c - 664 sys sys 1060612175 7248
 sys/src/cmd/ndb/cs.c - 664 sys sys 1104854491 33070
 sys/src/cmd/ndb/csgetval.c - 664 sys sys 957402051 1051
 sys/src/cmd/ndb/csquery.c - 664 sys sys 1014926159 1062
-sys/src/cmd/ndb/dblookup.c - 664 sys sys 1087406287 18127
+sys/src/cmd/ndb/dblookup.c - 664 sys sys 1123602793 18275
 sys/src/cmd/ndb/dn.c - 664 sys sys 1090409399 26970
 sys/src/cmd/ndb/dnarea.c - 664 sys sys 1121977162 2128
 sys/src/cmd/ndb/dnnotify.c - 664 sys sys 1055701929 3062

+ 6 - 0
dist/replica/plan9.log

@@ -20757,3 +20757,9 @@
 1123439478 7 c sys/src/9/ppc/mmu.c - 664 sys sys 1123438210 4897
 1123446680 0 c sys/src/9/pc/etherigbe.c - 664 sys sys 1123445077 44186
 1123446680 1 c sys/src/boot/pc/etherigbe.c - 664 sys sys 1123445062 40477
+1123603314 0 c sys/src/cmd/ndb/dblookup.c - 664 sys sys 1123602793 18275
+1123637523 0 c sys/src/9/pc/mp.c - 664 sys sys 1123637234 17024
+1123644725 0 c 386/bin/ndb/dns - 775 sys sys 1123643766 220090
+1123644725 1 c 386/bin/ndb/dnsdebug - 775 sys sys 1123643767 194702
+1123644725 2 c 386/bin/ndb/dnstcp - 775 sys sys 1123643767 193343
+1123644725 3 a sys/man/8/gpsfs - 664 sys sys 1123643451 4924

+ 257 - 0
sys/man/8/gpsfs

@@ -0,0 +1,257 @@
+.TH GPSFS 8
+.SH NAME
+gpsfs, gpsevermore \- GPS time and position service
+.SH SYNOPSIS
+.B aux/gpsfs
+[
+.B -d
+.I device
+]
+[
+.B -b
+.I baud
+]
+[
+.B -s
+.I srvname
+]
+[
+.B -m
+.I mntpt
+]
+.PP
+.B aux/gpsevermore
+[
+.B -d
+.I device
+]
+[
+.B -b
+.I baud
+]
+[
+.B -n
+.I baud
+]
+[
+.B -l
+.I location
+]
+.SH DESCRIPTION
+.B Aux/gpsfs
+reads an NMEA-compatible serial GPS device and provides time and position
+through a file system, typically in
+.BR /mnt/gps .
+.PP
+It implements four files in the
+.B gps
+directory:
+.BR position ,
+.BR time ,
+.BR satellites ,
+and
+.BR raw .
+.PP
+The read-only
+.B position
+file contains one line of information in 9 tab-separated fields:
+.TP
+.I "fix quality
+0 means position data invalid, 1 means a 2D position is available, 2 means a 3D position is available.
+The value is 8, 9, or 10, respectively, when the fix data comes from a file rather than an actual GPS.
+.TP
+.I "zulu time
+universal coordinated time encoded as hhmmss followed by the character 'Z'.
+.TP
+.I "system time
+time and date converted to the format of
+.IR time (2).
+.TP
+.I longitude
+in degrees, east of Greenwich is positive, west negative.
+.TP
+.I latitude
+in degrees, positive is north, negative south of the equator.
+.TP
+.I altitude
+above sea level, in meters.
+.TP
+.I course
+degrees, clockwise from true north.
+.TP
+.I "ground speed
+in km/h
+.TP
+.I "magnetic deviation
+(not provided by all GPSs), in degrees, positive is westerly, negative easterly.
+.PP
+The read-only
+.B time
+file contains one line of information in 4 tab-separated fields:
+.TP
+.I "gps time
+in
+.IR time (2)
+format.
+.TP
+.I "gps time
+in
+.IR nsec (2)
+format (ms accuracy).
+.TP
+.I "system time
+in
+.IR nsec (2)
+format.  This is the system time at the time of the
+.I "gps time
+sample.  The difference between this and the previous field is used in clock
+synchronization.  See
+.IR timesync (8).
+.TP
+.I validity
+the character
+.B A
+meaning sample valid and usable for clock synchronization.  The other values are
+not usable for clock sync:
+.B B
+means valid sample from file playback,
+.B V
+means invalid sample, and
+.B W
+means invalid playback sample.
+.PP
+The read-only
+.B satellites
+file contains information about the current satellite constellation.  It consists
+of one line of general information, followed by zero or more lines, one for each satellite in use.
+The first line contains two fields:
+.TP
+.I "fix quality
+same as in the
+.B position
+file.
+.TP
+.I "satellites in view
+number of satellites above the horizon
+.PP
+Subsequent lines have four fields:
+.TP
+.I prn
+satellite ID
+.TP
+.I elevation
+above the horizon, degrees.
+.TP
+.I azimuth
+direction, degrees from true north
+.TP
+.I snr
+Signal to noise ratio, 0 - 99 dB
+.PP
+The contents of these files are refreshed once per second when reading from an actual GPS,
+and once per 100 ms (giving a speed up of a factor 10) when playing back from file.
+.PP
+The read-only
+.B raw
+file can be read to obtain a copy of the raw NMEA GPS output.
+.I Gpsfs
+keeps an internal buffer of 8KB, so the reader must keep up with the output
+(typically 500 or so bytes per second).
+.PP
+The
+.B \-d
+flag establishes the device the GPS samples are read from.  If the device file is not
+a serial interface,
+.I gpsfs
+assumes playback from file and modifies quality parameters as such.
+.PP
+The
+.B \-b
+flag specifies the baud rate of the serial line.  The standard baud rate for NMEA
+GPS is 4800 baud, but many device allow changing to higher speeds.
+.PP
+The
+.B \-s
+flag specifies the name under which the
+.I gpsfs
+service is posted in
+.BR /srv .
+.PP
+The
+.B \-m
+flag specifies a mount mount other than
+.BR /mnt .
+.PP
+.B Aux/gpsevermore
+is used to configure GPSs using an Evermore chipset.
+.PP
+The
+.B \-d
+flag specifies the serial device to the GPS.
+.PP
+The
+.B \-b
+flag specifies the baud rate of the serial line.  The standard baud rate for NMEA
+GPS is 4800 baud, but many device allow changing to higher speeds.
+.PP
+The
+.B \-n
+flag specifies the speed to set the GPS to.  When the command finishes, the
+GPS should be read (and configured) at the new speed.
+.PP
+The
+.B \-l
+flag is sued to specify the location to initialize the GPS to.  The format is
+.B dd:mm:ssX
+or
+.B dd:mm.mmmX
+or
+.BR dd.dddX ,
+where
+.B dd
+stands for degrees (one or more digits),
+.B mm
+for minutes and
+.B ss
+for seconds of arc.
+.B X
+is one of
+.BR W ,
+.BR E ,
+.B N
+or
+.BR S .
+Longitudes come with
+.B W
+or
+.BR E ,
+latitudes with
+.B N
+or
+.BR S .
+The
+.B \-l
+flag is followed by two such fields, one for longitude, one for latitude.  They may be
+given in a single argument (separated by white space), or in two arguments, in either order.
+Initialization time is taken from
+.IR time (2).
+.SH "SEE ALSO
+.IR timesync (2),
+.IR time (2),
+.IR nsec (2).
+.SH FILES
+.TF /mnt/gps/satellites
+.TP
+.B /mnt/gps/position
+position, time, speed and heading
+.TP
+.B /mnt/gps/satellites
+satellites in view
+.TP
+.B /mnt/gps/time
+GPS time (millisecond accuracy)
+.TP
+.B /dev/eia0
+default GPS device
+.SH SOURCE
+.B /sys/src/cmd/aux/gps

+ 1 - 1
sys/src/9/pc/mmu.c

@@ -261,7 +261,7 @@ checkmmu(ulong va, ulong pa)
 	
 	pte = KADDR(PPN(pdb[pdbx]));
 	if((pte[PTX(va)]&~4095) != pa)
-		print("%d %s: va=0x%08ux pa=0x%08ux pte=0x%08ux\n",
+		print("%ld %s: va=0x%08lux pa=0x%08lux pte=0x%08lux\n",
 			up->pid, up->text,
 			va, pa, pte[PTX(va)]);
 }

+ 2 - 0
sys/src/9/pc/mp.c

@@ -369,6 +369,8 @@ squidboy(Apic* apic)
 	syncclock();
 	timersinit();
 
+	fpoff();
+
 	lock(&active);
 	active.machs |= 1<<m->machno;
 	unlock(&active);

+ 1 - 1
sys/src/9/port/sysproc.c

@@ -14,7 +14,7 @@ int	shargs(char*, int, char**);
 extern void checkpages(void);
 
 long
-sysr1(ulong *arg)
+sysr1(ulong*)
 {
 	checkpages();
 	return 0;

+ 6 - 0
sys/src/cmd/ndb/dblookup.c

@@ -416,6 +416,12 @@ soarr(Ndbtuple *entry, Ndbtuple *pair)
 	rp->soa->retry = Hour;
 	rp->soa->expire = Day;
 	rp->soa->minttl = Day;
+	t = look(entry, pair, "retry");
+	if(t)
+		rp->soa->retry = atoi(t->val);
+	t = look(entry, pair, "expire");
+	if(t)
+		rp->soa->expire = atoi(t->val);
 	t = look(entry, pair, "ttl");
 	if(t)
 		rp->soa->minttl = atoi(t->val);