]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
5 years agofix dtracy man page
aiju [Sat, 8 Dec 2018 17:24:23 +0000 (17:24 +0000)]
fix dtracy man page

5 years agoadd dtracy manpage
aiju [Sat, 8 Dec 2018 16:35:21 +0000 (16:35 +0000)]
add dtracy manpage

5 years agodtracy: add support for aggregations
aiju [Sat, 8 Dec 2018 15:07:53 +0000 (15:07 +0000)]
dtracy: add support for aggregations

5 years agorio: get rid of window delete thread, fix mysterious disappearing windows
cinap_lenrek [Fri, 7 Dec 2018 15:32:04 +0000 (16:32 +0100)]
rio: get rid of window delete thread, fix mysterious disappearing windows

because a client might not handle resize, rio would try to move ther
window offsceen after 750 ms. however, it does this by window name,
which could have been reassigned by another concurrent rio, causing the
wrong window to disappear.

now we always move the window offscreen before freeimage(). this way we
are sure to still have the right reference to the original window.

5 years agoadd entries for il rcpu
BurnZeZ [Fri, 7 Dec 2018 01:41:27 +0000 (01:41 +0000)]
add entries for il rcpu

5 years agoptrap(4): fix formatting
BurnZeZ [Thu, 6 Dec 2018 06:53:41 +0000 (06:53 +0000)]
ptrap(4): fix formatting

5 years agoforp: change indexing to verilog-like semantics
aiju [Thu, 6 Dec 2018 10:56:32 +0000 (10:56 +0000)]
forp: change indexing to verilog-like semantics

5 years agoacid: fix transcript
BurnZeZ [Thu, 6 Dec 2018 07:11:35 +0000 (07:11 +0000)]
acid: fix transcript

5 years agolibmp: fix mptouv behaviour to match mptoui
aiju [Thu, 6 Dec 2018 09:32:20 +0000 (09:32 +0000)]
libmp: fix mptouv behaviour to match mptoui

5 years agolibmp: add tests for integer conversions
aiju [Thu, 6 Dec 2018 09:32:07 +0000 (09:32 +0000)]
libmp: add tests for integer conversions

5 years agomptov: make it actually work
aiju [Wed, 5 Dec 2018 10:26:52 +0000 (10:26 +0000)]
mptov: make it actually work

5 years agokernel: remove unused static variable "sofar" from timerintr() (thanks mischief)
cinap_lenrek [Wed, 5 Dec 2018 02:59:08 +0000 (03:59 +0100)]
kernel: remove unused static variable "sofar" from timerintr() (thanks mischief)

5 years agokernel: fix tprof on multiprocessor
cinap_lenrek [Wed, 5 Dec 2018 00:43:19 +0000 (01:43 +0100)]
kernel: fix tprof on multiprocessor

segclock() has to be called from hzclock(), otherwise
only processes running on cpu0 would catche the interrupt
and the time delta would be wrong.

lock the segment when allocating Seg->profile as
profile ctl might be issued from multiple processes.
Proc->debug qlock is not sufficient.

Seg->profile can never be freed or reallocated once
set as the timer interrupt accesses it without any
locking.

5 years agofactotum: rsa: use mptober() to get right adjusted result instead of mptobe() and...
cinap_lenrek [Tue, 4 Dec 2018 18:34:36 +0000 (19:34 +0100)]
factotum: rsa: use mptober() to get right adjusted result instead of mptobe() and memset()

5 years agobootrc: remove $ff references (was old parsed /boot/boot argument list)
cinap_lenrek [Tue, 4 Dec 2018 17:55:56 +0000 (18:55 +0100)]
bootrc: remove $ff references (was old parsed /boot/boot argument list)

5 years agokencc: make "function not declared" a warning unless compiling with -T
aiju [Sun, 2 Dec 2018 11:36:58 +0000 (11:36 +0000)]
kencc: make "function not declared" a warning unless compiling with -T

5 years agopython: explicitly declare WaitForThreadShutdown as void
mischief [Sun, 2 Dec 2018 11:30:30 +0000 (03:30 -0800)]
python: explicitly declare WaitForThreadShutdown as void

5 years agoape: declare gethostname
mischief [Sun, 2 Dec 2018 11:30:22 +0000 (03:30 -0800)]
ape: declare gethostname

5 years agomerge
cinap_lenrek [Sun, 2 Dec 2018 02:27:19 +0000 (03:27 +0100)]
merge

