Commit graph

22 commits

Author SHA1 Message Date
cinap_lenrek 64ed3658d2 kernel: add pagechaindone() to wakeup processes waiting for memory
we keep the details about palloc in page.c, providing pagechaindone()
for mmu code to be called after a series of pagechainhead() calls.
2015-06-15 17:40:47 +02:00
cinap_lenrek 460c598430 io.h: fis comment PciSID (alphapc, kw, mtx, teg2) (thanks qeed!) 2015-05-30 16:50:02 +02:00
cinap_lenrek 35c9648ee1 pass Ureg* argument to note handler in R0 register on arm
userspace note handlers, like any function, expect ther
first argument in R0 register on arm.
2015-04-30 16:29:40 +02:00
cinap_lenrek b8cf3cb879 kernel: reduce Page structure size by changing Page.cachectl[]
there are no kernels currently that do page coloring,
so the only use of cachectl[] is flushing the icache
(on arm and ppc).

on pc64, cachectl consumes 32 bytes in each page resulting
in over 200 megabytes of overhead for 32gb of ram with 4K
pages.

this change removes cachectl[] and adds txtflush ulong
that is set to ~0 by pio() to instruct putmmu() to flush
the icache.
2015-02-07 02:52:23 +01:00
cinap_lenrek 13c4b57c0c teg2, xen: remove unused bootdisk[] and fix conf.nswppo factor in kernel memory size calculation 2014-12-17 10:03:45 +01:00
cinap_lenrek 5c29603f50 kernel: remove obsolete comment regarding Mntcache size in */main.c 2014-12-16 08:11:21 +01:00
cinap_lenrek 67bed722f2 kernel: get rid of /boot/boot parametrization
there is no use for "bootdisk" variable parametrization
of /boot/boot and no point for the boot section with its
boot methods in the kernel configuration anymore. so
mkboot and boot$CONF.out are gone.

move the rules for bootfs.paq creation in 9/boot/bootmkfile.
location of bootfs.proto is now in 9/boot/bootfs.proto.
our /boot/boot target is now just "boot".
2014-12-14 22:10:34 +01:00
cinap_lenrek b18a641397 kernel: remove implicit Proc* argument from procctl()
procctl() is always called with up and it would not
work correctly if passed a different process, so
remove the Proc* argument and use up directly.
2014-11-09 08:19:28 +01:00
cinap_lenrek 5d8300d2eb teg2: fix wrong l2 setshift address in wholecache() (from sources) 2014-09-17 16:34:30 +02:00
cinap_lenrek be3a5a6dc3 kernel: remove Block refcounting (thanks erik) 2014-06-08 00:19:33 +02:00
cinap_lenrek 9ee3095553 teg2: move syscall.$O and syscallfmt.$O targets from config to mkfile 2014-06-08 00:15:53 +02:00
cinap_lenrek a8af25ef81 kernel: interpret service= boot parameter to set "cpuserver" variable 2014-03-15 00:55:02 +01:00
cinap_lenrek 6c2e983d32 kernel: apply uintptr for ulong when a pointer is stored
this change is in preparation for amd64. the systab calling
convention was also changed to return uintptr (as segattach
returns a pointer) and the arguments are now passed as
va_list which handles amd64 arguments properly (all arguments
are passed in 64bit quantities on the stack, tho the upper
part will not be initialized when the element is smaller
than 8 bytes).

this is partial. xalloc needs to be converted in the future.
2014-01-20 00:47:55 +01:00
cinap_lenrek 42074003ca kernel: dont call pprint() while holding up->debug qlock
pprint() might block or even (maliciously) call into
devproc write which will corrupt the qlock chain on attempt
to qlock up->debug again.
2013-12-29 07:48:19 +01:00
cinap_lenrek ea6fea596b devether: remove qfull prints and fix loopback packet handling of etheroq()
dont spam the console with qfull warnings. this makes things worse.

handle loopback packets as stated in the comment. we call etheriq()
with fromwire=1 for loopback packets so etheriq() can pass the packet
on (without copying) or free it. dont inhibit interrupts while calling
etheriq(). etheriq() can safely be called from process and interrupt
context. it is unclear what this was supposed to fix and testing didnt
seem to have any odd effects.
2013-12-16 19:19:15 +01:00
cinap_lenrek 98f47d5867 kernel: more kproc pexit() and sleep error handling 2013-11-22 22:56:34 +01:00
jpathy 9f949e3cd3 ARM: kernel: add vfp emulator to bcm, teg2, omap, kw 2013-06-12 01:11:41 +05:30
jpathy de46340848 ARM: kernel changes make teg2 procfork() call fpuprocfork() and acid fixes for vfp instruction 2013-06-10 18:07:16 +05:30
cinap_lenrek d94ffb4808 kernel: do all fp state fork from procfork() (like pc kernel)
this simplifies the arm ports and keeps all the stuff in one place
instead of spreading it thru notify(), trap() and syscall() functions
and prevents useless fp state copying for kernel procs.

also make sure to save fp in notify while still splhi().
2013-05-30 23:26:21 +02:00
cinap_lenrek b325475fc8 Fix double-free fault when isaconfig returns nothing for "etherN". (from richard millers devether-doublefree patch) 2013-04-29 18:39:44 +02:00
cinap_lenrek f37465fd7f sysexec: fix possible segment overlap with temporary stack
the kernel uses fixed area (TSTKTOP, TSTKSIZ) of the address
space to temporarily map the new stack segment for exec. for
386 and arm, this area was right below the stack segment which
has the problem that the program can map arbitrary segments
there (even readonly).

alpha and ppc dont have this problem as they map the temporary
exec stack *above* the user reachable stack segement and segattach
prevents one from mapping anything above or overlaping the stack.

lots of arch code assumes USTKTOP being the end of userspace
address space and changing this to TSTKTOP would work, but results
in lots of hard to test changes.

instead, we'r going to map the temporary stack programmatically
finding a hole in the address space where to map it. we also lift
the size limitation for arguments and allow arguments to fill
the whole new stack segement.

the TSTKTOP and TSTKSIZ are not used anymore so they where removed.

references:

http://9fans.net/archive/2013/03/203
http://9fans.net/archive/2013/03/202
http://9fans.net/archive/2013/03/197
http://9fans.net/archive/2013/03/195
http://9fans.net/archive/2013/03/181
2013-03-16 02:37:07 +01:00
cinap_lenrek ea108c8ca6 add tegra2 soc kernel (from sources) 2013-01-26 17:33:21 +01:00