Commit graph

6980 commits

Author SHA1 Message Date
aiju e15b1b8930 add dtracy.h 2018-11-10 20:01:19 +00:00
aiju a7f5ecaf63 dtracy: missing break in dteverify 2018-11-10 14:01:42 +00:00
aiju e6d99771e5 adding dtracy (crude early version) 2018-11-10 13:46:16 +00:00
cinap_lenrek 8c097ae84a ssh: handle unknown MSG_CHANNE_REQUEST messages 2018-11-08 22:35:45 +01:00
cinap_lenrek 2a266430e3 ssh: handle MSG_GOBAL_REQUEST
respond to MSG_GLOBAL_REQUEST with MSG_REQUEST_FAILURE
as stated by rfc4254 when server wants a reply.

failing todo so breaks some proprietary keep-alive schemes.
2018-11-08 22:00:07 +01:00
cinap_lenrek 615f43b76e ip/dhcpd: Add swap server support in dhcpd (thanks k0ga) 2018-11-08 21:15:07 +01:00
cinap_lenrek 85afec4c2f bcm: intrenable() can happen from any cpu in case of dma interrupts 2018-11-08 20:26:32 +01:00
cinap_lenrek b7aedbb366 libdraw: cannot happen 2018-11-08 16:56:34 +01:00
cinap_lenrek df7fcc6cac libdraw: fix gengetwindow()
- fix fd leak in winname read() <= 0 case
- avoid freeing d->image (was by freeimage((*scrp)->image))
- dont leak screen and window in fullscreen mode
2018-11-07 22:01:18 +01:00
cinap_lenrek c0d21d35b1 bcm: cleanup timer code
- calculate hardcoded constants for more clarity
- avoid unneccesary modification of cntpns ctl register
- revert enabling IRQcntpns for cpu0
- remove unused Localintpending register offset constant
2018-11-07 17:02:09 +01:00
cinap_lenrek 385f52183c bcm: simplify irq handling by having per cpu Vctl chain 2018-11-07 16:49:50 +01:00
cinap_lenrek b0d226705c bcm: speed up co-processor operations by avoiding i+d cache flush on each operation
coproc.c generated the instrucitons anew each time,
requiering a i+d cache flush for each operation.

instead, we can speed this up like this:

given that the coprocessor registers are per cpu, we can
assume that interrupts have already been disabled by
the caller to prevent a process switch to another cpu.

we cache the instructions generated in a static append
only buffer and maintain separate end pointers for each
cpu.

the cache flushes only need to be done when new
operations have been added to the buffer.
2018-11-07 16:48:14 +01:00
aiju 17f0b2ce38 nusb/serial: fix wrong guard statement (thanks deuteron) 2018-11-06 12:05:15 +00:00
cinap_lenrek e76452a69f merge 2018-11-06 04:33:29 +01:00
cinap_lenrek a66be23396 dnstcp: temporarily switch on resolver mode so we can resolve the dnsslaves for axfr check 2018-11-06 04:31:48 +01:00
aiju 1d0f8a7e51 sed: only dollars as first address are a problem for -u 2018-11-05 20:17:48 +00:00
mischief a86de839ca rio(1): fix typo 2018-11-04 11:39:04 -08:00
mischief 52ad5b3ec5 mp(2): document mpfactorial 2018-11-04 11:37:13 -08:00
mischief 6df3f7bf38 libmp: declare mpfactorial 2018-11-04 11:37:02 -08:00
cinap_lenrek 0a681f38eb merge 2018-11-04 19:50:06 +01:00
cinap_lenrek 93e493f391 libaml: allow amlmapio() to re-enter the interpreter (can happen by pciadd() -> amleval())
- make frame base pointer variable
- in rwreg(), save/restore the interpreter state and allocate a Frame* on the stack
- add overflow checks for frame base pointer to xec() and amleval()
- gc() scans the whole stack from FP to the *real* bottom F0
2018-11-04 19:48:27 +01:00
aiju 0bd213b7b0 devvmx: remove bogus . direntry 2018-11-04 16:03:35 +00:00
cinap_lenrek 89c659d80b bcm: fix mysterious core clock resets under SMP (thanks richard miller)
reference: https://github.com/raspberrypi/firmware/issues/542

