summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-16ethergenet: remove debuggingcinap_lenrek
the hangs where caused by missing NX bits on the mmio mappings, so the debug code is not needed anymore.
2019-08-16bcm64: set XN bits for kernel device mappingscinap_lenrek
2019-08-12cc: use 7 octal digits for 21 bit runescinap_lenrek
2019-08-02libauth: do not set errstr in auth_rpc() for ARdone result (thanks majiru)cinap_lenrek
2019-07-28bcm, bcm64: add vcore support for raspberry pi 3 GPIO expandercinap_lenrek
2019-07-27bcm, bcm64: add BCM2711 support for gpiopull(), fix gpiomeminit(), cleanupcinap_lenrek
according to the following linux change, BCM2711 uses a different method for changing pullup/down mode: https://github.com/raspberrypi/linux/commit/abcfd092860760087b87acbdda0963fe7906839c#diff-cf078559c38543ac72c5db99323e236d gpiomeminit() was broken, using virtual address for the gpio physseg instead of the physical one. cleanup the code, avoid repetition by declaring static u32int *regs variable. make local variable names consistent.
2019-07-27bcm64: fix wrong prescaler for generic timer on rpi4cinap_lenrek
the raspberry pi 4 uses 54 instead of 19.2 MHz crystal. detect which frequency is used by reading OTP bootmode register: https://www.raspberrypi.org/documentation/hardware/raspberrypi/otpbits.md Bit 1: sets the oscillator frequency to 19.2MHz
2019-07-25ethergenet: fix flow control negotiationcinap_lenrek
2019-07-25bcm, bcm64: clean dma destination buffer before issuing dma in case of non ↵cinap_lenrek
cache-line-size aligned buffer
2019-07-25bcm64: add config for raspberry pi 4cinap_lenrek
2019-07-25bcm64: work in progress genet ethernet driver for raspberry pi 4cinap_lenrek
2019-07-25bcm64: reorganize virtual memory map for rapberry pi4cinap_lenrek
2019-07-25bcm64: update io.h for pci express and raspberry pi 4cinap_lenrek
2019-07-25bcm64: add pci express driver for raspberry pi 4cinap_lenrek
2019-07-25bcm64: add gic interrupt controller driver for raspberry pi 4cinap_lenrek
2019-07-25bcm64: add gisb arbiter driver to catch bus timeoutscinap_lenrek
2019-07-25bcm, bcm64: make irq.$O optional and add intrdisable(), use intrenable()cinap_lenrek
the raspberry pi 4 has a new interrupt controller and pci support, so get rid of intrenable() macro and properly make intrenable function with tbdf argument.
2019-07-25bcm64: strip debug symbols to make sure .img file is multiple of 4 bytescinap_lenrek
the raspberry pi4 firmware refuses to enable the GIC interrup controller for arm64 when the .img file is not a multiple of 4 bytes. yes, this is insane and nowhere documented.
2019-07-25bcm, bcm64: add dmaflush() function and make virtio size and virtual address ↵cinap_lenrek
configurable in Soc.virtio and Soc.iosize
2019-07-25bcm, bcm64: add support for device tree parameter passingcinap_lenrek
the new raspberry pi 4 firmware for arm64 seems to have broken atag support. so we now parse the device tree structure to get the bootargs and memory configuration.
2019-07-17usbxhci: implement portable dma flush operations and move to port/cinap_lenrek
2019-07-17usbehci: introduce dmaflush() function to handle portable cache invalidation ↵cinap_lenrek
for device drivers
2019-07-11mergecinap_lenrek
2019-07-11kernel: move common ethermii to port/cinap_lenrek
2019-07-11devuart: make sure uart is enabled in uartkick()cinap_lenrek
2019-07-02walk(1): add history sectionAlex Musolino
2019-07-02tinc(8): add history sectionAlex Musolino
2019-07-02usbxhci: fix mysterious ENABLESLOT failures (update to XHCI spec revision ↵cinap_lenrek
1.2 (2019)) Ori Bernstein had Sunrise Point-H USB 3.0 xHCI Controller that would mysteriously crash on the 5th ENABLESLOT command. This was reproducable by even just allocating slots in a loop right after init. It turns out, the 1.2 spec extended the Max Scratchpad Buffers in HCSPARAMS2 so our driver would not allocate enougth scratchpad buffers and controller firmware would crash once it went beyond our allocated scratchpad buffer array. This change also fixes: - ignore bits 16:31 in PAGESIZE register - preserve bits 10:31 in the CONFIG register - handle ADDESSDEV command failure (so it can be retried)
2019-06-28pc64: preallocate mmupool page tablescinap_lenrek
preallocate 2% of user pages for page tables and MMU structures and keep them mapped in the VMAP range. this leaves more space in the KZERO window and avoids running out of kernel memory on machines with large amounts of memory.
2019-06-24ape: reimplement rename() - fixing compiler warnings and handling more error ↵cinap_lenrek
cases handle empty filename, dot and dotdot. handle mismatching from/to directory/file type. cleanup destination file on error. error when attempting to copy non-empty directories. little test program: #include <unistd.h> #include <stdio.h> int main(int argc, char *argv[]) { if(argc != 3){ fprintf(stderr, "usage: %s old new\n", argv[0]); return 1; } if(rename(argv[1], argv[2])){ perror("rename"); return 1; } return 0; }
2019-06-248c, 6c: LEA x, R; MOV (R), R -> MOV x, Rcinap_lenrek
2019-06-248c, 6c: avoid allocating index registers when we don't have tocinap_lenrek
when a operation receives a chain of OINDEX nodes as its operands, each indexing step used to allocate a new index register. this is wastefull an can result in running out of fixed registers on 386 for code such as: x = a[a[a[a[i]]]]. instead we attempt to reuse the destination register of the operation as the index register if it is not otherwise referenced. this results in the index chain to use a single register for index and result and leaves registers free to be used for something usefull instead. for 6c, try to avoid R13 as well as BP index base register.
2019-06-248c: skip 64-bit regpair allocation for OINDEX nodes in cgen64()cinap_lenrek
OINDEX can only return TLONG result on 386 so give it a register instead of a regpair and let gmove() handle the conversion.
2019-06-23ape: revert rename() changecinap_lenrek
new implementation gets stuck in a infinite loop. backing this out for now.
2019-06-21Turn on warnings when building libap.Ori Bernstein
For ape, we never enabled warnings in cflags. Turning it on brings up a lot of warnings. Most are noise, but a few caught unused variables and trunctaions of pointers. to smaller integers (int, long). A few warnings remain.
2019-06-21gs: apply mitigations against CVE-2017-8291 (thanks jsmoody)cinap_lenrek
To reproduce: gs -q -dNOPAUSE -dSAFER '-sDEVICE=ppmraw' '-sOutputFile=/dev/null' <<. %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: -0 -0 100 100 /size_from 10000 def /size_step 500 def /size_to 65000 def /enlarge 1000 def %/bigarr 65000 array def 0 size_from size_step size_to { pop 1 add } for /buffercount exch def /buffersizes buffercount array def 0 size_from size_step size_to { buffersizes exch 2 index exch put 1 add } for pop /buffers buffercount array def 0 1 buffercount 1 sub { /ind exch def buffersizes ind get /cursize exch def cursize string /curbuf exch def buffers ind curbuf put cursize 16 sub 1 cursize 1 sub { curbuf exch 255 put } for } for /buffersearchvars [0 0 0 0 0] def /sdevice [0] def enlarge array aload { .eqproc buffersearchvars 0 buffersearchvars 0 get 1 add put buffersearchvars 1 0 put buffersearchvars 2 0 put buffercount { buffers buffersearchvars 1 get get buffersizes buffersearchvars 1 get get 16 sub get 254 le { buffersearchvars 2 1 put buffersearchvars 3 buffers buffersearchvars 1 get get put buffersearchvars 4 buffersizes buffersearchvars 1 get get 16 sub put } if buffersearchvars 1 buffersearchvars 1 get 1 add put } repeat buffersearchvars 2 get 1 ge { exit } if %(.) print } loop .eqproc .eqproc .eqproc sdevice 0 currentdevice buffersearchvars 3 get buffersearchvars 4 get 16#7e put buffersearchvars 3 get buffersearchvars 4 get 1 add 16#12 put buffersearchvars 3 get buffersearchvars 4 get 5 add 16#ff put put buffersearchvars 0 get array aload sdevice 0 get 16#3e8 0 put sdevice 0 get 16#3b0 0 put sdevice 0 get 16#3f0 0 put currentdevice null false mark /OutputFile (%pipe%echo gotce) .putdeviceparams 1 true .outputpage .rsdparams %{ } loop 0 0 .quit %asdf .
2019-06-20cwfs: remove orphaned lrand.ccinap_lenrek
2019-06-20cwfs: remove old some assert() debuggingcinap_lenrek
2019-06-20bcm, kw, omap, teg2: implement setregisters()cinap_lenrek
2019-06-20cwfs: fix root access time qid path comparsioncinap_lenrek
2019-06-20upas/smtp: handle temporary authentication failurescinap_lenrek
under heavy load, factotum can return a "too much activity" error, which upas/smtpd and upas/smtp should consider a temporary error instead of a permanent one.
2019-06-20rc-httpd: serve markdown with text/plain content-typeAlex Musolino
2019-06-20pc64: actually fix it, what was i THINKINGcinap_lenrek
2019-06-20pc64: fix compiler warning in rebootjump() entry calculationcinap_lenrek
2019-06-20stdio: fix putc(), plan9 versioncinap_lenrek
2019-06-19ape: fix stdio putc() macro, avoiding "result of operation not used" warningcinap_lenrek
moving _IO_CHMASK masking on the right hand side fixes it.
2019-06-19cc: remove nullwarn() from OCAST codegen, zap void castscinap_lenrek
implicit casts would cause spurious "result of operation not used" warnings such as ape's stdio putc() macro. make (void) casts non-ops when the casted expression has no side effects. this avoid spurious warning with ape's assert() macro.
2019-06-19cwfs: properly handle 64 bit qid pathcinap_lenrek
for historical reasons, kenfs stores directory entries in pre 9p2000 format with directories having the QPDIR bit 31 set in the qid path. however, the 64 bit fileserver allows 64 bit qid paths. given that we do not support pre 9p2000 clients and do not rely on the QPDIR, but want to keep the block check tags consistent, we will *INVERT* the QPDIR bit in directory entry qid paths for directories. this preserves the on-disk semantics (for < 31 bit qmax) but does not complicate qid generation and recovery. also makes it easy to convert between directory entry qid and 9p format.
2019-06-19pcc: back out -+ flag removal to allow gracefull upgrade path with new pcc ↵cinap_lenrek
but old cpp
2019-06-18Always turn on the -+ flag in cppOri Bernstein
C99 comments have been the default in compilers for something like 20 years now. This means we don't need to remember to turn it on when porting software, and gets rid of cryptic errors about unterminated character constants when someone writes something like: // Didn't need to... We still accept the flag to avoid breaking mkfiles, but we do nothing with it. This also removes the documentation, since the option does nothing now.