summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-12vmx: avoid strdup() register names for register cachecinap_lenrek
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-12vmx: implement long mode page table translationcinap_lenrek
This allows vmx to translate virtual addresses to physical when the gues runs in long mode.
2021-05-09iwhois: add some improvements (thanks gall0ws)cinap_lenrek
patch from gall0ws: > It's impossible to get whois right and probably nobody cares about it, > nevertheless this small patch fixes some issues with the current version: > > * use a more common filter for default boilerplate (useful when > following the referral chain) > * updated boilerplate for *.co.uk *.net.uk *.org.uk > * added case *.com *.net (got it from iana.org) > * use ARIN for IPv6 addresses > * when unsure, check first whether whois.nic.$tld exists otherwise > usual fallback to InterNIC > * fixed regexp for the referral chain (case, extra spaces or /) - add usage handling. -- cinap
2021-05-05games/opl3: use correct sampling rateqwx
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-05mergecinap_lenrek
2021-05-05cpu: properly handle end of file in readstr()cinap_lenrek
2021-05-04zuke(1): more fixes (thanks humm)Sigrid
2021-05-04zuke(1): engrish (thanks qwx)Sigrid
2021-05-04add zuke(1) manpage (thanks kemal & humm)Sigrid
2021-05-03libtags: upstream updatesSigrid
2021-05-01Mail: remove message about cyclic threadsOri Bernstein
They happen, and we break the cycle. There's nothing the user can do, so there's no point in warning.
2021-05-01lib9p: remove Srv.srvfd, make postsrv() and threadpostsrv() return the ↵cinap_lenrek
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-01lib9p: remove unneccesary headerscinap_lenrek
2021-05-01lib9p: expose Srv.forker handler and srvforker(), threadsrvforker() and ↵cinap_lenrek
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-04-30libtags: use nelemSigrid
2021-04-30libtags: trim text tags and ignore empty valuesSigrid
2021-04-29libtags: modules: ignore empty titleSigrid
2021-04-29libtags: use CP437 as the default encoding for module formatsSigrid
2021-04-27opl3(1), exec(2): fix manpage typos (thanks umbraticus)qwx
2021-04-27games/opl3: don't buffer output and simplify (thanks umbraticus)qwx
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-25file: partially revert 8419 to detect <?xml as htmlSigrid
2021-04-25kernel: clean up Mach structurecinap_lenrek
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-25bcm: try ATAGS/DTB pointer from R2 on entrycinap_lenrek
2021-04-25rio: avoid re-triggering clicks on resize/hide/unhide and send wctl when ↵cinap_lenrek
focus is lost
2021-04-25resample: improve performance (thanks José Miguel Sánchez García)cinap_lenrek
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-24libtags, zuke: add *.mod support (thanks kemal)Sigrid
2021-04-23zuke: fix middle-click restarting playback if held while mouse pointer is movingSigrid
2021-04-22zuke: fix position formatter using a wrong typeSigrid
2021-04-21mergecinap_lenrek
2021-04-21vgadb: revert previous commit, the pci device id 8086/1c3a is the embedded ↵cinap_lenrek
controller!
2021-04-21plumber: fix substrings in match rulesHumm
Unmatched substrings are nil, so we can't rely on nil terminating the array of substrings.
2021-04-20nusbrc: rndis with csp 0104efSigrid
2021-04-20nusb/ether: rndis: add standard class code (tested by jmi2k with OnePlus 8)Sigrid
2021-04-20file: recognize executable scripts, etc.kemal
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-18devloopback: fix wrong device character (thanks romano)cinap_lenrek
devloopback was changed from using #X to #λ awhile ago; one bit was missed.
2021-04-17patch for imap when imap failsunobe
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-17Mail: remove impliicit headers (thanks unobe)Ori Bernstein
Setting headers from Mail can cause conflicts with the headers that upas/marshal adds when sending attachments. So, let's not set them.
2021-04-14acme: fix border size, autoindent undo: imported from plan9port (thanks jxy)Ori Bernstein
origin: https://github.com/9fans/plan9port/pull/493 https://github.com/9fans/plan9port/pull/489 https://github.com/9fans/plan9port/pull/461
2021-04-13zuke: include libtags in CFLAGSSigrid
2021-04-13zuke: remove -G option (old playlists not supported anymore)Sigrid
2021-04-13remove juke (use play or zuke instead)Sigrid
2021-04-13audio/: zuke, mkplist, readtagsSigrid
2021-04-13remove old, broken scripts: fedex, u(s)ps, weather (thanks fulton)Sigrid
2021-04-12Mail: correctly track the number of messages (thanks igor)Ori Bernstein
We forgot to update the message count when deleting messages in mail, meaning we could access trailing messages that had been freed.
2021-04-12crop: allow no-ops for pipelinesqwx
unlike other tools like iconv(1), a crop(1) without arguments or with ones resulting in a no-op, like `-t 0 0', errors out. other options like `-i 0' do not error. this breaks assumptions and results in tedious intermediary steps or hacks like: foo | {crop -t $1 $2 >[2]/null || cat} > baz.bit instead, just ignore the check. subsequent code doesn't make assumptions on that.
2021-04-11ip/tftpd: add a syslog message about what error we return to the client on a NAKcinap_lenrek
2021-04-11ip/dhcpd: work around raspberry pi pxe firmware by providing dhcp option 66cinap_lenrek
The raspberry pi 4 PXE firmware insists on finding the tftp server address by parsing dhcp option 66 as an ip address string.
2021-04-11ip/ipconfig: ODtftpserver (dhcp option 66) is of type stringcinap_lenrek
2021-04-10termrc, cpurc: silence /net/ether* error message when there are no ethernet ↵cinap_lenrek
devices
2021-04-09libthread: generate correct acid filesHumm
/sys/src/cmd/mksyslib uses `{basename $stem .$objtype}^.c to get the source file name for *.acid files. /sys/lib/acid/thread expects sched.$objtype.acid. This lets /sys/src/libthread/mkfile generate that file.