Commit graph

7756 commits

Author SHA1 Message Date
Ori Bernstein
12e952e684 git/fs: move mount point to $repo/.git/fs
Moving the mount point to within the repo
directory means that we can have multiple
git repos mounted at once with no conflict.
2021-05-30 17:46:21 -07:00
cinap_lenrek
1af2546e96 vac: add -t flag to exclude temporary files and directories (thanks foura) 2021-05-30 14:30:50 +02:00
cinap_lenrek
a624902621 merge 2021-05-29 14:20:04 +02:00
cinap_lenrek
c2297ce5c1 kernel: use 64-bit virtual entry point for expanded header, document behaviour in a.out(6)
For 64-bit architectures, the a.out header has the HDR_MAGIC flag set
in the magic and is expanded by 8 bytes containing the 64-bit virtual
address of the programs entry point. While Exec.entry contains physical
address for kernel images.

Our sysexec() would always use Exec.entry, even for 64-bit a.out binaries,
which worked because PADDR(entry) == entry for userspace pointers.

This change fixes it, having the kernel use the 64-bit entry point
and document the behaviour in the manpage.
2021-05-29 14:18:35 +02:00
Sigrid
8ac28a3e21 zuke: treat toggle as play in stopped state 2021-05-28 13:02:58 +02:00
Sigrid
e18da032f0 zuke: fix seeking in paused mode 2021-05-27 07:47:10 +02:00
cinap_lenrek
d168b89ab1 mkpaqfs(8): allow setting compression level 2021-05-23 17:06:14 +02:00
cinap_lenrek
33682347b9 /sys/lib/kbmap/colemak: map capslock to backspace (thanks jacob wb) 2021-05-20 21:29:43 +02:00
Ori Bernstein
54cafd2106 git: add missing file
Forgot to add common.rc in the initial commit.
2021-05-17 13:46:44 -07:00
Ori Bernstein
2321062d2f 9pfid(2): document Srv* in Req (thanks kjn)
This struct member is available for any user of
the library, and is not part of our internal API.
It should be documented.
2021-05-17 09:17:22 -07:00
Ori Bernstein
1ee1bfaa8c git: got git?
Add a snapshot of git9 to 9front.
2021-05-16 18:49:45 -07:00
cinap_lenrek
013b2cad19 memory(2): mention tsmemcmp (thanks kemal) 2021-05-15 12:40:11 +02:00
foura
e72da62915 ip/ftpd: Add explict and implicit FTPS support.
Removed:
- Challenge reponse auth.
- Noworld login.
- Anonymous users writing files to /incoming.
2021-05-02 15:29:43 +01:00
james palmer
9633c9fc65 libpanel: fix text sliding around in libpanel text entry widgets. 2021-05-13 21:29:19 +01:00
cinap_lenrek
15b903c4e1 pc64: avoid getcr3() in mmuflushtlb()
it turns out that calculating physical address of pml4 is faster
than reading the machine register, so pass it explicitely.
2021-05-12 22:40:51 +02:00
cinap_lenrek
18b3847aef devvmx: remove unncessary locking in gotcmd() sleep test function 2021-05-12 22:24:36 +02:00
cinap_lenrek
682414ce0d vmx: fix 9p debug server and make it compatible to /proc
The 9p debug server was broken as it assumed the first
tree file added would have a qid of 0 (it has a qid
of 1 as the root directory is using 0 already).

Instead, just compare File* pointers and get rid of
the table (less code).

When passing 64-bit unsigned addresses as 64-bit signed
file offsets, we have to make sure to not pass negative
offsets (filtered out by kernel and lib9p)!
This is solved by clearing and sign bit in encoding and
63-bit sign extension on decoding.

Make the mem file writable (needed for acid).

The 9p debug server provided a single directory containing
mem and regs files. This patch renames the regs file
(which is in vmx specific text format) to "xregs" and
adds "regs" and "kregs" file which use the same format
as exported by the kernels /proc filesystem.

This allows one to bind the vmx directory over a proc
directory and attach acid to a running system like:

