Commit graph

27 commits

Author SHA1 Message Date
cinap_lenrek f0a314605f devether: remove (unimplemented) detach, allow device creation on attach
we allow devether to create ethernet cards on attach. this is useull
for virtual cards like the sink driver, so we can create a sink
by simply: bind -a '#l2:sink ea=112233445566' /net

the detach routine was never called, so remove it from the few drivers
that attempted to implement it.
2018-02-25 03:42:38 +01:00
cinap_lenrek 729c9c39d9 devether: mux bridges, portable netconsole 2018-02-18 19:56:01 +01:00
cinap_lenrek d6e0e9c402 kernel: move devether and wifi to port/
the only architecture dependence of devether was enabling interrupts,
which is now done at the end of the driver's reset() function now.

the wifi stack and dummy ethersink also go to port/.

do the IRQ2->IRQ9 hack for pc kernels in intrenabale(), so not
every caller of intrenable() has to be aware of it.
2018-02-11 18:08:03 +01:00
cinap_lenrek 24057fd4f4 kernel: introduce per process FPU struct (PFPU) for more flexible machine specific fpu handling
introducing the PFPU structue which allows the machine specific
code some flexibility on how to handle the FPU process state.

for example, in the pc and pc64 kernel, the FPsave structure is
arround 512 bytes. with avx512, it could grow up to 2K. instead
of embedding that into the Proc strucutre, it is more effective
to allocate it on first use of the fpu, as most processes do not
use simd or floating point in the first place. also, the FPsave
structure has special 16 byte alignment constraint, which further
favours dynamic allocation.

this gets rid of the memmoves in pc/pc64 kernels for the aligment.

there is also devproc, which is now checking if the fpsave area
is actually valid before reading it, avoiding debuggers to see
garbage data.

the Notsave structure is gone now, as it was not used on any
machine.
2017-11-04 20:08:22 +01:00
cinap_lenrek f3f9392517 kernel: introduce devswap #¶ to serve /dev/swap and handle swapfile encryption 2017-10-29 23:09:54 +01:00
cinap_lenrek 8177d20fb2 kernel: get rid of active.Lock and active.thunderbirdsargo 2017-03-11 16:30:51 +01:00
cinap_lenrek 052abe1cc8 xen: fix build by adding missing rdrandbuf() function 2016-12-14 20:02:07 +01:00
cinap_lenrek 41383ad012 kernel: change active.machs from bitmap to char array to support up to 64 cpus on pc64 2016-01-05 05:32:40 +01:00
cinap_lenrek 7f3659e78f kernel: cleanup exit()/shutdown()/reboot() code
introduce cpushutdown() function that does the common
operation of initiating shutdown, returning once all
cpu's got the message and are about to shutdown. this
avoids duplicated code which isnt really machine specific.

automatic reboot on panic only when *debug= is not set
and the machine is a cpu server or has no display,
otherwise just hang.
2015-11-30 14:56:00 +01:00
cinap_lenrek 5458506881 all kernels: declare _tas() to prevent pulling in libc version (for libmemdraw) 2015-07-07 19:17:55 +02:00
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 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 3ab80c9fe0 pc, pc64, xen: change return type of intrdisable() to void
intrdisable() will always be able to unregister the interrupt
now, so there is no reason to have it return an error value.

all drivers except uart8250 already assumed it to never fail
and theres no need to maintain that complexity.
2014-12-22 16:56:04 +01:00
cinap_lenrek 515893dda6 pc, pc64, xen: simplify #P/irqalloc 2014-12-22 10:49:52 +01:00
cinap_lenrek 06f6b1c9e2 xen: remove segmentation constants, not used on xen. 2014-12-18 02:53:49 +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 c8ed49da60 xen: fix cross build 2014-12-15 01:43:31 +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 1d674abe9c xen: fix mtrr dummy functions 2014-12-14 21:58:02 +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
mischief 072c45d463 xen: delete screen.h from pc that accidentally snuck in. a screen.h for xen framebuffer will be added later. 2014-06-25 16:56:39 -07:00
mischief 3812a4bf41 xen: fix boot argv0 2014-06-25 16:03:08 -07:00
mischief 500a91e7a3 xen: gotta go fast
use smaller timeouts for sleeps while waiting for xen ether and sd devices to come online. in practice they come up very quickly.
2014-06-25 15:47:31 -07:00
mischief 3f230d717d xen: correct print format for long 2014-06-25 15:45:04 -07:00
mischief 2060daf3b0 xen: fix early console 2014-06-24 19:37:03 -07:00
mischief 5ba95fdb07 import xen 32 bit paravirtual kernel from /n/sources/xen. 2014-06-24 18:02:25 -07:00