summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-05file: try ismp4() before ismp3()Alex Musolino
It is possible to find the mp3 sync word near the start of an mp4 file. As such, file(1) could incorrectly identify some mp4s as mp3s.
2020-04-05dossrv: fix falloc() for >31 bit sector numbers (thanks sl)cinap_lenrek
2020-04-05nusb/usbd: fix portreset error handlingcinap_lenrek
error handling in portreset() was wrong. we called closedev() on the device without changing the reference. just call portdetach() when the reset fails.
2020-04-05nusb/audio: set frequency only when supportedcinap_lenrek
before setting the sampling rate, check bit D0 "Sampling Frequency" in the audio class specific endpoint descriptor.
2020-04-04mergecinap_lenrek
2020-04-04mtx, ppc: use proctab() to index into process tablecinap_lenrek
2020-04-04kernel: remove scheddump() comment for delay() in */fns.hcinap_lenrek
2020-04-04pc, pc64: new memory map codecinap_lenrek
This replaces the memory map code for both pc and pc64 kernels with a unified implementation using the new portable memory map code. The main motivation is to be robust against broken e820 memory maps by the bios and delay the Conf.mem[] allocation after archinit(), so mp and acpi tables can be reserved and excluded from user memory. There are a few changes: new memreserve() function has been added for archinit() to reserve bios and acpi tables. upareserve() has been replaced by upaalloc(), which now has an address argument. umbrwmalloc() and umbmalloc() have been replaced by umballoc(). both upaalloc() and umballoc() return physical addresses or -1 on error. the physical address -1 is now used as a sentinel value instead of 0 when dealing with physical addresses. archmp and archacpi now always use vmap() to access the bios tables and reserve the ranges. more overflow checks have been added. ramscan() has been rewritten using vmap(). to handle the population of kernel memory, pc and pc64 now have pmap() and punmap() functions to do permanent mappings.
2020-04-04kernel: add portable memory map code (port/memmap.c)cinap_lenrek
This is a generic memory map for physical addresses. Entries can be added with memmapadd() giving a range and a type. Ranges can be allocated and freed from the map. The code automatically resolves overlapping ranges by type priority.
2020-04-04ether8390: remove unused variablescinap_lenrek
2020-04-04ether8003: use physical addresses for ISAConfig ether->memcinap_lenrek
Fix the inconsistent use of ether->mem. Always use physical addresses. Let ether8390 convert to virtual addresses using KADDR() when we have to copy data in/out.
2020-04-01mergeAlex Musolino
2020-04-01upas/fs: fix sending of "delete" plumb messagesAlex Musolino
Broken by changeset 2cc069392228.
2020-04-01kbd(1): revert repeat/delay changeSigrid
2020-04-01devkbd: bits bad! revert repeat/delay, better patches welcomeSigrid
2020-03-31ip/dhcp6d: work arround non-ethernet based client duidcinap_lenrek
in ndb, we use the ethernet mac to identify the client. in dhcpv6, there is just a uniqueue device id that might even be generated randomly. to find the ethernet address of a client, check the duid type and only use it when the dudid is of type 1 (link layer) or 3 (link layer address + time) and the link layer address type is 1 (ethernet). otherwise, assume the source ip is a link local address and extract it from that. this hack works for thinkpad t495, which uses random uuid based client duid.
2020-03-31audiohda: add pci vid/did for AMD Raven HD Audio Controller (T495)cinap_lenrek
2020-03-31kbd(3): fix a typo (thanks Alex Musolino)Sigrid
2020-03-29xen: fix rebootcode linkagecinap_lenrek
need to strip the a.out header, just like with the pc kernel.
2020-03-29lib9p: fix re-use of root Qid when using createfile(); remove unused dirqidgenBurnZeZ
2020-03-29pc64: enable uartpci (thanks taw9 for testing)Sigrid
2020-03-28mergeOri Bernstein
2020-03-28we prefer nil over 0, make the example show it.Ori Bernstein
2020-03-29pc, pc64: ignore the 64-bit bar flag when reserving membarcinap_lenrek
a bar with bit 3 set means the bar is the low half of a 64-bit wide bar.
2020-03-29pc: fix mp boot regression due mistake in mkfilecinap_lenrek
the previous mkfile had a sneaky hack that would use sed to delete the first 2 lines of hex output to strip the 32 byte long a.out header for apbootstrap and rebootcode. use 8l -H3 flag to strip the header from the output file.
2020-03-28kbd: add "repeat" file to set typematic repeat rate/delay on PS/2 keyboardsSigrid
2020-03-26grep: fix handling of -b flagAlex Musolino
Output buffering is automatically disabled when reading from stdin. In this case, supplying the -b flag ought to be redundant. However, since Bflag was being XORed into the flag set - rather than simply ORed - supplying -b would actually enable output buffering.
2020-03-24turn ptrdiff_t into a 64 bit typeOri Bernstein
while technically a 32 bit ptrdiff_t is in spec on systems with 64 bit ponters as long as we guarantee that individual objects are small enough, this can confuse legitimate code, so lets fix this.
2020-03-24add intmax_t/uintmax_t as required by c99 7.18.1.5Ori Bernstein
2020-03-23evaluate #if expressions using vlongOri Bernstein
#if expressions are expected to be evaluated using intmax_t, according to the C99 spec, 6.10.1 p3. On plan9, intmax_t maps to vlong.
2020-03-22mergeOri Bernstein
2020-03-22add va_copy macro, conforming to c99 7.15.1.2Ori Bernstein
2020-03-21update colemak kbmap, simpler version with scroll working (thanks jeremy)Sigrid
2020-03-21add colemak kbmap (thanks Silas McCroskey)Sigrid
2020-03-21add swiss german kbmap (thanks mike)Sigrid
2020-03-20bell labs is dead, manOri Bernstein
remove the last reference from 9fs.
2020-03-20kbdfs: fix kbmapread() not accounting for reads smaller than the size of the ↵BurnZeZ
line
2020-03-17Improve the posix preprocessor.Ori Bernstein
This fixes token pasting, making it expand when it should expand, and paste before expansion when it should paste before expanding. #define CAT(a, b) a ## b #define BAR 3 #define FOO CAT(BAR, 3) FOO now produces 33, while #define CAT(a, b) a ## b #define EOF (-1) #define NOP(x) x NOP(CAT(foo, EOF)) CAT(,EOF) CAT(,) produces fooEOF (-1) <empty> respectively.
2020-03-15fix ccom idempotencyOri Bernstein
ccom may be called multiple times on the same node, via 'goto loop' calls from the commute label, OADD, and a few other places. Casts to void could null out the LHS of the node, which would cause the compiler to crash if the cast was revisited due to one of these cases, because we tried frobbing n->left. Now, if n->left is nil, we just return.w
2020-03-10improve usage messages (thanks henesy)Ori Bernstein
Fix inconsistencies between programs and their usage messages, correct instances where information seems to be missing or lost. This includes missing arguments, making usage consistent with manuals, and so on.
2020-03-10fix -T option for doctypeOri Bernstein
We used to set $dev to -T, and leave the device type in the argument list. Now, we set it to -T$2, and shift it out of the list.
2020-03-09fix heredoc crashOri Bernstein
we emitted an error on heredoc tags, but we continued on, and added a heredoc entry to the list, with a tag that we couldn't handle. when processing this heredoc, rc would segfault. fix: don't add a heredoc to the list on error.
2020-03-09fix alignment in ape mallocOri Bernstein
We used to have a padding int in the structure after the next pointer, to align it to 16 bytes. On 64 bit architectures, the pointer was already 8 bits, so the padding misaligned things to 20 bytes. This fixes it so that we're explcit about the data alignment we want, instead of hoping that the various sizes line up.
2020-03-09sam: ^ does not need current fileSigrid
2020-03-09sam(1): document $% and $%dotSigrid
2020-03-09sam: add $%dot (thanks kvik)Sigrid
2020-03-08add usage messages to auth/(enable disable status).Ori Bernstein
print useful message when user invokes these commands incorrectly (thanks henesy)
2020-03-08lib9p: implement automatic remove-on-close cleanup in postsharesrv(), remove ↵cinap_lenrek
postfd() and sharefd() functions with the latest changes to shr(3), we can use ORCLOSE on the control file to get the mount in the share automatically removed when the server exits or something goes wrong during postsharesrv(). do not expose postfd() and sharefd() functions. they where undocumented and leak the control file descriptors.
2020-03-08mergecinap_lenrek
2020-03-08boorc, nusbrc: fix wrong redirections after &cinap_lenrek
the rc & operator changes stdin to /dev/null, so we have to do the <[0=1] inside the {} this never showed up as an issue because many fileservers just read 9p messages from standard output.