Commit graph

7992 commits

Author SHA1 Message Date
cinap_lenrek d49b9e1b84 etheriwl: remove stations *after* disabling binding quotas, drain all queues in rxoff7000() 2020-10-05 22:42:13 +02:00
cinap_lenrek 2aff96f17c etheriwl: add for Intel Wireless-AC 9260
the 9000 series uses a new receive descriptor format
wich appears to reqire 4k aligned buffers. the old
format "halfworks" and just makes the firmware not
respond to any commands after the enable paging command.

the smartfifo command appears to causes problems.
but apparently not issuing it at all seems to work
fine on both the 8265 and 9260. so removing the code
for now.

issuing the bindingquota command before associated
makes association impossible. but enabling afterwards
works fine. (tested in 8265 and 9260).

the prph access functions now mask the address with
0xfffff. it is unclear why linux and openbsd drivers
specify addresses beyond that in ther register constants.

the timeevent change is interesting. the timeevent
needs to be restarted when it has stoped to make sure
probing/association packets are sent during the evnet.
2020-10-04 21:10:53 +02:00
kvik fa1d6ffd83 bootrc: allow kbmap to be set via plan9.ini (thanks Aaron Bieber) 2020-10-01 17:47:52 +02:00
Ori Bernstein c63cd980a4 acme: revert stray changes
forgot I had local changes when testing, re-revert scrolling.
2020-09-29 07:28:47 -07:00
Ori Bernstein fb42cf0dda vncv: implement rfb 3.8 protocol (thanks Iruatã)
Gnome and bhyve's VNC servers implement the RFB 3.8
protocol, so we need to support it in the client in
order to connect.
2020-09-27 09:43:43 -07:00
Ori Bernstein 16766169e2 aux/vga: eepc igfx support (thanks p.kosyh)
This patch to makes 1024x600x32 work. Without it
only 800x600 is supported.

To load this mode, run:

	aux/vga -m eeepc -l 1024x600x32
2020-09-26 20:47:17 -07:00
Ori Bernstein d9f9e10e7b upas: convert to tmdate, change timezone format
Complete the conversion of upas to remove ctime,
use the new date library, and print time zones
in +hhmm format, instead of NNN format.

This may affect code that expects specific names
for timezones. Fix that code.
2020-09-26 11:20:42 -07:00
Ori Bernstein 9afa5550f7 tmdate(1): fix missing arg, fix formatting (thanks joe9) 2020-09-25 21:22:47 -07:00
Ori Bernstein eb6b1e672c merge 2020-09-25 16:51:08 -07:00
Ori Bernstein 022bc980b8 tmdate(2): fix mistakes in prototype (thanks moody) 2020-09-25 16:32:32 -07:00
Sigrid 878911b628 aux/acpi: connect EC region handler, fixes battery status on eeepc 1000px (thanks Peter Kosyh) 2020-09-25 10:28:25 +02:00
kvik 2968225196 syscall: fix build problem caused by stale tab.h
Recently the script which generates tab.h and the code including it got
incompatibly changed.  People reported problems involving syntax errors
when trying to rebuild the system following a sysupdate.

The problem was with the script being embedded within a mkfile rule,
meaning that mk didn't notice it changing and therefore didn't rebuild
the target file.  For people who were rebuilding the system this meant
that the old tab.h got included, causing syntax errors.

This patch moves the codegen script into a file and tells mk about this
new dependency, so that tab.h will get rebuilt for everyone.  I also
took an opportunity to rewrite the script, hopefuly making it easier to
follow.
2020-09-23 17:17:52 +02:00
Alex Musolino 23de6808f7 ftpd: handle "allo" command by treating it as a no-op
RFC959 says:

	"The ALLO command should be treated as a NOOP (no
	operation) by those servers which do not require
	that the maximum size of the file be declared
	beforehand..."
2020-09-23 12:44:05 +09:30
Ori Bernstein 9f8d62ab64 libc: ignore '?' in date format strings
Ignoring '?' when formatting date strings allows
the format strings to be reused for parsing. This
is convenient, since we don't need to duplicate
the format strings.
2020-09-22 19:24:01 -07:00
Ori Bernstein 77c3cb50fb libc: make yday 0-based, as docs suggest
Tm.yday is docuemnted as being 0-based, and our new api
should respect that. Fix the code so that this is true.
2020-09-22 19:21:51 -07:00
Ori Bernstein 313aebb964 acme: import changes from plan9port (thanks jxy)
Import the following improvements and bugfixes from plan9port:

	4650064a acme: scale window bodies on resize, not including tag space
	d28913a9 acme: save/restore multiline tags in Dump/Load
	d2df5d6c acme: fix crash in X |cat with multiple windows
	3d6e5cb5 acme: preserve window position and selection during Get