mount -b /srv/vmx /proc/1
acid -k -lkernel 1 /sys/src/9/pc64/9pc64
2021-05-12 18:17:06 +02:00
cinap_lenrek
532c7479e9 vmx: avoid strdup() register names for register cache
If we tokenize the register file contents in a static buffer,
we can avoid having to duplicate the register names.

All callers to rpoke() provide constant register arguments
so they also do not need to be duplicated.
2021-05-12 18:04:25 +02:00
cinap_lenrek
67eac97a81 vmx: implement long mode page table translation
This allows vmx to translate virtual addresses to physical
when the gues runs in long mode.
2021-05-12 18:00:46 +02:00
qwx
7048f1ca11 games/opl3: use correct sampling rate
games/dmid uses the same sample rate as the chip for music, but other
applications do not.  opl3 and its older version opl2 (not in 9front)
read an input stream of commands in basically IMF format, something
used in other id Software games and some others, which assumes a
given input sampling rate:  700 Hz for Wolfenstein 3D music, 560 Hz
for Commander Keen, 60 Hz for Ultima 6, etc.

The opl3 emulation on the other hand is not really intended to run at
a sampling rate different that the chip's 49.716 kHz sampling rate.
Previously, we assumed it runs at 44.1 kHz and just used the input
rate as a divisor to get the number of samples per delay tic.

From what I understand, the correct way to use it for accurate
emulation is to run the opl chip emulator at its intended sampling
frequency, then downsample to 44.1 kHz.  This means better output
but more code.  The alternative is to basically do the same as
before rev 8433, except with no buffering, but at accuracy/quality
loss.  This change implements the former and just forks pcmconv to
deal with resampling.
2021-05-05 16:57:19 +02:00
cinap_lenrek
ebaddcf030 merge 2021-05-05 01:51:20 +02:00
cinap_lenrek
7c1e0be919 cpu: properly handle end of file in readstr() 2021-05-05 01:50:09 +02:00
Sigrid
54ef5ea0a5 zuke(1): more fixes (thanks humm) 2021-05-04 15:32:35 +02:00
Sigrid
c92d7e3ced zuke(1): engrish (thanks qwx) 2021-05-04 15:21:44 +02:00
Sigrid
fd785b5546 add zuke(1) manpage (thanks kemal & humm) 2021-05-04 14:52:05 +02:00
Sigrid
5e81cc48bd libtags: upstream updates 2021-05-03 21:04:39 +02:00
Ori Bernstein
b66bffe91c Mail: remove message about cyclic threads
They happen, and we break the cycle. There's nothing
the user can do, so there's no point in warning.
2021-05-01 15:33:31 -04:00
cinap_lenrek
ee289c2415 lib9p: remove Srv.srvfd, make postsrv() and threadpostsrv() return the mountable file descriptor, update documentation
Now that we have these new functions,
we can also make them return an error
instead of calling sysfatal() like
postmountsrv().

Remove the confusing Srv.srvfd, as it
is only temporarily used and return
it from postsrv() instead.
2021-05-01 19:58:58 +02:00
cinap_lenrek
57c21ae441 lib9p: remove unneccesary headers 2021-05-01 17:03:03 +02:00
cinap_lenrek
f6509078ed lib9p: expose Srv.forker handler and srvforker(), threadsrvforker() and threadsrv() functions
To use srvrease()/srvaquire() we need to have a way to spawn
new processes to handle the service loop. This functionality
was provided by the internal _forker() function which was
eigther rfork or libthread based implementation depending on
if postmountsrv() or threadpostmountsrv() where called.

For servers who want to use srv() directly, _forker would not
be initialized so srvrelease() could not be used.

To untangle this, we get rid of the global _forker handler
and put the handler in the Srv structure. Which will get
initialized (when nil) to eigther srvforker() or threadsrvforker()
depending on if the thread or non-thread entry points where used.

For symmetry, we provde new threadsrv() and threadpostsrv()
functions which handle the default initialization of Srv.forker.

This also allows a user to provide his own forker function,
maybe to conserve stack space.

