]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
3 years agopc: treat EOF gracefully, allowing easier use within sam command language
Sigrid [Tue, 15 Dec 2020 13:25:59 +0000 (14:25 +0100)]
pc: treat EOF gracefully, allowing easier use within sam command language

3 years agomerge
Alex Musolino [Tue, 15 Dec 2020 10:25:41 +0000 (20:55 +1030)]
merge

3 years agoico: avoid potential nil pointer dereferences
Alex Musolino [Tue, 15 Dec 2020 10:15:26 +0000 (20:45 +1030)]
ico: avoid potential nil pointer dereferences

Bgeticon can fail, leaving the Icon img pointers nil.

3 years agoico: fix interpretation of 0 widths/heights
Alex Musolino [Tue, 15 Dec 2020 10:14:11 +0000 (20:44 +1030)]
ico: fix interpretation of 0 widths/heights

3 years agoiostats: dup 9p pipe to both fd 0 and fd 1 for exportfs
cinap_lenrek [Sun, 13 Dec 2020 19:23:03 +0000 (20:23 +0100)]
iostats: dup 9p pipe to both fd 0 and fd 1 for exportfs

3 years agocpu(1): refer to oexportfs(4)
cinap_lenrek [Sun, 13 Dec 2020 19:11:44 +0000 (20:11 +0100)]
cpu(1): refer to oexportfs(4)

3 years agoimport(4): refer to oexportfs(4)
cinap_lenrek [Sun, 13 Dec 2020 19:11:30 +0000 (20:11 +0100)]
import(4): refer to oexportfs(4)

3 years agooexportfs: move legacy code for cpu and import to separate program
cinap_lenrek [Sun, 13 Dec 2020 19:09:03 +0000 (20:09 +0100)]
oexportfs: move legacy code for cpu and import to separate program

The initial protocol handling in exportfs for
cpu and import services is a huge mess.

Saparate the code out into its own program with
its own oexportfs(4) manpage.

3 years agokernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when opening /fd...
cinap_lenrek [Sun, 13 Dec 2020 15:04:09 +0000 (16:04 +0100)]
kernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when opening /fd, /srv and /shr

The OCEXEC flag used to be maintained per channel,
making it shared between all the file desciptors.

This has a unexpected side effects with regard to
channel passing drivers such as devdup (/fd),
devsrv (/srv) and devshr (/shr).

For example, opening a /srv file with OCEXEC
makes it impossible to be remounted by exportfs
as it internally does a exec() to mount and
re-export it. There is no way to reset the flag.

This change makes the OCEXEC flag per file descriptor,
so a open with the OCEXEC flag only affects the fd
group of the calling process, and not the channel
itself.

On rfork(RFFDG), the per file descriptor flags get
copied.

On dup(), the per file descriptor flags are reset.

The second modification is that /fd, /srv and /shr
should reject the ORCLOSE flag, as the files that
are returned have already been opend.

3 years agosdiahci: assume 64-bit PCIWADDR()
cinap_lenrek [Sat, 12 Dec 2020 17:16:06 +0000 (18:16 +0100)]
sdiahci: assume 64-bit PCIWADDR()

3 years agosdiahci: enable pci busmaster before ahciconfigdrive() (fix qemu crash)
cinap_lenrek [Sat, 12 Dec 2020 17:00:41 +0000 (18:00 +0100)]
sdiahci: enable pci busmaster before ahciconfigdrive() (fix qemu crash)

enable pci busmaster before set the fis-receive-enable
bit in the port command register.

not doing so triggers a crash in qemu like:

address_space_unmap: Assertion `mr != NULL' failed.

as qemu tries to process the dma command list as soon
as we set that flag and busmaster dma needs to be enabled
at this point.

3 years agomerge
cinap_lenrek [Fri, 11 Dec 2020 14:24:35 +0000 (15:24 +0100)]
merge

3 years agopc, pc64: make sure write combining is supported in MTRR's before setting it
cinap_lenrek [Fri, 11 Dec 2020 14:23:03 +0000 (15:23 +0100)]
pc, pc64: make sure write combining is supported in MTRR's before setting it

3 years agopc, pc64: ignore MTRR's when MTRRCap.vcnt and MTRRCap.fix are zero
cinap_lenrek [Fri, 11 Dec 2020 14:21:44 +0000 (15:21 +0100)]
pc, pc64: ignore MTRR's when MTRRCap.vcnt and MTRRCap.fix are zero

Bhyve returns 0 in MTRRCap register, so we
can use that instead on relying on cpuid only
to see if MTRR's are supported.

That way we can get rid of the sanity check
in memory.c.

3 years agoupdate Finnish kbmap: fix ¤ on shift+4 and add more AltGr variants
Sigrid [Fri, 11 Dec 2020 14:18:41 +0000 (15:18 +0100)]
update Finnish kbmap: fix ¤ on shift+4 and add more AltGr variants

3 years agovmx: clean up mksegment, memset only if segment existed (devsegment clears new ones)
Sigrid [Thu, 10 Dec 2020 11:19:45 +0000 (12:19 +0100)]
vmx: clean up mksegment, memset only if segment existed (devsegment clears new ones)

3 years agosrc: work on awk scripts too, see "src valley" (thanks phil9)
Sigrid [Thu, 10 Dec 2020 09:33:42 +0000 (10:33 +0100)]
src: work on awk scripts too, see "src valley" (thanks phil9)

3 years agopc, pc64: work around bhyve all uncached MTRR's
cinap_lenrek [Thu, 10 Dec 2020 00:47:19 +0000 (01:47 +0100)]
pc, pc64: work around bhyve all uncached MTRR's

3 years agomerge
cinap_lenrek [Wed, 9 Dec 2020 00:05:14 +0000 (01:05 +0100)]
merge

3 years agobackout OCEXEC changes when potentially opening /srv files
cinap_lenrek [Wed, 9 Dec 2020 00:04:03 +0000 (01:04 +0100)]
backout OCEXEC changes when potentially opening /srv files

Opening a /srv file sets the close-on-exec flag on the
shared channel breaking the exportfs openmount() hack.

The devsrv tries to prevent posting a channel with the
close-on-exec or remove-on-close flags. but nothing
currently prevents this poisoning on open.

Until this gets fixed in eigther exportfs or devsrv,
i'll back out the changes that could have potential side
effects like this.

3 years agosega(1): fix keys (thanks bigato)
kvik [Tue, 8 Dec 2020 20:20:13 +0000 (21:20 +0100)]
sega(1): fix keys (thanks bigato)

3 years agoplan9.ini(8): document *nomtrr= and order the table
cinap_lenrek [Tue, 8 Dec 2020 16:16:12 +0000 (17:16 +0100)]
plan9.ini(8): document *nomtrr= and order the table

3 years agopc, pc64: cleanup cpuidentify() and some comments
cinap_lenrek [Tue, 8 Dec 2020 15:58:41 +0000 (16:58 +0100)]
pc, pc64: cleanup cpuidentify() and some comments

3 years agopc, pc64: add *nomtrr= kernel parameter
cinap_lenrek [Tue, 8 Dec 2020 15:34:36 +0000 (16:34 +0100)]
pc, pc64: add *nomtrr= kernel parameter

3 years agopc64: preserve reserved bits in CR0/CR4 for amd64 in mtrr setstate()
cinap_lenrek [Tue, 8 Dec 2020 15:00:57 +0000 (16:00 +0100)]
pc64: preserve reserved bits in CR0/CR4 for amd64 in mtrr setstate()

On AMD64, CR0/CR4 are 64-bit registers, with
the upper half reserved. So use uintptr type
to store the register values to get 32 bit on 386
and 64 bit on AMD64.

3 years agovncv: backing out previous change, this needs another revision
cinap_lenrek [Tue, 8 Dec 2020 14:15:13 +0000 (15:15 +0100)]
vncv: backing out previous change, this needs another revision

3 years agovncv: do NOT map Kaltgr to meta, introduce Mod4 (Super) as an extra key to use instead
Sigrid [Tue, 8 Dec 2020 13:32:28 +0000 (14:32 +0100)]
vncv: do NOT map Kaltgr to meta, introduce Mod4 (Super) as an extra key to use instead

3 years agovmx(1): build vmxgdb by default, clean it up as well
Sigrid [Tue, 8 Dec 2020 12:18:10 +0000 (13:18 +0100)]
vmx(1): build vmxgdb by default, clean it up as well

3 years agovmx: nanosec(): fix non-interruptable temporary, assign fasthz only once after xstart
cinap_lenrek [Tue, 8 Dec 2020 12:04:52 +0000 (13:04 +0100)]
vmx: nanosec(): fix non-interruptable temporary, assign fasthz only once after xstart

3 years agopc: move ldmxcsr() prototype to fpu.c
cinap_lenrek [Tue, 8 Dec 2020 11:42:36 +0000 (12:42 +0100)]
pc: move ldmxcsr() prototype to fpu.c

3 years agovmx: add fmt checking, fix fmt errors, remove duplication for vmdebug
cinap_lenrek [Tue, 8 Dec 2020 11:40:28 +0000 (12:40 +0100)]
vmx: add fmt checking, fix fmt errors, remove duplication for vmdebug

3 years agonusb/kb: update button state if event was actually received, fix typos (thanks umbrat...
Sigrid [Tue, 8 Dec 2020 10:47:15 +0000 (11:47 +0100)]
nusb/kb: update button state if event was actually received, fix typos (thanks umbraticus)

3 years agodevmouse: remove redundant check
Sigrid [Tue, 8 Dec 2020 10:21:18 +0000 (11:21 +0100)]
devmouse: remove redundant check

3 years agomouse(3): blankS, setS to follow the convention (thanks umbraticus)
Sigrid [Tue, 8 Dec 2020 09:34:10 +0000 (10:34 +0100)]
mouse(3): blankS, setS to follow the convention (thanks umbraticus)

3 years agomouse(3): document "scrollswap" ctl message, fix style a bit (thanks umbraticus)
Sigrid [Tue, 8 Dec 2020 09:21:17 +0000 (10:21 +0100)]
mouse(3): document "scrollswap" ctl message, fix style a bit (thanks umbraticus)

3 years agovesa: make unsupported function not an error, set return status
Sigrid [Tue, 8 Dec 2020 09:08:49 +0000 (10:08 +0100)]
vesa: make unsupported function not an error, set return status

3 years agovmx: add -D option to enable debug messages, use vmdebug for non-fatal "errors"
Sigrid [Tue, 8 Dec 2020 09:01:44 +0000 (10:01 +0100)]
vmx: add -D option to enable debug messages, use vmdebug for non-fatal "errors"

3 years agovmx: add -v|-w flag to control window creation behaviour
cinap_lenrek [Mon, 7 Dec 2020 17:59:54 +0000 (18:59 +0100)]
vmx: add -v|-w flag to control window creation behaviour

The -v flag now does not create a new rio window,
while -w flag does (restores the old behaviour).

This allows vmx to run under vncs and is in general
mode aligned to other emulators and programs.

3 years agolibcomplete: open internal file-descriptor with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 16:18:33 +0000 (17:18 +0100)]
libcomplete: open internal file-descriptor with OCEXEC flag

3 years agolibsec: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 16:14:34 +0000 (17:14 +0100)]
libsec: open internal file-descriptors with OCEXEC flag

3 years agomerge
cinap_lenrek [Mon, 7 Dec 2020 15:48:19 +0000 (16:48 +0100)]
merge

3 years agolibauthsrv: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 15:47:06 +0000 (16:47 +0100)]
libauthsrv: open internal file-descriptors with OCEXEC flag

3 years agolibauth: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 15:46:34 +0000 (16:46 +0100)]
libauth: open internal file-descriptors with OCEXEC flag

3 years agoaux/kbdfs, kbmaps: enable Kmod4 for other layouts, not just neo2
Sigrid [Mon, 7 Dec 2020 15:42:56 +0000 (16:42 +0100)]
aux/kbdfs, kbmaps: enable Kmod4 for other layouts, not just neo2

3 years agolibdraw: open file-descriptor with OCEXEC flag in readcolmap()
cinap_lenrek [Mon, 7 Dec 2020 15:30:27 +0000 (16:30 +0100)]
libdraw: open file-descriptor with OCEXEC flag in readcolmap()

3 years agolibndb: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 14:15:02 +0000 (15:15 +0100)]
libndb: open internal file-descriptors with OCEXEC flag

3 years agolib9p: open internal file-descriptor with OCEXEC flag in getremotesys()
cinap_lenrek [Mon, 7 Dec 2020 13:54:27 +0000 (14:54 +0100)]
lib9p: open internal file-descriptor with OCEXEC flag in getremotesys()

3 years agolib9p: open /mnt/factotum/rpc with OCEXEC flag in auth9p()
cinap_lenrek [Mon, 7 Dec 2020 13:51:53 +0000 (14:51 +0100)]
lib9p: open /mnt/factotum/rpc with OCEXEC flag in auth9p()

3 years agolib9p: improve reqqueuecreate()
cinap_lenrek [Mon, 7 Dec 2020 13:49:12 +0000 (14:49 +0100)]
lib9p: improve reqqueuecreate()

- open /proc/n/ctl with OCEXEC flag
- format pid as ulong
- don't leak the fd

3 years agomerge
cinap_lenrek [Mon, 7 Dec 2020 13:33:51 +0000 (14:33 +0100)]
merge

3 years agolibdraw: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:32:34 +0000 (14:32 +0100)]
libdraw: open internal file-descriptors with OCEXEC flag

3 years agolibdraw: remove unused Error label in freescreen()
cinap_lenrek [Mon, 7 Dec 2020 13:32:12 +0000 (14:32 +0100)]
libdraw: remove unused Error label in freescreen()

3 years agolibthread: reduce stack usage of threadkill*(), open /proc/n/ctl with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:31:02 +0000 (14:31 +0100)]
libthread: reduce stack usage of threadkill*(), open /proc/n/ctl with OCEXEC flag

3 years agolibthread: reduce stack usage for ioprocs, open /proc/n/ctl with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:29:45 +0000 (14:29 +0100)]
libthread: reduce stack usage for ioprocs, open /proc/n/ctl with OCEXEC flag

3 years agolibthread: simplify threadsetname()
cinap_lenrek [Mon, 7 Dec 2020 13:27:46 +0000 (14:27 +0100)]
libthread: simplify threadsetname()

- open /proc/n/args with OCEXEC flag
- reduce stack usage by using smaller buffer for path
- format pid as ulong

3 years agolibc: open internal file-descriptor with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:24:51 +0000 (14:24 +0100)]
libc: open internal file-descriptor with OCEXEC flag

3 years agorio: format pid's as ulongs
cinap_lenrek [Mon, 7 Dec 2020 13:23:41 +0000 (14:23 +0100)]
rio: format pid's as ulongs

3 years agorio: open /dev/snarf with OCEXEC flag when writing
cinap_lenrek [Mon, 7 Dec 2020 13:23:23 +0000 (14:23 +0100)]
rio: open /dev/snarf with OCEXEC flag when writing

3 years agorio: simplify filsysinit() by using getuser(), format pid's as ulongs
cinap_lenrek [Mon, 7 Dec 2020 13:22:30 +0000 (14:22 +0100)]
rio: simplify filsysinit() by using getuser(), format pid's as ulongs

3 years agolibndb: remove db file size limit
kvik [Sun, 6 Dec 2020 23:36:41 +0000 (00:36 +0100)]
libndb: remove db file size limit

Removes the 128 kB limit for files making up the database.
We used to skip over and complain about files that exceeded
the limit, forcing the user to generate hash files.

This caused things to inexplicably stop working after a file
hit the hidden limit, which is unreasonable behaviour considering
that libndb happily, albeit slowly, works with bigger files.

3 years agomerge
cinap_lenrek [Sun, 6 Dec 2020 21:06:32 +0000 (22:06 +0100)]
merge

3 years agopc64: assign fpsave/fprestore only once in fpuinit()
cinap_lenrek [Sun, 6 Dec 2020 21:05:00 +0000 (22:05 +0100)]
pc64: assign fpsave/fprestore only once in fpuinit()

3 years agoptrap: implement filtering on plumb attributes
kvik [Sun, 6 Dec 2020 20:52:01 +0000 (21:52 +0100)]
ptrap: implement filtering on plumb attributes

3 years agopc64: AMD64 mandates SSE support, remove the check in fpuinit()
cinap_lenrek [Sun, 6 Dec 2020 20:44:26 +0000 (21:44 +0100)]
pc64: AMD64 mandates SSE support, remove the check in fpuinit()

3 years agoxen: use pc/fpu.c
cinap_lenrek [Sun, 6 Dec 2020 20:28:11 +0000 (21:28 +0100)]
xen: use pc/fpu.c

3 years agopc, pc64: move all fpu specific code from main.c to fpu.c
cinap_lenrek [Sun, 6 Dec 2020 20:07:30 +0000 (21:07 +0100)]
pc, pc64: move all fpu specific code from main.c to fpu.c

3 years agoxen: fix for the last avx changes
Sigrid [Sun, 6 Dec 2020 19:28:53 +0000 (20:28 +0100)]
xen: fix for the last avx changes

3 years agoamd64: FP: back to static size for allocation and copying
Sigrid [Sun, 6 Dec 2020 18:40:57 +0000 (19:40 +0100)]
amd64: FP: back to static size for allocation and copying

3 years agoamd64: FP: always use enough to fit AVX state and align to 64 bytes
Sigrid [Sun, 6 Dec 2020 18:31:56 +0000 (19:31 +0100)]
amd64: FP: always use enough to fit AVX state and align to 64 bytes

3 years agoamd64, vmx: support avx/avx2 for host/guest; use *noavx= in plan9.ini to disable
Sigrid [Sun, 6 Dec 2020 17:48:32 +0000 (18:48 +0100)]
amd64, vmx: support avx/avx2 for host/guest; use *noavx= in plan9.ini to disable

3 years agorio: undo previous commit, was a stupid idea
cinap_lenrek [Sun, 6 Dec 2020 14:08:23 +0000 (15:08 +0100)]
rio: undo previous commit, was a stupid idea

3 years agorio: give visual clue during sweep and bandsizing when window is too small
cinap_lenrek [Sun, 6 Dec 2020 13:50:50 +0000 (14:50 +0100)]
rio: give visual clue during sweep and bandsizing when window is too small

We color the window border with a dark red in case the
window is too small.

3 years agorio: use libdraw's badrect() to exclude some extreme cases in goodrect()
cinap_lenrek [Sun, 6 Dec 2020 13:44:23 +0000 (14:44 +0100)]
rio: use libdraw's badrect() to exclude some extreme cases in goodrect()

3 years agorio: rewrite better portion() function
cinap_lenrek [Sun, 6 Dec 2020 12:20:29 +0000 (13:20 +0100)]
rio: rewrite better portion() function

3 years agorio: handle corner selection for resizing better (thanks cinap)
Sigrid [Sun, 6 Dec 2020 12:04:36 +0000 (13:04 +0100)]
rio: handle corner selection for resizing better (thanks cinap)

3 years agorio: goodrect: clarify minimal height and actually use the smallest reasonable value
Sigrid [Sun, 6 Dec 2020 12:02:33 +0000 (13:02 +0100)]
rio: goodrect: clarify minimal height and actually use the smallest reasonable value

3 years agorio: allow windows as small as one line of text, still scrollable
Sigrid [Sun, 6 Dec 2020 11:17:05 +0000 (12:17 +0100)]
rio: allow windows as small as one line of text, still scrollable

3 years agoaux/status^(bar msg): few small fixes (thanks umbraticus)
Sigrid [Sun, 6 Dec 2020 10:55:27 +0000 (11:55 +0100)]
aux/status^(bar msg): few small fixes (thanks umbraticus)

3 years agocwfs: fix interpretation of startdump argument
Alex Musolino [Sun, 6 Dec 2020 03:24:10 +0000 (13:54 +1030)]
cwfs: fix interpretation of startdump argument

3 years agopc/dma, pc/sdide: use uintptr for physical address instead of ulong
cinap_lenrek [Sat, 5 Dec 2020 16:01:24 +0000 (17:01 +0100)]
pc/dma, pc/sdide: use uintptr for physical address instead of ulong

3 years agopc, pc64: allocate dma bounce buffer right after xinit()
cinap_lenrek [Sat, 5 Dec 2020 15:59:30 +0000 (16:59 +0100)]
pc, pc64: allocate dma bounce buffer right after xinit()

3 years agopc, pc64: exclude memory regions with unusual MTRR cache attributes
cinap_lenrek [Sat, 5 Dec 2020 15:57:12 +0000 (16:57 +0100)]
pc, pc64: exclude memory regions with unusual MTRR cache attributes

Use the MTRR registers to exclude memory ranges that
do not have the expected cache attributes:

RAM -> writeback
UMB -> uncached
UPA -> uncached

3 years agofaces: add -c option to remove faces with button 1 click (thanks sirjofri)
Sigrid [Fri, 4 Dec 2020 08:33:55 +0000 (09:33 +0100)]
faces: add -c option to remove faces with button 1 click (thanks sirjofri)

3 years agomerge
cinap_lenrek [Tue, 1 Dec 2020 23:57:21 +0000 (00:57 +0100)]
merge

3 years agolibdraw: do not force flushimage() on freescreen()
cinap_lenrek [Tue, 1 Dec 2020 23:56:21 +0000 (00:56 +0100)]
libdraw: do not force flushimage() on freescreen()

This causes visual flashes of white in rio. If it is
really needed (it is rare) it should be done by the caller.

3 years agorio: properly restore the windows contents on /dev/mouse close
cinap_lenrek [Tue, 1 Dec 2020 23:53:58 +0000 (00:53 +0100)]
rio: properly restore the windows contents on /dev/mouse close

The previous resize optimization now means that the wfill()
is skipped on resize for libdraw programs.

So do it once /dev/mouse is closed and the window processes
the Refresh message.

3 years ago/lib/keyboard: Anführungszeichen uten (danke sirjofri)
Sigrid [Tue, 1 Dec 2020 08:23:16 +0000 (09:23 +0100)]
/lib/keyboard: Anführungszeichen uten (danke sirjofri)

3 years ago/lib/keyboard: add fingers and more arrows (thanks umbraticus)
Sigrid [Tue, 1 Dec 2020 07:44:18 +0000 (08:44 +0100)]
/lib/keyboard: add fingers and more arrows (thanks umbraticus)

3 years agoproof: don't confuse ""(1) (thanks Stuart Morrow)
Ori Bernstein [Mon, 30 Nov 2020 21:13:49 +0000 (13:13 -0800)]
proof: don't confuse ""(1) (thanks Stuart Morrow)

"" looks for patterns in the form 'prompt;' or 'prompt%',
and gets confused when proof emits 'illegal;'. This change
replaces the ';' with a ':', which both matches other
conventional error outputs and prevents "" from getting
confused.

3 years agotmdate(2): remove lies
Ori Bernstein [Mon, 30 Nov 2020 15:41:49 +0000 (07:41 -0800)]
tmdate(2): remove lies

Initially the code tried to guess the date format. This
turned out to be a bit too magical, so the feature was
removed, but the manpage still documented the nonfeature.

3 years agorio: avoid redrawing window text on resize for programs using libdraw
cinap_lenrek [Sun, 29 Nov 2020 16:51:57 +0000 (17:51 +0100)]
rio: avoid redrawing window text on resize for programs using libdraw

As long as the client as the mouse file open
and maintains reading the winname file of the window
after a resize we will avoid drawing the text frame
on a resize as it will be overdrawn by the client.

This reduces flicker on resize somewhat for slow systems.

3 years agopc, pc64, xen: rewrite interrupt handling code
cinap_lenrek [Sun, 29 Nov 2020 16:43:22 +0000 (17:43 +0100)]
pc, pc64, xen: rewrite interrupt handling code

This implements proper intrdisable() support for all
interrupt controllers.

For enable, (*arch->intrassign)(Vctl*) fills in the
Vctl.enable and Vctl.disable pointers with the
appropriate routines and returns the assigned
vector number.

Once the Vctl struct has been linked to its vector
chain, Vctl.enable(Vctl*, shared) gets called with a
flag if the vector has been already enabled (shared).

This order is important here as enabling the interrupt
on the controller before we have linked the chain can
cause spurious interrupts, expecially on mp system
where the interrupt can target a different cpu than
the caller of intrenable().

The intrdisable() case is the other way around.
We first disable the interrupt on the controller
and after that unlink the Vctl from the chain.
On a multiprocessor, the xfree() of the Vctl struct
is delayed to avoid freeing it while it is still
in use by another cpu.

The xen port now also uses pc/irq.c which has been
made generic enougth to handle xen's irq scheme.
Also, archgeneric is now a separate file to avoid
pulling in dependencies from the 8259 interrupt
controller code.

3 years agogames/mix: fix decoding of shift instructions
Alex Musolino [Sat, 28 Nov 2020 12:33:44 +0000 (23:03 +1030)]
games/mix: fix decoding of shift instructions

3 years agogames/mix: fix SLAX and SRAX instructions (thanks nicolagi)
Alex Musolino [Sat, 28 Nov 2020 12:32:28 +0000 (23:02 +1030)]
games/mix: fix SLAX and SRAX instructions (thanks nicolagi)

MIX shift instructions shift by bytes not bits.

3 years agofplot: add hyperbolic functions
Sigrid [Fri, 27 Nov 2020 09:51:16 +0000 (10:51 +0100)]
fplot: add hyperbolic functions

3 years agofplot(1): use abs()
Sigrid [Fri, 27 Nov 2020 09:35:57 +0000 (10:35 +0100)]
fplot(1): use abs()

3 years agofplot: add abs
Sigrid [Fri, 27 Nov 2020 09:34:16 +0000 (10:34 +0100)]
fplot: add abs

3 years agomerge
Alex Musolino [Fri, 27 Nov 2020 00:58:25 +0000 (11:28 +1030)]
merge

3 years agogames/mix: fix implementation of MOVE instruction (thanks nicolagi)
Alex Musolino [Fri, 27 Nov 2020 00:49:49 +0000 (11:19 +1030)]
games/mix: fix implementation of MOVE instruction (thanks nicolagi)

Plan 9 memcpy(2) uses the same implementation as memmove(2) to handle
overlapping ranges.  Hovewer, the MIX MOVE instruction, as described
in TAOCP, specifically does not do this.  It copies words one at a
time starting from the lowest address.

This change also expands the address validation to check that all
addresses within the source and destination ranges are valid before
proceeding.

3 years agokbmap/neo2: add support for neo2 kbmak (thanks jstsmthrgk)
Ori Bernstein [Thu, 26 Nov 2020 19:18:41 +0000 (11:18 -0800)]
kbmap/neo2: add support for neo2 kbmak (thanks jstsmthrgk)