5 years agolibsec: fix memory leak in pkcs1_decrypt()
cinap_lenrek [Sun, 2 Dec 2018 02:23:48 +0000 (03:23 +0100)]
libsec: fix memory leak in pkcs1_decrypt()

5 years agolibdtracy: wrong operator in XORI (thanks aiju)
BurnZeZ [Sat, 1 Dec 2018 18:07:40 +0000 (18:07 +0000)]
libdtracy: wrong operator in XORI (thanks aiju)

5 years agokencc: turn "function args not checked" warning into "function not declared" error...
aiju [Sat, 1 Dec 2018 11:39:49 +0000 (11:39 +0000)]
kencc: turn "function args not checked" warning into "function not declared" error if appropriate

5 years ago2c(1): document some differences with ANSI C
aiju [Sat, 1 Dec 2018 11:28:26 +0000 (11:28 +0000)]
2c(1): document some differences with ANSI C

5 years agohgwebfs: write headers individually, so they are not limited by webfs iounit (thanks...
cinap_lenrek [Sat, 1 Dec 2018 03:22:07 +0000 (04:22 +0100)]
hgwebfs: write headers individually, so they are not limited by webfs iounit (thanks mischief)

5 years agowebfs: write headers individually so they are not limited in sum to the 8k buffer
cinap_lenrek [Sat, 1 Dec 2018 03:20:53 +0000 (04:20 +0100)]
webfs: write headers individually so they are not limited in sum to the 8k buffer

5 years agofplot: add support for readout with middle mouse button
aiju [Fri, 30 Nov 2018 17:32:10 +0000 (17:32 +0000)]
fplot: add support for readout with middle mouse button

5 years agofplot: color different curves
aiju [Fri, 30 Nov 2018 16:58:01 +0000 (16:58 +0000)]
fplot: color different curves

5 years agofplot: compute y range correctly when used with multiple graphs
aiju [Fri, 30 Nov 2018 16:12:02 +0000 (16:12 +0000)]
fplot: compute y range correctly when used with multiple graphs

5 years agoupas: get rid of broken validatesender example, remove redundant upas/misc and setup...
cinap_lenrek [Wed, 28 Nov 2018 20:12:11 +0000 (21:12 +0100)]
upas: get rid of broken validatesender example, remove redundant upas/misc and setup target

5 years agohgwebfs: read to eof by default to match urllib2 behavior
mischief [Wed, 28 Nov 2018 19:34:52 +0000 (11:34 -0800)]
hgwebfs: read to eof by default to match urllib2 behavior

5 years agodevip: fix arpread, dont return partial entries
cinap_lenrek [Wed, 28 Nov 2018 11:41:18 +0000 (12:41 +0100)]
devip: fix arpread, dont return partial entries

5 years agofshalt: wait for fileservers command file to vanish
cinap_lenrek [Tue, 27 Nov 2018 21:37:32 +0000 (22:37 +0100)]
fshalt: wait for fileservers command file to vanish

cwfs and hjfs create ther /srv command files with
ORCLOSE flag, so they get removed once the fileserver
terminates. we can use this to check that the fileserver
has in fact finished halting without making assumtions
about the time it should maximally take for any fileserver
to write out its buffers to disk.

5 years agoupas/fs: avoid switch on vlong breaking build (thanks k0ga)
cinap_lenrek [Mon, 26 Nov 2018 20:36:51 +0000 (21:36 +0100)]
upas/fs: avoid switch on vlong breaking build (thanks k0ga)

5 years agoupas/fs: another mistake ...
cinap_lenrek [Mon, 26 Nov 2018 20:29:33 +0000 (21:29 +0100)]
upas/fs: another mistake ...

5 years agoupas/fs: fix broken body.ext in walk (thanks sl)
cinap_lenrek [Mon, 26 Nov 2018 19:15:30 +0000 (20:15 +0100)]
upas/fs: fix broken body.ext in walk (thanks sl)

5 years agolibmach: change amd64 szreg to 8 (thanks charles forsyth)
cinap_lenrek [Sat, 24 Nov 2018 21:38:00 +0000 (22:38 +0100)]
libmach: change amd64 szreg to 8 (thanks charles forsyth)

5 years agodelete old NOTICE file
aiju [Sat, 24 Nov 2018 15:22:17 +0000 (15:22 +0000)]
delete old NOTICE file

5 years agosnap: use Mach->szaddr as the width of the stack pointer (fixes snap on amd64)
cinap_lenrek [Thu, 22 Nov 2018 19:27:27 +0000 (20:27 +0100)]
snap: use Mach->szaddr as the width of the stack pointer (fixes snap on amd64)

to read the value of the stack pointer register, snap
used Machdata->szreg to determine the width of the
SP register in the Ureg structure. however, the value
does not match the Ureg.sp type for a number of architectures
(mips2, amd64) and it is unclear if this was an oversight
as it is rarely used (snap is indeed the only user) or
if it was intended for a different purpose.

so we use szaddr instead which matches the stack pointer
width in the Ureg and fixes the truncated stack issue on
amd64.

5 years agosnap: add debug flag, make debug less verbose
cinap_lenrek [Thu, 22 Nov 2018 14:09:54 +0000 (15:09 +0100)]
snap: add debug flag, make debug less verbose

5 years agosnap: check for overflows, cleanup error handling
cinap_lenrek [Thu, 22 Nov 2018 11:44:15 +0000 (12:44 +0100)]
snap: check for overflows, cleanup error handling

5 years agosnap: consequently use ulong for page index and count
cinap_lenrek [Thu, 22 Nov 2018 09:31:30 +0000 (10:31 +0100)]
snap: consequently use ulong for page index and count

5 years agosnap: be more conservative taking stack snapshot
cinap_lenrek [Thu, 22 Nov 2018 09:30:45 +0000 (10:30 +0100)]
snap: be more conservative taking stack snapshot

include up to 8k below the stack to get some more context.

don't assume stack is at least 16K.

5 years agoupas/fs: keep messages *marked* for deletion in the index
cinap_lenrek [Thu, 22 Nov 2018 07:55:13 +0000 (08:55 +0100)]
upas/fs: keep messages *marked* for deletion in the index

5 years agoupas/fs: allow msgincref() with mb->refs == 0
cinap_lenrek [Thu, 22 Nov 2018 07:49:41 +0000 (08:49 +0100)]
upas/fs: allow msgincref() with mb->refs == 0

this can happen when the on the final sync when the mailbox
is being freed:

freembox -> mboxdecref -> syncmbox -> wridxfile -> pridx -> insurecache -> msgincref

5 years agoupas/fs: checkfid() might be called with uninitialized fid, ignore
cinap_lenrek [Wed, 21 Nov 2018 20:48:55 +0000 (21:48 +0100)]
upas/fs: checkfid() might be called with uninitialized fid, ignore

5 years agoupas/fs: fix walk
cinap_lenrek [Wed, 21 Nov 2018 16:32:36 +0000 (17:32 +0100)]
upas/fs: fix walk

5 years agoupas/fs: don't enter mailbox into hashtree when it is being freed
cinap_lenrek [Wed, 21 Nov 2018 15:19:51 +0000 (16:19 +0100)]
upas/fs: don't enter mailbox into hashtree when it is being freed

syncmbox() used to enter the mailbox into the hash tree to
update the qid.vers. this is wrong when we are doing the final
sync before freeing the mailbox as the hash reference has already
been removed by freemailbox().

also avoid adding hash entries for mails for the about to be
freed mailbox in cachehash().

5 years agomp(2): fix spelling
cinap_lenrek [Wed, 21 Nov 2018 01:08:15 +0000 (02:08 +0100)]
mp(2): fix spelling

5 years agomp(2): clarify mptoa() and mpfmt() default base
cinap_lenrek [Wed, 21 Nov 2018 00:15:43 +0000 (01:15 +0100)]
mp(2): clarify mptoa() and mpfmt() default base

5 years agoupas/fs: rework the refcounting, use 64bit qid path, add checks
cinap_lenrek [Tue, 20 Nov 2018 23:37:35 +0000 (00:37 +0100)]
upas/fs: rework the refcounting, use 64bit qid path, add checks

add function to check the refcounts for Mailbox and Message on a fid

use the full 64 bit of the qid.path, so we can use the full 32 bit for the id

instead of only maintaining refcount for the top message, msgincref() now
adds a reference to all its parent messages including self and top message.
then we can check in recursive delmessage() that all the parts have a zero
refcount.

remove the Fid.mtop field, it was never used.

make sure deletion and flag changes only affect the top message.

cachefree(): only look for top message in lru. sub-parts are never
added to the cache.

use the nparts field when reading sub-part of existing message, so
that we parse the index right in case the number of parts somehow
changed.

messages marked as Deleted but still in inbox should be written
to the index.

5 years agogames/md: fix mkfile
aiju [Tue, 20 Nov 2018 09:22:04 +0000 (09:22 +0000)]
games/md: fix mkfile

5 years agogames/md: use cpu.c from blit
aiju [Tue, 20 Nov 2018 09:20:46 +0000 (09:20 +0000)]
games/md: use cpu.c from blit

5 years agogames/blit: clean up cpu.c and make it pass tests
aiju [Tue, 20 Nov 2018 09:18:20 +0000 (09:18 +0000)]
games/blit: clean up cpu.c and make it pass tests

5 years agopc, pc64: park application processors in rebootcode with mmu off
cinap_lenrek [Mon, 19 Nov 2018 17:42:01 +0000 (18:42 +0100)]
pc, pc64: park application processors in rebootcode with mmu off

instead of having application processors spin in mpshutdown()
with mmu on, and be subject to reboot() overriding kernel text
and modifying page tables, park the application processors in
rebootcode idle loop with the mmu off.

5 years agovt(1): vt doesnt exit when the host process exits as claimed (thanks driusan)
cinap_lenrek [Sun, 18 Nov 2018 20:28:56 +0000 (21:28 +0100)]
vt(1): vt doesnt exit when the host process exits as claimed (thanks driusan)

5 years agocc: fix wrong "useless or misleading comparison" warning
cinap_lenrek [Sun, 18 Nov 2018 19:42:45 +0000 (20:42 +0100)]
cc: fix wrong "useless or misleading comparison" warning

to reproduce:

  u8int x, y;

  x = 0xff;
  y = 0xc0;
  if((s8int)(x & y) >= 0)
  print("help\n");

compiles correctly but prints a warning

warning: test.c:11 useless or misleading comparison: UINT >= 0

the issue is that compar() unconditionally skipped over
all left casts ignoring the case when a cast would sign
extend the value.

the new code only skips over the cast when the original
type with is smaller than the cast result or when they
are equal width and types have same signedness. so the
effective left hand side type is the last truncation
or sign extension.

5 years agorc: implement $"x in terms of Xdol() and new Xqw() instruction
cinap_lenrek [Sun, 18 Nov 2018 03:56:48 +0000 (04:56 +0100)]
rc: implement $"x in terms of Xdol() and new Xqw() instruction

to get $"1 right, remove Xqdol() and instead implement it in
terms of Xdol() instruction and use the new Xqw() instruction
to quote the resulting list.

5 years agodevip: fix swapped tcp snd.scale and recv.scale in tcpstate() format (thanks joe9)
cinap_lenrek [Sun, 18 Nov 2018 03:14:41 +0000 (04:14 +0100)]
devip: fix swapped tcp snd.scale and recv.scale in tcpstate() format (thanks joe9)

5 years agolibdraw: avoid deadlock for mouse ioproc sending on resizec
cinap_lenrek [Sun, 18 Nov 2018 02:37:04 +0000 (03:37 +0100)]
libdraw: avoid deadlock for mouse ioproc sending on resizec

a deadlock has been observed with samterm (thanks burnzez),
that shows the mouse ioproc being stuck in sending on the
resize channel, while the mouse consumer is stuck in a
readmouse() loop wanting a rectangle to be drawn by the
user:

recv(v=0x42df50)+0x28 /sys/src/libthread/channel.c:321
readmouse(mc=0x42df50)+0x54 /sys/src/libdraw/mouse.c:34
getrect(.ret=0x41bce0,but=0x4,mc=0x42df50)+0x62 /sys/src/libdraw/getrect.c:49
r=0x41bc70
rc=0x41bc70
getr(rp=0x41bce0)+0x24 /sys/src/cmd/samterm/main.c:244
p=0x6b000004f6
r=0x2
sweeptext(new=0x0,tag=0x2d)+0x12 /sys/src/cmd/samterm/menu.c:208
r=0x2
t=0x42df50
inmesg(type=0x2,count=0x2)+0x1ab /sys/src/cmd/samterm/mesg.c:136
m=0x10000002d
l=0x2d00001b00
i=0x43829000000001
t=0x438290
lp=0x42e050
rcv()+0x7a /sys/src/cmd/samterm/mesg.c:77
threadmain(argv=0x7ffffeffef90)+0x173 /sys/src/cmd/samterm/main.c:63

so avoid blocking in the mouse ioproc by using nbsend()
instead of send() for writing to the resize channel.

5 years agodevbridge: fix runt packets going through the bridge (thanks cinap)
mischief [Sun, 18 Nov 2018 01:23:56 +0000 (17:23 -0800)]
devbridge: fix runt packets going through the bridge (thanks cinap)

linux will send small, unpadded arp packets which may arrive over
wifi, so allow small packets into the bridge and pad any packets that
are too small when going out.

5 years agogames/c64: make keyboard table more readable
aiju [Sat, 17 Nov 2018 09:48:46 +0000 (09:48 +0000)]
games/c64: make keyboard table more readable

5 years agoether82563: ignore i82753 checksums, fixes T60 ethernet
mischief [Wed, 14 Nov 2018 19:33:52 +0000 (11:33 -0800)]
ether82563: ignore i82753 checksums, fixes T60 ethernet

5 years agonusb/kb: multitouch support (touchscreens, stylus)
cinap_lenrek [Wed, 14 Nov 2018 08:12:34 +0000 (09:12 +0100)]
nusb/kb: multitouch support (touchscreens, stylus)

touchscreens signal multiple contact points (X/Y) in
the hid descriptor separated by being nested in separate
collections. the contact point is identified by a
optional contact id. if omited, we use the collection
index and report id.

so we collect all the items (X/Y, buttons, wheel) from
separate collections in Hidslot structures and in the
end combine all the slots together.

buttons are or'ed together while absolute X/Y is applied
when it changed. relative X/Y deltas get added together.

thanks to kivik and Glats for testing.

5 years agorcpu: fix pvar to initialize empty variables (thanks mycroftiv)
cinap_lenrek [Tue, 13 Nov 2018 10:03:37 +0000 (11:03 +0100)]
rcpu: fix pvar to initialize empty variables (thanks mycroftiv)

5 years agonusb/kb: revert multitouch, breaks some mice...
cinap_lenrek [Tue, 13 Nov 2018 02:34:19 +0000 (03:34 +0100)]
nusb/kb: revert multitouch, breaks some mice...

5 years agoupa/imap4d: ignore messages without digest info
cinap_lenrek [Mon, 12 Nov 2018 19:43:25 +0000 (20:43 +0100)]
upa/imap4d: ignore messages without digest info

5 years agodisk/mkfs: remove unused cputype variable (thanks kvik)
cinap_lenrek [Mon, 12 Nov 2018 15:54:59 +0000 (16:54 +0100)]
disk/mkfs: remove unused cputype variable (thanks kvik)

5 years agomerge
cinap_lenrek [Mon, 12 Nov 2018 07:53:29 +0000 (08:53 +0100)]
merge

5 years agonusb/kb: lilu dallas multitouch
cinap_lenrek [Mon, 12 Nov 2018 07:52:01 +0000 (08:52 +0100)]
nusb/kb: lilu dallas multitouch

5 years agoadd dtracy to mkfile
aiju [Sun, 11 Nov 2018 10:10:30 +0000 (10:10 +0000)]
add dtracy to mkfile

5 years agoadd dtracy.h
aiju [Sat, 10 Nov 2018 20:01:19 +0000 (20:01 +0000)]
add dtracy.h

5 years agodtracy: missing break in dteverify
aiju [Sat, 10 Nov 2018 14:01:42 +0000 (14:01 +0000)]
dtracy: missing break in dteverify

5 years agoadding dtracy (crude early version)
aiju [Sat, 10 Nov 2018 13:46:16 +0000 (13:46 +0000)]
adding dtracy (crude early version)

5 years agossh: handle unknown MSG_CHANNE_REQUEST messages
cinap_lenrek [Thu, 8 Nov 2018 21:35:45 +0000 (22:35 +0100)]
ssh: handle unknown MSG_CHANNE_REQUEST messages

5 years agossh: handle MSG_GOBAL_REQUEST
cinap_lenrek [Thu, 8 Nov 2018 21:00:07 +0000 (22:00 +0100)]
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.

5 years agoip/dhcpd: Add swap server support in dhcpd (thanks k0ga)
cinap_lenrek [Thu, 8 Nov 2018 20:15:07 +0000 (21:15 +0100)]
ip/dhcpd: Add swap server support in dhcpd (thanks k0ga)

5 years agobcm: intrenable() can happen from any cpu in case of dma interrupts
cinap_lenrek [Thu, 8 Nov 2018 19:26:32 +0000 (20:26 +0100)]
bcm: intrenable() can happen from any cpu in case of dma interrupts

5 years agolibdraw: cannot happen
cinap_lenrek [Thu, 8 Nov 2018 15:56:34 +0000 (16:56 +0100)]
libdraw: cannot happen

5 years agolibdraw: fix gengetwindow()
cinap_lenrek [Wed, 7 Nov 2018 21:01:18 +0000 (22:01 +0100)]
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

5 years agobcm: cleanup timer code
cinap_lenrek [Wed, 7 Nov 2018 16:02:09 +0000 (17:02 +0100)]
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

5 years agobcm: simplify irq handling by having per cpu Vctl chain
cinap_lenrek [Wed, 7 Nov 2018 15:49:50 +0000 (16:49 +0100)]
bcm: simplify irq handling by having per cpu Vctl chain

5 years agobcm: speed up co-processor operations by avoiding i+d cache flush on each operation
cinap_lenrek [Wed, 7 Nov 2018 15:48:14 +0000 (16:48 +0100)]
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.

5 years agonusb/serial: fix wrong guard statement (thanks deuteron)
aiju [Tue, 6 Nov 2018 12:05:15 +0000 (12:05 +0000)]
nusb/serial: fix wrong guard statement (thanks deuteron)

5 years agomerge
cinap_lenrek [Tue, 6 Nov 2018 03:33:29 +0000 (04:33 +0100)]
merge

5 years agodnstcp: temporarily switch on resolver mode so we can resolve the dnsslaves for axfr...
cinap_lenrek [Tue, 6 Nov 2018 03:31:48 +0000 (04:31 +0100)]
dnstcp: temporarily switch on resolver mode so we can resolve the dnsslaves for axfr check

5 years agosed: only dollars as first address are a problem for -u
aiju [Mon, 5 Nov 2018 20:17:48 +0000 (20:17 +0000)]
sed: only dollars as first address are a problem for -u

5 years agorio(1): fix typo
mischief [Sun, 4 Nov 2018 19:39:04 +0000 (11:39 -0800)]
rio(1): fix typo

5 years agomp(2): document mpfactorial
mischief [Sun, 4 Nov 2018 19:37:13 +0000 (11:37 -0800)]
mp(2): document mpfactorial

5 years agolibmp: declare mpfactorial
mischief [Sun, 4 Nov 2018 19:37:02 +0000 (11:37 -0800)]
libmp: declare mpfactorial

5 years agomerge
cinap_lenrek [Sun, 4 Nov 2018 18:50:06 +0000 (19:50 +0100)]
merge

5 years agolibaml: allow amlmapio() to re-enter the interpreter (can happen by pciadd() -> amlev...
cinap_lenrek [Sun, 4 Nov 2018 18:48:27 +0000 (19:48 +0100)]
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

5 years agodevvmx: remove bogus . direntry
aiju [Sun, 4 Nov 2018 16:03:35 +0000 (16:03 +0000)]
devvmx: remove bogus . direntry

5 years agobcm: fix mysterious core clock resets under SMP (thanks richard miller)
cinap_lenrek [Sun, 4 Nov 2018 15:00:32 +0000 (16:00 +0100)]
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);
}