2020-09-22 11:42:15 -07:00
Ori Bernstein c1c904776c ape/limits.h: fix typo in (U)LLONG_MAX
Fix missing 'L' in the size suffix, so we were overflowing the
maximum size.
2020-09-21 11:43:31 -07:00
Ori Bernstein 8fe1d622b5 diff: support unified diff via -u
The format produced by `diff -u` is inferior to that
produced by `diff -c`, but it's what ape/patch and
unix patch expect, so it's useful to generate it.

This patch adds `diff -u`.
2020-09-21 09:40:42 -07:00
kvik aa7c8cac11 syscall: utility overhaul
Following is a list of functional changes:

* The -o flag outputs the entire buffer to the length returned
  by the syscall, or, in case of fd2path(2) and errstr(2), to '\0'.
* The -x flag is removed; the above makes it possible to pipe
  into xd(1) to get the same result.
* The -s flag uses dirfmt(2) to format the stat message, instead
  of trying to imitate ls(1).
* Stderr reports are normalized and made easier to parse.

The code also suffered a number of stylistic changes.
2020-09-20 14:49:12 +02:00
Ori Bernstein e3166b4fe8 upas/fs: fix handing of multi-line header fields (thanks theinicke)
Right now, upasfs exposes header lines as is, without stripping
out new lines. It also documents that it provides one header per
line in the info file.

As a result, when we get a mail with headers that span lines,
our tools get confused.

These split lines are not semantically meaningful. From RFC5322:

  2.2.3.  Long Header Fields

   Each header field is logically a single line of characters comprising
   the field name, the colon, and the field body.  For convenience
   however, and to deal with the 998/78 character limitations per line,
   the field body portion of a header field can be split into a
   multiple-line representation; this is called "folding".  The general
   rule is that wherever this specification allows for folding white
   space (not simply WSP characters), a CRLF may be inserted before any
   WSP.

As a result, to simplify processing, we should just strip out the
line separators when exposing the headers from upasfs.
2020-09-17 16:11:10 -07:00
BurnZeZ 77b819d585 ptrap: fix /env/status always being set on main process exit 2020-09-16 20:45:49 +00:00
kvik be876a06ac syscall: don't append '\n' to the output 2020-09-16 13:18:43 +02:00
kvik 58861fff63 window: fix error exit with the -m flag
When called with the -m flag window would always exit with
some error, usually status='no match', because of an if-match
being the last status-setting command in the script.
2020-09-16 13:12:13 +02:00
kvik 537443d959 win: fix window recreation command 2020-09-16 12:41:24 +02:00
stanley lieber 556609be56 /lib/rob, /lib/rsc, /lib/theo: So it sounds like everyone is in favor of the entire generics proposal and all the semantics, and all we have left to hammer out is the bracket characters? Do I have that right? 2020-09-14 23:10:16 -04:00
cinap_lenrek d3ebd02bef merge 2020-09-13 20:34:30 +02:00
cinap_lenrek 4f85115526 kernel: massive pci code rewrite
The new pci code is moved to port/pci.[hc] and shared by
all ports.

Each port has its own PCI controller implementation,
providing the pcicfgrw*() functions for low level pci
config space access. The locking for pcicfgrw*() is now
done by the caller (only port/pci.c).

Device drivers now need to include "../port/pci.h" in
addition to "io.h".

The new code now checks bridge windows and membars,
while enumerating the bus, giving the pc driver a chance
to re-assign them. This is needed because some UEFI
implementations fail to assign the bars for some devices,
so we need to do it outselfs. (See pcireservemem()).

While working on this, it was discovered that the pci
code assimed the smallest I/O bar size is 16 (pcibarsize()),
which is wrong. I/O bars can be as small as 4 bytes.
Bit 1 in an I/O bar is also reserved and should be masked off,
making the port mask: port = bar & ~3;
2020-09-13 20:33:17 +02:00
Ori Bernstein 3873eb06d9 games/4s: increase thread size (thanks majiru)
It seems like on amd64, we're overflowing the stack.
Let's not do that.
2020-09-13 11:21:21 -07:00
Ori Bernstein d7b541eaf3 faces: remove log support
Use a damn plumber, you animals!
2020-09-12 17:40:41 -07:00
Ori Bernstein 26cf6ec073 tmdate(1): document tz field 2020-09-12 17:36:14 -07:00
Ori Bernstein 732082c095 ctime(2), tmdate(2): document ctime/tmparse incompatibility
Tmparse and ctime don't mix. The timezone name may be
too long for the number of characters ctime mandates.
Document this footgun.
2020-09-10 16:26:42 -07:00
Ori Bernstein 703b0d3e6d tmdate(2): one more typo
no more top arse. only bottom arse.
2020-09-07 19:32:50 -07:00
Ori Bernstein ce5b6036f0 tmdate(2): fix examples, stale references (thanks deuteron)
There were a number of ideas that were tried out as the tmdate
api evolved. As a result, there were some references in the
manpage to things that are no more.