procsave(Proc* p)
{
	uvlong t;

	cycles(&t);
	p->pcycles += t;

// TODO: save and restore VFPv3 FP state once 5[cal] know the new registers.
	fpuprocsave(p);
	/*
	 * Prevent the following scenario:
	 *	pX sleeps on cpuA, leaving its page tables in mmul1
	 *	pX wakes up on cpuB, and exits, freeing its page tables
	 *  pY on cpuB allocates a freed page table page and overwrites with data
	 *  cpuA takes an interrupt, and is now running with bad page tables
	 * In theory this shouldn't hurt because only user address space tables
	 * are affected, and mmuswitch will clear mmul1 before a user process is
	 * dispatched.  But empirically it correlates with weird problems, eg
	 * resetting of the core clock at 0x4000001C which confuses local timers.
	 */
	if(conf.nmach > 1)
		mmuswitch(nil);
}
2018-11-04 16:00:32 +01:00
cinap_lenrek dd82b657c0 bcm: fix mistake in mkfile 2018-11-01 01:07:51 +01:00
cinap_lenrek 5608be398e bcm: fix /dev/reboot text/data corruption (thanks richard miller)
- clean dcache before turning off caches and mmu (rebootcode.s)
- use WFE and inter-core mailboxes for cpu startup (rebootcode.s)
- disable SMP during dcache invalidation before enabling caches and mmu (in armv7.s)
2018-10-31 19:48:16 +01:00
Alex Musolino 913be4e74a awk(1): fix append operator to avoid truncating file 2018-10-31 16:49:02 +10:30
cinap_lenrek 8e9d2434e9 bcm: provide /dev/cputemp in a format stats can understand 2018-10-28 07:10:27 +01:00
cinap_lenrek daf153009e merge 2018-10-28 06:17:34 +01:00
cinap_lenrek b715c39bfa bcm: simplify reboot code
- synchronize rebootcode installation
- handle the 1MB identity map in mmu.c (mmuinit1())
- do not overlap CONFADDR with rebootcode, the non boot
  processors are parked there.
- make REBOOTADDR physical address
2018-10-28 06:16:10 +01:00
cinap_lenrek 0fc2adb43d bcm: cleanup clock code
- disable local clock on interrupt to prevent accidents when reenabling
- always regitster local clock interrupt handler, even for cpu0
- simplify microdelay()
- don't mess with watchdog
2018-10-28 06:09:05 +01:00
cinap_lenrek f17a5cc2cf bcm: fix l2 cache maintenance routines for raspi3 (armv8)
armv8 has 16-way l2, so adjust shift for the set-way cache
tag format.
2018-10-28 06:05:43 +01:00
qwx d74fdfc022 misc small manpage fixes 2018-10-28 00:05:05 +02:00
cinap_lenrek 2ee4c08974 devuart: don't sleep in uartdrainoutput() when called splhi or without a process
uartdrainoutput() might be called in early initialization
from uartctl() without a process.
2018-10-27 20:00:12 +02:00
cinap_lenrek d81f4d4866 rc: skip searchpath for "", "." and ".." 2018-10-27 18:32:00 +02:00
cinap_lenrek d17a049c5b rc: use searchpath() logic to handle $cdpath 2018-10-26 10:25:23 +02:00
cinap_lenrek 1a55b8d1f0 rc: ignore $cdpath for # device rooted paths (thanks kivik) 2018-10-26 09:52:05 +02:00
23hiro 05021e0579 add Centrino Wireless-N 1030 (thanks lksmk from brazil) 2018-10-25 08:09:10 +02:00
cinap_lenrek b65a5a1ca5 /sys/lib/dist/mkfile: add pi.img target for raspi sdcard image 2018-10-22 00:16:04 +02:00
cinap_lenrek f059563b9d add /sys/src/boot/bcm/mkfile to download raspberry pi bootcode firmware 2018-10-22 00:15:39 +02:00
cinap_lenrek 8dfff00e50 nusb/serial: add support for CH340 serial converter 2018-10-21 17:24:33 +02:00
cinap_lenrek 21001d4294 merge 2018-10-21 03:44:16 +02:00
cinap_lenrek 2fd35e9bf8 kbdfs: don't get confused by broken utf8 2018-10-21 03:42:24 +02:00
qwx f5c6a870bf doom: fix music for patch wads
revert last change, which used games/wadfs to expose genmidi and music lumps.
replacements from patch wads were never seen that way.  instead, write genmidi
and music lumps to /tmp and play them from there.
2018-10-21 00:11:39 +02:00
cinap_lenrek b4eb667f02 acme: fix fd checks - initialize Window.rdselfd to -1 not 0 2018-10-20 23:57:50 +02:00
BurnZeZ 84e019aba3 fix misleading/wrong fd checks 2018-10-20 18:44:09 +00:00
cinap_lenrek 292cce2ad1 libdisk: catch null bytes in proto file, fix memory leaks 2018-10-20 20:32:22 +02:00
cinap_lenrek 5bb7240ee9 nusb/kb: work arround broken split transaction on raspi's dwc otg usb controller 2018-10-20 19:57:37 +02:00
cinap_lenrek 83e20b4df1 bcm: import changes for raspi2/3 from richard miller 2018-10-20 19:56:31 +02:00
cinap_lenrek 796e5e6000 nusbrc: support for raspi3 ethernet 2018-10-20 19:53:57 +02:00
cinap_lenrek 37dcb25eee kernel: fix allocb for BLOCKALIGN*2 >= Hdrspc 2018-10-20 19:52:54 +02:00