To avoid dead code, we put each of these function in their
own object file. Note, this also allows a user to define its
own srvforker() symbol.
2021-05-01 16:37:00 +02:00
Sigrid
013b498314 libtags: use nelem 2021-04-30 12:36:01 +02:00
Sigrid
dd86214d77 libtags: trim text tags and ignore empty values 2021-04-30 00:20:39 +02:00
Sigrid
e5535fad32 libtags: modules: ignore empty title 2021-04-29 23:35:52 +02:00
Sigrid
7cff84371d libtags: use CP437 as the default encoding for module formats 2021-04-29 21:44:06 +02:00
qwx
c3593c1a7a opl3(1), exec(2): fix manpage typos (thanks umbraticus) 2021-04-27 16:08:06 +02:00
qwx
af2f7ea236 games/opl3: don't buffer output and simplify (thanks umbraticus)
this fixes real-time applications.

-n previously specified a rate divisor rather than the rate itself,
which was used for specific applications outside of 9front.  instead,
just set the rate directly, more useful and straightforward.
2021-04-27 09:48:14 +02:00
Sigrid
51ead1072b file: partially revert 8419 to detect <?xml as html 2021-04-25 21:49:01 +02:00
cinap_lenrek
c0d4498ab8 kernel: clean up Mach structure
Remove unused fields and factor common fields into a
new PMach struct in port/portdat.h.

The fields machno, splpc and proc are not moved to
PMach as they are part of the known offsets from
assembly (l.s).
2021-04-25 17:41:34 +02:00
cinap_lenrek
9f54c28317 bcm: try ATAGS/DTB pointer from R2 on entry 2021-04-25 17:36:11 +02:00
cinap_lenrek
6b4b8e405a rio: avoid re-triggering clicks on resize/hide/unhide and send wctl when focus is lost 2021-04-25 12:41:20 +02:00
cinap_lenrek
e0cf0261d0 resample: improve performance (thanks José Miguel Sánchez García)
Resample is well known for taking a long time to resize an image. This
patch brings an important performance boost (in my test image, time
was reduced from ~2850ms to ~500ms). It does that by extracting FP
multiplication and division out of the innermost loop of
resamplex/resampley.

The results differ slightly from the current implementation: in my
test: ~0.3% of the bytes had a ±2 difference in their value, which I
attribute to rounding errors. I'm personally not concerned with that
deviation, given the performance gains. However, I recommend testing
it just to be sure I didn't overlook anything.

José Miguel Sánchez García
2021-04-25 12:16:40 +02:00
Sigrid
b0e2ea4e5f libtags, zuke: add *.mod support (thanks kemal) 2021-04-24 16:07:24 +02:00
Sigrid
83277da309 zuke: fix middle-click restarting playback if held while mouse pointer is moving 2021-04-23 11:20:30 +02:00
Sigrid
1919e9183b zuke: fix position formatter using a wrong type 2021-04-22 08:40:50 +02:00
Humm
b2ef0ff49d plumber: fix substrings in match rules
Unmatched substrings are nil, so we can't rely on nil terminating the
array of substrings.
2021-04-21 08:28:32 +02:00
Sigrid
192c1fd73a nusbrc: rndis with csp 0104ef 2021-04-20 18:12:54 +02:00
Sigrid
f5db3bf0e0 nusb/ether: rndis: add standard class code (tested by jmi2k with OnePlus 8) 2021-04-20 18:08:58 +02:00
kemal
2cdc8075f8 file: recognize executable scripts, etc.
The patch does the following:

1. Adds recognition of executable script (shebang) files.
2. Returns correct MIME type for mbox files (RFC 4155).
3. Returns XML instead of HTML type in some cases.
2021-04-20 01:40:31 +02:00
cinap_lenrek
52a367f3ea devloopback: fix wrong device character (thanks romano)
devloopback was changed from using #X to #λ awhile ago; one bit was missed.
2021-04-18 16:20:04 +02:00
unobe
f7ae890ecb patch for imap when imap fails
changeset:   8411:19f6a88ea241
branch:      mbp-2011
user:        Romano <unobe@cpan.org>
date:        Sat Apr 17 14:35:21 2021 -0700
files:       sys/src/cmd/upas/fs/imap.c
description:
When an imap fetch fails, it's helpful at times to know the underlying
cause.  This provides more details by providing the underlying error
message.
2021-04-17 18:52:11 -07:00