5 years agobcm: fix mistake in mkfile
cinap_lenrek [Thu, 1 Nov 2018 00:07:51 +0000 (01:07 +0100)]
bcm: fix mistake in mkfile

5 years agobcm: fix /dev/reboot text/data corruption (thanks richard miller)
cinap_lenrek [Wed, 31 Oct 2018 18:48:16 +0000 (19:48 +0100)]
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)

5 years agoawk(1): fix append operator to avoid truncating file
Alex Musolino [Wed, 31 Oct 2018 06:19:02 +0000 (16:49 +1030)]
awk(1): fix append operator to avoid truncating file

5 years agobcm: provide /dev/cputemp in a format stats can understand
cinap_lenrek [Sun, 28 Oct 2018 06:10:27 +0000 (07:10 +0100)]
bcm: provide /dev/cputemp in a format stats can understand

5 years agomerge
cinap_lenrek [Sun, 28 Oct 2018 05:17:34 +0000 (06:17 +0100)]
merge

5 years agobcm: simplify reboot code
cinap_lenrek [Sun, 28 Oct 2018 05:16:10 +0000 (06:16 +0100)]
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

5 years agobcm: cleanup clock code
cinap_lenrek [Sun, 28 Oct 2018 05:09:05 +0000 (06:09 +0100)]
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