Fix them.
2020-09-07 19:28:30 -07:00
Ori Bernstein 4a1186ddfe tmdate(2): fix name of tm struct
There was a leftover from when this library was separate
with different types.
2020-09-07 18:49:00 -07:00
cinap_lenrek 693485e9c4 etheriwl: add support for Intel Wireless AC 8265 2020-09-06 16:53:39 +02:00
cinap_lenrek a87b6909bc wifi: add packet timestamping support 2020-09-06 16:51:02 +02:00
Ori Bernstein cf5316a402 walk(1): improve wording, formatting
Clean up the wording of the walk(1) manpage,
improve the formatting of the format characters.
2020-09-03 20:07:44 -07:00
Ori Bernstein f444d6c3f2 tmparse: put in local timezone hack
Ctime is defined as printing a 3-character timezone
name. The timezone name is ambiguous. For example,
EST refers to both Australian and American eastern
time. On top of that, we don't want to make the
tzabbrev table exhaustive. So, we put in this hack:

Before we consult the well known table of timezones,
we check if the local time matches the timezone name.

On top of that, tm2sec

If you want unambiguous timezone parsing, use numeric
timezone offsets (Z, ZZ formats).
2020-09-01 19:32:45 -07:00
Ori Bernstein e0278f6917 seconds: tolerate trailing whitespace in dates
This allows handling dates with leading and trailing whitespace,
including newlines.
2020-09-01 19:03:17 -07:00
cinap_lenrek e9cd41467e upas: appendfolder() don't be picky about the timezone of ctime()
This is temporary fix, we should try to emulate the previous
behaviour where we accept at least our local timezone, and
otherwise ignore the offset.
2020-09-01 23:08:58 +02:00
cinap_lenrek 20d8cd0d63 upas: appendfolder(): skip the address from unix header before date 2020-09-01 23:01:45 +02:00
cinap_lenrek feda48624b upas/fs: extract proper date from unix header
do not try to parse the m->unixfrom field, it only contains
the unix mail address.

instead, have parseunix() save a pointer into the unixheader
after the unix mail address for the unixdate, and later use
it to derive the mails timestamp.
2020-09-01 21:39:45 +02:00
Alex Musolino 79b4ec29a1 upas/fs: remove unused function date822tounix 2020-09-01 22:25:06 +09:30
Alex Musolino e6bfbd0d33 png: remove bogus chanlen warning 2020-09-01 21:54:10 +09:30
Ori Bernstein ec533a1ad8 ape/ctype.h: add isblank, fix functions (thanks staalmannen)
Our ctype.h mistakenly ommitted isblank. Add it in.

While we're here, the make the 'isfoo()' functions
are broken: they're offsetting into the array, and
don't work with negative character values.

Sync the function bodies with the macros, and make
them produce correct results.
2020-08-29 11:09:20 -07:00
Alex Musolino 74bf624055 walk(1): fix typo 2020-08-29 18:23:59 +09:30
Ori Bernstein b7b077375f faces(1): remove bespoke date parser
In addition to being more code, this date parser would
treat local times as local, but anything that wasn't a
local time would get parsed as gmt, due to a quirk of
how tm2sec used to work.

This moves the code to tmparse, and fixes timezone parsing
at the same time.
2020-08-27 10:32:02 -07:00
Ori Bernstein 26ac80481d walk(1): clarify how -n argument works (thanks umbraticus)
Make it clear what happens if you omit the ',' when
specifying '-n'.
2020-08-26 21:17:17 -07:00
Ori Bernstein 68aa4d5254 tmparse: fix typo 2020-08-26 12:12:44 -07:00
Ori Bernstein 17abfa51ca libc: tmparse should ignore leading whitespace
We almost always want to skip leading whitespace in time
formats, so make tmparse just do it. This fixes upas mbox
parsing, which leaves a leading whitespace at the start of
the date.
2020-08-26 10:23:00 -07:00