Commit graph

8271 commits

Author SHA1 Message Date
cinap_lenrek
ed3ae3faa3 rio: open /dev/snarf with OCEXEC flag when writing 2020-12-07 14:23:23 +01:00
cinap_lenrek
c86a960880 rio: simplify filsysinit() by using getuser(), format pid's as ulongs 2020-12-07 14:22:30 +01:00
kvik
a92ffdbbfb 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.
2020-12-07 00:36:41 +01:00
cinap_lenrek
c924edb91d merge 2020-12-06 22:06:32 +01:00
cinap_lenrek
23b52bbf23 pc64: assign fpsave/fprestore only once in fpuinit() 2020-12-06 22:05:00 +01:00
kvik
d15439ee76 ptrap: implement filtering on plumb attributes 2020-12-06 21:52:01 +01:00
cinap_lenrek
cd38d41356 pc64: AMD64 mandates SSE support, remove the check in fpuinit() 2020-12-06 21:44:26 +01:00
cinap_lenrek
dcdb2bfb9a xen: use pc/fpu.c 2020-12-06 21:28:11 +01:00
cinap_lenrek
8c1bde46f0 pc, pc64: move all fpu specific code from main.c to fpu.c 2020-12-06 21:07:30 +01:00
Sigrid
dbbae6d384 xen: fix for the last avx changes 2020-12-06 20:28:53 +01:00
Sigrid
97b3291533 amd64: FP: back to static size for allocation and copying 2020-12-06 19:40:57 +01:00
Sigrid
334c5e1134 amd64: FP: always use enough to fit AVX state and align to 64 bytes 2020-12-06 19:31:56 +01:00
Sigrid
66b6185845 amd64, vmx: support avx/avx2 for host/guest; use *noavx= in plan9.ini to disable 2020-12-06 18:48:32 +01:00
cinap_lenrek
753a35b52a rio: undo previous commit, was a stupid idea 2020-12-06 15:08:23 +01:00
cinap_lenrek
a0d12784bd 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.
2020-12-06 14:50:50 +01:00
cinap_lenrek
bf2a6f7865 rio: use libdraw's badrect() to exclude some extreme cases in goodrect() 2020-12-06 14:44:23 +01:00
cinap_lenrek
082560fd5b rio: rewrite better portion() function 2020-12-06 13:20:29 +01:00
Sigrid
f5d9b2222b rio: handle corner selection for resizing better (thanks cinap) 2020-12-06 13:04:36 +01:00
Sigrid
a696951c6c rio: goodrect: clarify minimal height and actually use the smallest reasonable value 2020-12-06 13:02:33 +01:00
Sigrid
7f7c151687 rio: allow windows as small as one line of text, still scrollable 2020-12-06 12:17:05 +01:00
Sigrid
ecb12c8718 aux/status^(bar msg): few small fixes (thanks umbraticus) 2020-12-06 11:55:27 +01:00
Alex Musolino
5d790e08ca cwfs: fix interpretation of startdump argument 2020-12-06 13:54:10 +10:30
cinap_lenrek
abcc56afef pc/dma, pc/sdide: use uintptr for physical address instead of ulong 2020-12-05 17:01:24 +01:00
cinap_lenrek
178a9d12c6 pc, pc64: allocate dma bounce buffer right after xinit() 2020-12-05 16:59:30 +01:00
cinap_lenrek
99696c414a 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
2020-12-05 16:57:12 +01:00
Sigrid
4ca5e1b3a3 faces: add -c option to remove faces with button 1 click (thanks sirjofri) 2020-12-04 09:33:55 +01:00
cinap_lenrek
4b6072e60f merge 2020-12-02 00:57:21 +01:00
cinap_lenrek
1bce6d0981 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.
2020-12-02 00:56:21 +01:00
cinap_lenrek
7d55aa8a32 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.
2020-12-02 00:53:58 +01:00
Sigrid
e72958a5c1 /lib/keyboard: Anführungszeichen uten (danke sirjofri) 2020-12-01 09:23:16 +01:00
Sigrid
cf44906396 /lib/keyboard: add fingers and more arrows (thanks umbraticus) 2020-12-01 08:44:18 +01:00
Ori Bernstein
2652cbee57 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.
2020-11-30 13:13:49 -08:00
Ori Bernstein
07e8c324a8 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.
2020-11-30 07:41:49 -08:00
cinap_lenrek
c931e96364 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.
2020-11-29 17:51:57 +01:00
cinap_lenrek
1d93a5628a 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.
2020-11-29 17:43:22 +01:00
Alex Musolino
32a5ff9658 games/mix: fix decoding of shift instructions 2020-11-28 23:03:44 +10:30
Alex Musolino
2619be4d4d games/mix: fix SLAX and SRAX instructions (thanks nicolagi)
MIX shift instructions shift by bytes not bits.
2020-11-28 23:02:28 +10:30
Sigrid
0b9c6fa117 fplot: add hyperbolic functions 2020-11-27 10:51:16 +01:00
Sigrid
c696998ec3 fplot(1): use abs() 2020-11-27 10:35:57 +01:00
Sigrid
df18213ce3 fplot: add abs 2020-11-27 10:34:16 +01:00
Alex Musolino
68c4119ae7 merge 2020-11-27 11:28:25 +10:30
Alex Musolino
2a907fd459 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.
2020-11-27 11:19:49 +10:30
Ori Bernstein
7dcc3eb27a kbmap/neo2: add support for neo2 kbmak (thanks jstsmthrgk) 2020-11-26 11:18:41 -08:00
Alex Musolino
781a8f8d9f upas: fix mk nuke 2020-11-25 19:54:52 +10:30
Ori Bernstein
e60216c2b7 g: fix typo in last commit 2020-11-22 17:42:25 -08:00
Ori Bernstein
bd6747ccd0 upas/*: fix mkfile issues (thanks amavect)
Fixes 3 issues in our upas mkfiles:
- mk/mkfile and send/mkfile were rebuilding
  only the rfc822.tab.$O, even though the
  header also needed to be rebuilt.
- CLEANFILES had a pattern that  would not
  get expanded.
- Third, ../upas/mkfile was being included
  in the wrong place and making the wrong
  rule default.
2020-11-22 11:36:23 -08:00
cinap_lenrek
a041c90431 pc, pc64: move common irq handling code out of trap.c
Move the common irq handling code out of trap.c
into pc/irq.c so that it can be shared between 386
and amd64 ports.
2020-11-22 17:44:21 +01:00
Ori Bernstein
97008caa41 g: filter directory arguments
When searching directories recursively, it's still
desirable to filter the contents by the file pattern,
so that 'g foo /sys/src' doesn't end up searching for
foo within .$O files.

Files passed explicitly are still searched, so for the
old behavior, just use walk:

	g foo `{walk -f $dir}
2020-11-21 21:23:46 -08:00
mischief
d1dc287210 9boot(8): update manual to reflect efi loader search order changes
the efi loader now looks for plan9.ini and the kernel in the ESP
first, before looking elsewhere.
2020-11-21 14:55:33 -08:00
mischief
486ce60546 efi: prefer plan9.ini from ESP we loaded from
currently the EFI loader's behavior is to search all disks in a
firmware-defined order.  we search the list returned by the firmware
in reverse order in the hopes of searching the first 9FAT instead of
the ESP, but this results in unintuitive behavior when there are
multiple FAT partitions (possibly in multiple disks), such as loading
a plan9.ini and kernel from a different disk than the one you executed
the EFI loader from.

to resolve this, we change the EFI loader to instead prefer read
plan9.ini and the kernel from the same disk as the EFI loader was read
from, and then fall back to the old behavior, since the old behavior
is relied on by current installations.
2020-11-21 14:18:52 -08:00