Commit graph

958 commits

Author SHA1 Message Date
cinap_lenrek 2b619dc966 etheriwl: add pci did for WifiLink 5300 (thans senthil) 2018-07-31 18:33:42 +02:00
cinap_lenrek 6cd83e5d24 audiohda: support Intel Sunrise Point-LP on thinkpad X1 2018-07-26 02:48:00 +02:00
cinap_lenrek 0431ea242d pc, pc64: look for "RSD PTR " in ACPI reserved memory region from e820 map
nobody passes us the "RSD PTR " address when doing multiboot/kexec
on UEFI systems. so we search for it manually in the ACPI reserved
area as indicated in the e820 memory map.
2018-07-22 21:00:20 +02:00
aiju 6b0de3de8e pc: fix ugly and partially broken switch() statement 2018-07-11 15:12:24 +01:00
aiju 3a77c01f43 pc kernel: get rid of ugly and partially broken cpuid macros 2018-07-11 14:50:22 +01:00
cinap_lenrek 39fb26df70 9pc, 9pc64: make mapalloc() and mapfree() static in memory.c 2018-06-14 20:22:34 +02:00
cinap_lenrek 5da4f0fc0f sdram: experimental ramdisk driver
this driver makes regions of physical memory accessible as a disk.

to use it, ramdiskinit() has to be called before confinit(), so
that conf.mem[] banks can be reserved. currently, only pc and pc64
kernel use it, but otherwise the implementation is portable.

ramdisks are not zeroed when allocated, so that the contents are
preserved across warm reboots.

to not waste memory, physical segments do not allocate Page structures
or populate the segment pte's anymore. theres also a new SG_CHACHED
attribute.
2018-05-27 22:59:19 +02:00
qwx 70c7a9eb07 add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
kremlin 8666ec6b55 add missing ethermii.h dependencies. patch from cinap_lenrek 2018-04-12 17:50:10 -04:00
cinap_lenrek b2d7992025 kernel: properly handle bad attach specifiers
- only accept decimal for numeric device id's
- exclude negative device id's
- device id's out of range yield Enodev
2018-02-25 17:11:18 +01:00
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 5d6a11c387 audiohda: add device id for x260's Intel Sunrise Point-LP. (thanks rodri) 2018-02-16 21:04:38 +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 650e5db5a2 usbxhci: fix mistake in completering()
the td index "x" was incremented twice, once in for loop
and in the body expression. so r->rp only got updated
every second completion. this is wrong, but harmless.
2018-02-07 18:13:22 +01:00
cinap_lenrek 6a23ef917b kernel: initialize cyclefreq for machno > 0 in guesscpuhz() 2018-01-27 19:58:48 +01:00
cinap_lenrek 7b5cf8de2d ether79c970: dont disable promisc mode when multicast table is not empty 2018-01-13 11:41:37 +01:00
cinap_lenrek ad36593a99 ether82557: don't turn off promisc mode when mcast table is not empty
the driver doesnt implement multicast filter, but just turns
on promiscuous mode when a multicast address is added. but this
breaks when one actually enables and then disables promiscuous
mode with say, running snoopy.

we have to keep promisc mode active as long as multicast table
is not empty.
2018-01-13 07:16:17 +01:00
cinap_lenrek ba87e58876 wifi: learn target ip address from neighbor advertisements in dmat proxy 2018-01-12 18:28:50 +01:00
cinap_lenrek 2088f8c991 wifi: filter out loopback traffic from myself
broadcast traffic was received back on the wire causing
duplicate address detection to break with dmat proy as
the rewritten broadcasts where observable.

the fix is to just ignore packets from ourselfs received
from the air. devether already handles loopback.
2018-01-12 08:01:15 +01:00
cinap_lenrek acb206859d ether8169: deal with kernel memory exhaution
when kernel memory is exhausted, rtl8169replenish() can fail
to plant more receive descriptors and rtl8169receive() would
run over the receive tail and crash on the nil ctlr->rb[x].

rtl8169receive() is called on "Receive Descriptor Unavailable"
and "Packet Underrun" so we will try to replenish descriptors
in the beginning first in case memory was exhausted and memory
is available again and make sure not to run over the tail.
2018-01-08 00:23:26 +01:00
cinap_lenrek d3e54ff2d9 pc kernel: fix wrong simd exception mask (fixes go bootstrap) 2018-01-04 04:38:31 +01:00
cinap_lenrek ee89c82dd3 wifi: get rid of custom hextob() routine, use dec16(), avoid copies in parsekey() 2017-12-31 01:49:58 +01:00
cinap_lenrek ce2211b08c usbxhci: add missing pexit() in xhcirecover proc (thanks sam-d) 2017-12-29 06:10:25 +01:00
cinap_lenrek a021f054b0 wifi: revert rate adoption divider, breaks arpunks wifi 2017-12-29 03:41:32 +01:00
cinap_lenrek b9d2a9efd5 wifi: don't implicitely update lastseen timestamp on nodelookup()
in case we continue to send traffic (like ping) with the ap gone,
the sending would keep updating bss->lastseen which prevents the
timeout to happen to switch bss.
2017-12-28 04:34:03 +01:00
cinap_lenrek d13142b3da etheriwl, etherwpi: limit transmit queue buffer bloat to 48k (at 22Mbit ≅ 20ms) 2017-12-28 01:24:38 +01:00
cinap_lenrek ce9cc8a358 wifi: don't assume Wifi.rates[] is sorted, return net data rate for mbps (50% theoretical) 2017-12-28 01:19:14 +01:00
cinap_lenrek 96eb90fba1 devvga: removing #v/vgabios, use /dev/realmodemem instead 2017-12-23 04:26:50 +01:00
cinap_lenrek 50bea0348c kernel: convert textmode cga screen contents to kmesg only once
screeninit() might be called again by devvga when switching
to textmode, so only convert the text framebuffer to kmesg
the first time.
2017-12-23 03:56:12 +01:00
cinap_lenrek 417bdbb869 ether8169: add Macv45 for RTL8111HN, rename Macv45 -> Macv42 (thanks qeed, sam-d) 2017-12-19 00:03:54 +01:00
cinap_lenrek c1eb4b8d68 devether: dont forward loopback packets on bridges 2017-12-18 20:47:55 +01:00
cinap_lenrek 3e48a66665 pc, pc64: add devbridge to kernel configuration 2017-12-17 20:33:39 +01:00
cinap_lenrek 15ff38e818 wifi: use protocol constants from ip/ip.h and ip/ipv6.h for dmatproxy() 2017-12-17 17:17:26 +01:00
cinap_lenrek 070a9ef753 wifi: matt damon wifi bridging support 2017-12-16 21:43:47 +01:00
cinap_lenrek 9fd8894fec ether: allow spoofing of source mac address for bridges; used by vmx
to implement layer 2 bridges in userspace, we disable to auto filling
of the source mac address when bridge mode is enabled on the
connection.
2017-12-15 22:22:29 +01:00
cinap_lenrek 35bc3ac573 devether: remove duplicated parseether() implementation (pull from libip) 2017-12-09 22:07:32 +01:00
cinap_lenrek 65566dda8e devvga: properly handle physical screen size and panning
- remove arbitrary limits on screen size, just check with badrect()
- post resize when physgscreenr is changed (actualsize ctl command)
- preserve physgscreenr across softscreen flag toggle
- honor panning flag on resize
- fix nil dereference in panning ctl command when scr->gscreen == nil
- use clipr when drawing vga plan 9 console (vgascreenwin())
2017-12-03 18:54:25 +01:00
cinap_lenrek 4898050282 cga: capture cga console contents on boot, make sure cgapos is in range
to capture bios and bootloader messages, convert the contents
on the screen to kmesg.

on machines without legacy cga, the cga registers read out as
0xFF, resuting in out of bounds cgapos. so set cgapos to 0 in
that case.
2017-11-26 17:11:01 +01:00
cinap_lenrek af20ba6746 devvga: re-render text from kmesg after resize 2017-11-26 04:49:30 +01:00
cinap_lenrek f4880742fd igfx: allocate backing memory for framebuffer and hw cursor when not done by bios (from qu7uux)
new approach to graphics memory management:

the kernel driver never really cared about the size of stolen memory
directly. that was only to figure out the maximum allocation
to place the hardware cursor image somewhere at the end of the
allocation done by bios.

qu7uux's gm965 bios however wont steal enougth memory for his
native resolution so we have todo it manually.

the userspace igfx driver will figure out how much the bios
allocated by looking at the gtt only. then extend the memory by
creating a "fixed" physical segment.

the kernel driver allocates the memory for the cursor image
from normal kernel memory, and just maps it into the gtt at the
end of the virtual kernel framebuffer aperture.

thanks to qu7uux for the patch.
2017-11-13 00:48:46 +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 0e68b7551a kernel: pc/pc, fix comment line 2017-10-30 02:08:05 +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 d9b37eff37 ether82598: support for T540-T1, use physical addresses for isaconf port
reading mac doesnt work yet, requires ea= option in isaconf.
2017-09-27 14:13:18 +02:00
cinap_lenrek 797952d065 sdnvme: identify namespace list fails on intel ssd, just assume nsid=[1] 2017-09-27 14:02:13 +02:00
cinap_lenrek 330e7ef39b kernel: don't tokenize inplace in isaconfig() to make /dev/reboot work 2017-09-27 13:59:55 +02:00
cinap_lenrek dad00a77da kernel: get rid of 36 bit Paerange mask in mtrr (supporting machines with more than 64GB of memory) 2017-09-27 13:58:00 +02:00
cinap_lenrek 546046b46b xhci: do bounds checking in capability walking, check if controller vanished on init (thunderbolt unplug) 2017-09-22 12:55:26 +02:00
cinap_lenrek be7f3fb5e4 rename pcf kernel to pc, remove pcf, pccpuf, pccpu64 kernels, update documentation
there isnt much of a point in keep maintaining separate
kernel configurations for terminal and cpu kernels as
the role can be switched with service=cpu boot parameter.

to make stuff cosistent, we will just have one "pc" kernel
and one "pc64" kernel configuration now.
2017-09-10 22:35:23 +02:00
BurnZeZ 9af1153451 audiohda: add pci id for nvidia GM204 2017-09-10 02:27:31 +00:00
BurnZeZ 1ab2fed7a4 audiohda: add pci id for Intel 9 Series 2017-09-10 02:21:31 +00:00
cinap_lenrek e6e745e776 audiohda: add pci id for ICH10 (thanks echoline) 2017-09-10 01:37:30 +02:00
aiju bd4513fe87 devvmx: call vmxshutdown from reboot() function manually 2017-09-02 10:43:37 +00:00
cinap_lenrek e44bf536af ether82563: make the ethernet of thinkpad p50 work (thanks sam-d) 2017-08-29 19:38:29 +02:00
cinap_lenrek b41bd1b007 audiohda: Intel Sunrise Point-H support (thanks sam-d) 2017-08-29 19:37:26 +02:00
cinap_lenrek 30ea7ad58a sdnvme: pass 0 instead of 0xffffffff as NSID for identify controller and create completion/submission queue commands (thanks Ori_B)
Samsung SSD 960 EVO fails with invalid namespace error otherwise...
2017-08-29 09:52:53 +02:00
aiju e5d3aaf1aa devvmx, vmx: lilu dallas multivm 2017-08-28 17:27:41 +00:00
cinap_lenrek 543ccb37f4 sdiahci: Intel 200 Series Chipset Family PCH support (thanks aiju)
we used to tweak arround in the ICH registers for all intel controllers,
which is wrong, as the 200 series has different magic registes. see
the datasheet:

https://www.intel.com/content/www/us/en/chipsets/200-series-chipset-pch-datasheet-vol-2.html

this caused the clocks to be disabled for the 6th port causing a full
machine lockup touching the 6th port registers.

the next problem was that aiju's bios disabled the unused ports somehow
but didnt clear ther PI bits, so that they would stay in Sbist status even
after a port reset. so the port would get stuck in the Dportreset state
forever. the fix for this was to use a one second timeout for the
port reset procedure.
2017-08-27 21:20:20 +02:00
aiju 9616f61872 devvmx: more efficient data structure for memory map; simplified (more reliable) step function 2017-08-24 07:53:10 +00:00
qwx eeb8007e60 igfx: add did for x220 2017-08-20 13:52:52 +03:00
cinap_lenrek c78d4c4ce7 ether82563: add more pci ids for i210 and i354 from 9atom / openbsd 2017-08-13 15:26:24 +02:00
cinap_lenrek b3d581752b ether82563: support for i211 with iNVM. (thanks mfny and brennan for testing) 2017-08-12 23:36:24 +02:00
cinap_lenrek e0474599dd usbxhci: implement recovery from host controller errors 2017-08-07 01:59:54 +02:00
cinap_lenrek bb625cebfc etheriwl: add pci id for Intel Centrino Advanced-N 6200 on x201 tablet (thanks arpunk) 2017-08-03 23:15:58 +02:00
cinap_lenrek 83b87729d9 usbxhci: handle out of memory in controller initialization 2017-08-02 21:17:50 +02:00
cinap_lenrek 1ea109345b usbxhci: abandon multiple requests per endpoint, cleanup
more conservative approach: only one transaction in flight
per endpoint (except iso). also serialize controller commands.
no driver currently uses this and i doubt it is usefull.

create constants for common TRB flags and remove bogus 1<<16
flag on TR_NORMAL.
2017-08-02 20:25:19 +02:00
cinap_lenrek 8ed13fe664 usbxhci: have to serialize and set read pointer for endpoint stop command 2017-08-02 01:45:30 +02:00
cinap_lenrek 5f23d78f06 usbohci, usbehci, usbxhci: save mmio base address in ctlr, cant PADDR() on 386... 2017-07-31 17:36:56 +02:00
cinap_lenrek 48352be825 usbxhci: provide shutdown function to halt the controller 2017-07-31 16:05:58 +02:00
cinap_lenrek 6e65596827 xhci: experimental usb3 support 2017-07-31 03:22:23 +02:00
cinap_lenrek adfb0e9371 pc, pc64: enable usbxhci in the configuration 2017-07-29 01:15:05 +02:00
cinap_lenrek cd108e2f0b usbxhci: simplify xecp() 2017-07-29 01:12:32 +02:00
cinap_lenrek c74538a67e usbxhci: implement controller handoff, ignore usb3.0 ports, honor pollival for isochronous endpoints 2017-07-29 01:02:23 +02:00
cinap_lenrek aaf6d7c558 usbxhci: basic iso write support (usb soundcard playback) 2017-07-24 23:48:50 +02:00
cinap_lenrek 0b4ace02c4 usbxhci: handle changing maxpkt on control endpoint by reevaluating endpoint context
while endpoints != 0 are opend after the device descriptor has been
parsed and the endpoint properties like maxpkt have been set, the
control endpoint is opend with a guessed maxpkt value. once the first
8 bytes of the descriptor have been read by usbd, maxpkt gets set and
we need to reevaluate the control endpoint 0 context to update the value.
2017-07-22 19:35:32 +02:00
cinap_lenrek f72bcce2c7 usbxhci: use physical register addresses for matcing controllers and printing. simplify endpoint slot initialization. 2017-07-22 16:37:05 +02:00
cinap_lenrek f0217d2c3f usbohci, usbuhci, usbehci: use physical address of registers for matching controllers and printing 2017-07-22 16:35:13 +02:00
cinap_lenrek ffb28698bf kernel: fix bounds check in screenputc() 2017-07-20 21:03:00 +02:00
cinap_lenrek 4fd68773e2 usbxhci: implement command timeouts and aborts, serialize unstall 2017-07-20 19:57:14 +02:00
cinap_lenrek 40dc39bf7d usbxhci: better approach to unstalling endpoint and fixup td ring
instead of guessing where the controllers dequeue pointer went,
stop the endpoint and then explicitely set te dequeue pointer to
the next write td position. that way we do not need to fix the cycle
bit in the td's and dont need to rely on if the controller
advanced the dequeue pointer after a stall or not.

add ctx and slot back pointers to ring.
2017-07-17 21:10:25 +02:00
cinap_lenrek e7e18aac7f pc kernel: mkfile target usbehcipc.$O needs ../port/usb.h, add usbxhci.$O 2017-07-16 22:33:24 +02:00
cinap_lenrek 5e6f1b5769 usbxhci: commit work in progress xhci driver, no config yet 2017-07-16 22:29:29 +02:00
cinap_lenrek befdd7d755 kernel: pass bootargs also in multiboot command line, retire the bootline mechanism to pass arguments to /boot/boot 2017-06-28 18:56:16 +02:00
cinap_lenrek 63b8965b42 devvmx: add support for SG_STICKY segments 2017-06-25 22:57:47 +02:00
cinap_lenrek aab4e32ce0 pc, pc64: support for multiboot framebuffer, common bootargs and multiboot code 2017-06-25 22:22:58 +02:00
aiju cabfa4e916 devvmx: add support for extrap command to configure halting on exceptions 2017-06-21 22:19:14 +00:00
aiju 37b9ab5a04 devvmx: error handling in clearmeminfo 2017-06-21 09:59:32 +00:00
aiju 779f6cb3b8 devvmx: remember segment names and free segments properly 2017-06-21 09:16:43 +00:00
aiju becb89bae5 pc, pc64: adapt devvmx to work on pc64 2017-06-20 15:10:08 +00:00
aiju ed040d676a devvmx: fix CR0/CR4 readout; also don't exit on PAUSE instruction 2017-06-18 22:13:20 +00:00
aiju 2bb65c40ab devvmx: support debug registers; simplify assembly 2017-06-17 22:38:16 +00:00
aiju 74241e31aa devvmx: support pat and efer registers 2017-06-14 17:38:01 +00:00
aiju 8029c3d8c4 pc: add vmx device 2017-06-13 14:15:09 +00:00
aiju 13869bab11 pc/pc64: keep shadow copy of DR7 in Mach and use that to check whether we need to reset DR7 in procsave(); remove superfluous reset of DR7 in mmurelease() 2017-06-13 00:10:36 +00:00
aiju e8082c1d1f remove accidentally committed reference to devvmx 2017-06-12 23:03:40 +00:00
aiju dea6bc51bc pc/pc64: debugexc: ignore exception if in kernel mode and can't get hold of up->debug 2017-06-12 22:58:25 +00:00
aiju 3844090f39 pc/pc64: reset DR7 in mmurelease 2017-06-12 19:46:25 +00:00
aiju 773be02aa1 kernel: add support for hardware watchpoints 2017-06-12 19:03:07 +00:00
aiju 48c5da7a64 ethervirtio: report correct length; fail gracefully if we can't initialize queues 2017-06-12 11:25:12 +00:00
aiju 48fa332c61 pc: actually call netconsole() 2017-06-01 06:40:05 +00:00
aiju 7134d62ccb pc: add netconsole 2017-05-31 23:41:21 +00:00
qwx 6f63752d84 igfx: add support for haswell graphics
add support for edp, dp and hdmi on haswell and haswell ult.
vga, dvi and specific configurations like ulx are unimplemented.

remaining issue: edp link training always fails (time out).
2017-05-22 18:19:24 +02:00
cinap_lenrek fa94532c08 vgamach64xx: remove drawdebug reference 2017-05-01 02:15:03 +02:00
cinap_lenrek 8829d51f50 devvga: remove unused copy of checkport() function 2017-04-02 20:17:44 +02:00
cinap_lenrek 8ea31ae7b2 devvga: fix mistake 2017-04-02 20:10:44 +02:00
cinap_lenrek a6d852d0a6 devvga: include hwgc in vgactl file 2017-04-02 20:08:15 +02:00
cinap_lenrek 557cbe10ad sdnvme: enable in pcf, pccpuf, pc64 kernel configuration 2017-03-30 23:37:28 +02:00
cinap_lenrek 8cacd2cc0a sdnvme: don't write completion queue doorbell register when nothing has been processed
turns out on real hardware, the front falls off if we write
the completion queue doorbell registers without consuming
an entry. so only write the register when we have processed
something.
2017-03-30 23:33:46 +02:00
cinap_lenrek bfae9e08be sdnvme: NVMe controller driver (work in progress)
basic NVMe controller driver, reads and writes work.
"namespaces" show up as logical units.
uses pin/msi interrupts (no msi-x support yet).
one submission queue per cpu, shared completion queue.
no recovery from fatal controller errors.
only tested in qemu (no hardware available).

commiting this so it can be found by someone who has
hardware.
2017-03-29 00:21:35 +02:00
cinap_lenrek 1889aa50c3 sdvirtio: return 1 for success in vioenable()/viodisable() 2017-03-26 16:43:32 +02:00
cinap_lenrek 4e8494aad7 pc kernel: handle PCMP and RSD being in low (kaddr) or reserved (vmap) memory
on thinkpad x1v4, the PCMP structure resides in upper reserved memory
pa=0xd7f49000 - while system memory ends at 0x0ffff000; so we have to
vmap() it instead of KADDR().

the RSD structure for ACPI might reside in low memory, so we sould
KADDR() in that case.
2017-03-25 04:08:14 +01:00
cinap_lenrek 1a2aefcf11 devmouse: refactor screen blanking logic
devmouse controls the screen blanking timeout, so move the
code there avoiding cross calls between modules. the only
function that needs to be provided is blankscreen(), which
gets called with drawlock locked.

the blank timeout is set thru /dev/mousectl now, so kernels
without devvga can set it.

blanking now only happens while /dev/mouse is read. so this
avoids accidentally blanking the screen on cpu servers that
do not have a mouse to unblank it.
2017-03-18 16:58:27 +01:00
cinap_lenrek 8177d20fb2 kernel: get rid of active.Lock and active.thunderbirdsargo 2017-03-11 16:30:51 +01:00
cinap_lenrek a7f8ebca2f pc kernel: give cpu servers as many image cache strctures as processes 2017-03-11 16:28:11 +01:00
cinap_lenrek 5104934135 pc kernel: avoid AP's spinning in syncclock(), don't wait for thunderbirdsargo 2017-03-11 16:24:56 +01:00
cinap_lenrek 812383473c pc kernel: assume tsc and lapic clock rate on application processors is the same as on bootrap processor 2017-03-11 16:18:01 +01:00
cinap_lenrek 3e0e77a852 pc kernel: don't use active.thunderbirdsargo in vunmap() tlb flush code 2017-03-11 16:13:58 +01:00
mischief 319a9cc905 pc, pc64: bump Qmax in devarch
my x301 and t420 run out of archfiles with *acpi= while trying to add
hdacmd from audiohda.
2017-03-01 02:43:14 -08:00
cinap_lenrek 04171d2477 ether8169: add support for RTL8106E (thanks _potato) 2017-02-21 21:53:10 +01:00
cinap_lenrek a32d11dff3 ether82563: work arround phyprobe() failing on 82579LM without cable plugged in (thanks mischief)
on 82579LM, the phy status is inaccessible without
a cable plugged, so we wait and retry phyprobe() once
the link status changes.
2017-02-20 22:01:54 +01:00
cinap_lenrek 52570a2a2d ether82563: support for i219 (tested on t460p, thanks aiju) 2017-02-19 18:20:46 +01:00
cinap_lenrek 3ea0572f4f wifi: timestamps in debug print, flush queue on deassoc, shorter roam timeout, timeout in blocked state, fix essid seprint race
- add some milisecond timestamps to the status change debug printing
- flush the packets in the queue on deassoc to avoid processing old pae
  packets on next association.
- make roaming timeout shorter (60 -> 20 seconds)
- automatically timeout and restart wpa/pae blocked state
- fix printing race when essid gets changed underneath seprint
2017-02-16 20:08:27 +01:00
cinap_lenrek c1c644d13c etheriwl: add support for Centrino Advanced-N 6030, 6235 (thanks khm, openbsd)
from openbsd driver, it seems the Centrino Advanced-N 6030 and 6235
cards share the same device revision as the 6205 (Type6005). Also
changing the device revision field from 4 to 5 bits.
2017-02-16 20:03:41 +01:00
cinap_lenrek 45d01d9c99 wifi: handle short preamble and short time slot capabilities
- drivers enable short preamble and sort timeslot depending
  on the ap beacon capinfo field (bss->cap)
- wifi sets short preamble bit in capinfo on association request
- wifi sets short timeslot bit when ap advertized it in beacon
2017-02-13 22:26:38 +01:00
cinap_lenrek 9278b94623 pc/pc64: get rid of timerset(0) case, was used with "i8253set off" ctl 2017-01-22 21:12:38 +01:00
cinap_lenrek 8547defe70 vgaigfx: enable softscreen by default
given that the igfx driver doesnt provide any acceleration functions
and drawing is usually faster with double buffering as it eleminates
reads over the pci bus, enable softscreen by default.
2016-12-29 03:46:08 +01:00
cinap_lenrek 2830cd7eb6 pc: modify cpu0 page tables in patwc() instead of current cpu ones
on 386 kernel, each processor has its own pdb where the primary
pdb for kernel mappings is on cpu0 and other cpu's lazily pull
pdb entries from cpu0 when they fault in vmapsync().

so we have to edit the table tables in the pdb of cpu0 and not
the current processor.
2016-12-17 19:47:35 +01:00
cinap_lenrek ea30cf94a5 pat write combinding support for 386 kernel, honor cpuid bits 2016-12-17 16:35:26 +01:00
cinap_lenrek d48a089486 pc64: implement simple write combining for framebuffers with the PAT
on some modern machines like the x250, the bios arranges the mtrr's
and the framebuffer membar in a way that doesnt allow us to mark
the framebuffer pages as write combining, leading to slow graphics.

since the pentium III, the processor interprets the page table bit
combinations of the WT, CD and bit7 bits as an index into the
page attribute table (PAT).

to not change the semantics of the WT and CD bits, we preserve
the bit patterns 0-3 and use the last entry 7 for write combining.
(done in mmuinit() for each core).

the new patwc() function takes virtual address range and changes
the page table marking the range as write combining. no attempt
is made on invalidating tlb's. doesnt matter in our case as the
following mtrr() call in screen.c does it for us.
2016-12-15 23:27:01 +01:00
cinap_lenrek b3c1fa9ecf devmouse: change msec argument of *mousetrack() to ulong 2016-12-10 16:12:18 +01:00
cinap_lenrek 7a145e89b3 audioac97: support for ICH4-ICH7 based cards with memory mapped registers (thanks echoline) 2016-12-05 18:32:58 +01:00
cinap_lenrek 240590ab0a archacpi: fix format string warning on amd64 2016-11-05 18:31:50 +01:00
cinap_lenrek 98dba9a4a3 pc/archacpi: don't do acpi initialization in the kernel, provide generic acpimem routines
get rid of _INI and _REG method calls, this is not full acpi environment
anyway and all we really want todo at kernel boot time is figuring out
the interrupt routing. aux/acpi can try to enable more stuff if it needs
to later when battery status desired.

dont snoop memory space regions in amlmapio(), this is just wrong as
amlmapio() is *lazily* mapping regions as they are accessed, so the
range table would never be really complete. instead, we provide generic
access to the physical address space, excluding kernel and user memory
with acpimem file.
2016-10-23 04:09:27 +02:00
ftrvxmtrx e01577f8f6 archacpi: optionally export acpi memory regions; properly initialize environment 2016-10-18 23:04:19 +02:00
cinap_lenrek 0a5f81a442 kernel: switch to fast portable chacha based seed-once random number generator 2016-08-27 20:42:31 +02:00
cinap_lenrek 0ac260b18a wifi: update wifi.h header 2016-08-27 20:36:08 +02:00
cinap_lenrek 0b8851ddb6 wifi: allocate cipher states in secret memory, do AESstate key setup once 2016-08-27 20:35:39 +02:00
cinap_lenrek c0ab6c1d01 vga/igfx: add pci did's for kenjis intel graphics cards. 2016-08-20 19:06:57 +02:00
cinap_lenrek 1edd8d28a5 acpi: _ADR and _BBN might be methods, so use amleval() to evaluate the value 2016-06-30 19:11:06 +02:00
cinap_lenrek 92aa75e879 ether8169: fix wrong mbps setting (from qu7uux)
the first time rtl8169link is called (from rtl8169pnp), the link isn't up, so
setting edev->mbps based on Phystatus register is skipped. edev->mbps is then
still set at the default 100, and that ends up being what devether uses.
this is why some rtl8169 cards are misprinted as 100Mbps in kmesg.
later, after rtl8169link is called again from rtl8169interrupt, the link is up
and edev->mbps is set to the correct value (as shown by e.g. /net/ether0/stats).

so instead, set speed regardless of link status.
2016-06-30 17:16:11 +02:00
cinap_lenrek bc2a5d9b1e aml: define amlintmask and set it according to DSDT revision (64bit / 32bit) 2016-06-05 14:57:38 +02:00
stanley lieber 7c5ca77a6e etheriwl: add pcid 0x0082 for Intel Centrino Advanced-N 6205 variant 2016-06-01 21:45:46 -04:00
cinap_lenrek 7a28f9bd8c vgaigfx: check gtt to determine graphics memory size, add hw cursor support for g35 (thanks kenji) 2016-05-26 21:28:29 +02:00
cinap_lenrek fa82522b69 etheriwl: add pci id for PRO/Wireless 5350 AGN (thanks Ori_B) 2016-05-26 10:02:03 +02:00
cinap_lenrek 0e516cbf48 vgaigfx: fix device id for Ivy Bridge (thanks Kenji) 2016-05-08 05:19:44 +02:00
cinap_lenrek 8d9a94a66e pc64: add etheryuk driver 2016-05-05 16:18:57 +02:00
cinap_lenrek 36d70eb5a7 etheryuk: add Yukon 88R8055 id from erik quanstros driver (thanks Kanji) 2016-05-05 16:17:58 +02:00
cinap_lenrek 5aa224c153 pc: use fpsave() instead of fpenv() to capture fp exception context 2016-05-01 21:51:15 +02:00
cinap_lenrek acfd092987 ether82563: initial i217 support from http://www.9legacy.org/9legacy/patch/pc-ether82563-i210.diff (thanks k0ga)
This patch is only an adaptation for 9front of the patch located in
http://www.9legacy.org/9legacy/patch/pc-ether82563-i210.diff.  The
major difference is that this patch ignores errors in checksum of
eeprom, because in my system the checksum was wrong.  After 3 months,
I didn't have problems, and I think the patch can be used.  although
it has some things that need to be fixed.  If the link is inactive
when the system boots then it will remain inactive forever.
2016-04-07 21:24:13 +02:00
cinap_lenrek 04c3a6f66e zynq: introduce SG_FAULT to prevent access to AXI segment while PL is not ready
access to the axi segment hangs the machine when the fpga
is not programmed yet. to prevent access, we introduce a
new SG_FAULT flag, that when set on the Segment.type or
Physseg.attr, causes the fault handler to immidiately
return with an error (as if the segment would not be mapped).

during programming, we temporarily set the SG_FAULT flag
on the axi physseg, flush all processes tlb's that have
the segment mapped and when programming is done, we clear
the flag again.
2016-03-27 20:57:01 +02:00
cinap_lenrek c9d2fecbd0 usbuhci: removing "uhci bug" print spam from interrupt handler
this code was if(0) for a long time due to wrong parentesis,
fixed parentesis cause print spam on some machines making them
unusage (kenji okomoto). removing the check alltogether.
2016-02-16 08:52:33 +01:00
cinap_lenrek 4a47b264ac wifi: check tkip/ccmp mac and crc in constant time avoiding timing side channels 2016-01-14 23:39:29 +01:00
cinap_lenrek ed4c812765 pc/pc64: backing out new mp startup code (caused issues with ramnode)
apparently, this causes some quadcore ramnode vm to hang on boot,
even tho all cores successfully started up and are operational.

i suspect some side effect from timersinit()... this would also
mean *notsc= would break it (syncclock() would continue)...
its unclear.

i'm reverting this for now until the problem is better understood.
2016-01-13 23:18:25 +01:00
cinap_lenrek 63f9a4fda3 pc/pc64: bring up ap's one after another, use idlehands() while waiting for thunderbirdsarego
when testing in qemu, launching each ap became slower and slower
because all the ap's where spinning in syncclock() waiting for
cpu0 to update its mach0->tscticks, which happens only much later
after all cpu's have been started up.

now we wait for each cpu to do its timer callibration and
manually update our tscticks while we wait and each cpu will
not spin but halt while waiting for active.thunderbirdsarego.
this reduces the system load and noise for timer callibration
and makes the mp startup linear with regard to the number of
cores.
2016-01-11 06:47:52 +01:00
cinap_lenrek ad87473109 pc/pc64: remove mpshutdown print 2016-01-07 19:37:47 +01:00
cinap_lenrek 772afbe98c format pointer subtraction results with %zd instead of %ld (for long -> intptr on amd64) 2016-01-07 04:44:13 +01:00
cinap_lenrek 32c11e2871 pc/pc64: import i210 support from erik quanstrom's 9atom 2016-01-05 07:53:39 +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 5ca4afb249 wifi: prioritize rsne over wpaie
if beacon/proble contains both wpa information element and rsne, the rsne wins.
2015-10-17 14:45:25 +02:00
cinap_lenrek 4040ea7a5e wifi: quote value of parsed ether options
introduce wificfg() function to convert ether->opt[] strings
to wifictl messages, which needs quoting for the value. so
etherX=type=iwl essid='something with spaces' works.
2015-10-09 05:10:47 +02:00
mischief 20dc40d19b pc, pc64: add did for intel wildcat point audio controller 2015-09-29 18:44:30 -07:00
mischief 30a9d59070 pc, pc64: fix sdvirtio descriptor count when sending flush 2015-09-20 01:56:56 -07:00
glenda c4fdc6bfdb fix fuckup 2015-08-25 09:35:10 +00:00
mischief 6b402b83cf import E script from bell labs 2015-08-25 02:07:46 -07:00
cinap_lenrek 8c3acde2de devether: duplicate flags when copying blocks (thanks erik quanstro) 2015-08-16 20:08:36 +02:00
cinap_lenrek a87b550183 vgaigfx: remove #define MB, theres a MB enum in portdat.h 2015-08-06 13:33:39 +02:00
cinap_lenrek 7304deaec1 pc, pc64: remove unused psaux driver, cleanup devkbd
the psaux driver is not used in any kernel configuration and theres
no userspace mouse daemon. i8042auxcmds() is wrong as access
to the user buffer can fault and we are holding an ilocks.

little cleanups in devkbd.
2015-08-05 10:44:03 +02:00
cinap_lenrek f7514acc95 devkbd: disable mosue/keyboard on shutdown, disable ps2 mouse on init, remove kbdenable()/kbdinit()
on vmware, loading a new kernel sometimes reboots when
wiggling the mouse. disabling keyboard and mouse on
shutdown fixes the issue.
make sure ps2 mouse is disabled on init, will get re-enabled
in i8042auxenable().
keyboard isnt special anymore, we can just use the devreset
entry point in the device to do the keyboard initialization,
so kbdinit()/kbdenable() are not needed anymore.
2015-08-05 09:22:07 +02:00
cinap_lenrek dcb5f4212b devkbd: poll pc keyboard before blocking on kbd.q
the keyboard stops sending interrupts when its fifo gets full,
which can happen on boot when keys get mashed while interrupts
are still disabled. to work arround this, call the keyboard
interrupt handler when kbd.q is starved before blocking.
2015-08-04 13:43:35 +02:00
cinap_lenrek 2ef29e10f4 pc, pc64: replace atoi() calls with strtol() when hex can be expcte 2015-08-03 17:07:40 +02:00
cinap_lenrek 1f3c43c017 pc, pc64: set *bootscreen= when framebuffer changes
add bootscreenconf(VGAscr *) function, that is called whenever
the framebuffer configuration is changed by devvga. that way, we
can pass the current setting of the framebuffer to the new
kernel when using /dev/reboot.
2015-08-02 07:32:49 +02:00
cinap_lenrek c4ae1a7435 etheriwl: add pciid for Centrino Wireless-N 1000 (thanks qu7uux)
card seems to work fine with just this.
http://sysinfo.9front.org/src/125/body
2015-07-29 14:17:55 +02:00
cinap_lenrek 311a99e23b ether79c970: set mbps for proper queue sizes, assume gigabit ethernet for vmware 2015-07-28 03:30:21 +02:00
cinap_lenrek 0bdfa3699d pc: check Sse (bit 25) in cpuiddx before enabling fxsr in cr4 (fixes crash on the pentium II) 2015-07-16 08:51:06 +02:00
cinap_lenrek a5efa0e252 ether82563: fix multicast filter (based on openbsd em(4) driver) 2015-07-12 19:21:53 +02:00
cinap_lenrek 0f5f226ba1 etherrt2860: add multicast stub 2015-07-11 02:34:28 +02:00
cinap_lenrek 2e5e5cde71 etheriwl: add multicast stub 2015-07-11 02:33:57 +02:00
cinap_lenrek b4f9ca6c97 etherwpi: dont enable transmit power for invalid channels, add multicast stub 2015-07-11 02:33:16 +02:00
cinap_lenrek 266057f0da wifi: reflect current transmit rate in mbps 2015-07-10 19:13:15 +02:00
cinap_lenrek 7cf2321ffb etherwpi: afra support 2015-07-10 18:59:57 +02:00
cinap_lenrek 34a0f4660d etheriwl: dont clear descriptors after completion 2015-07-10 18:50:37 +02:00
cinap_lenrek b5655b7247 wifi: adjust transmit rate on error (for etheriwl), small mkfile changes
Wnode gets two new counters: txcount and txerror
and actrate pointer that will be between minrate
and maxrate.

driver should use actrate instead of maxrate for
transmission when it can provide error feedback.

when a driver detects a transmission failed, it calls
wifitxfail() with the original packet. wifitxfail() then
reduces wn->actrate.

every 256th packet, we optimistically increase wn->actrate
before transmitting.
2015-07-10 09:04:05 +02: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 37156fb0b2 etherwpi: remove debug prints, use iprint() in interrupt 2015-06-28 21:13:34 +02:00
cinap_lenrek ed238e7ef8 etherwpi: Intel PRO Wireless 3945abg driver based on openbsd's if_wpi (thanks aap) 2015-06-28 18:32:54 +02:00
cinap_lenrek 00328b5759 pc, pc64: toggle bit 2 in port 0x61 to reset and enable PCI SERR# nmi's, print nmi status 2015-06-28 18:22:36 +02:00
cinap_lenrek ee735f1088 wifi: berlin prime bunny hopping
- reduce delay for channel hop to 200ms
- use 1000ms timeout for auth response (dont hop channels while we wait)
- bunny hop sequence is mathematically prooven
2015-06-21 19:35:08 +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 27fb90eb6e vblade, cifs, usbuhci: fix parenthesis 2015-06-13 15:03:56 +02:00
cinap_lenrek b137420eff pc/io.h: fix comment for PciSID 2015-05-30 16:45:02 +02:00
cinap_lenrek 5ef922959a pci: map pci bars for devices with base class codes (ccrb) 0x00 and 0x0D-0x11 (thanks qeed)
there are a few more device base class codes defined 0x0D-0x11, and
qemu appears to use base class code 0x00 for some of its fake
devices.
2015-05-27 00:23:13 +02:00
cinap_lenrek d8487e98c6 etherigbe: spi eeprom support (thanks echoline) 2015-05-20 09:49:27 +02:00
stanley lieber 45384b0026 fortunes: What's wrong with the obvious? 2015-05-15 21:08:37 -04:00
cinap_lenrek fb9a4ac610 emmc/pmmc: make all symbols static 2015-05-11 05:27:05 +02:00
cinap_lenrek e20d7c4aad etheriwl: make rxon() static (thanks aap) 2015-04-27 21:32:17 +02:00
cinap_lenrek 64849ab5f3 etheriwl: check the bluetooth co-existance errors (thanks qeed) 2015-04-26 18:02:49 +02:00
cinap_lenrek e10287042e etheriwl: support for Centrino Wireless-N 2230 from freebsd driver (thanks qeed)
big thanks to qeed for porting support for Wireless-N 2230 from
freebsd driver!
2015-04-24 04:13:19 +02:00
cinap_lenrek 771cb2a9cb ether82563: work arround bad eeprom checksum for some i218 card (thanks BurnZeZ)
on some machines, the eeprom checksum reads out as 0x3ABA
because of some bios issue. adding a flag for ignoring the
checksum and on i218 controllers.
2015-04-11 22:03:47 +02:00
cinap_lenrek 5fd97c7d60 pc, pc64: remove PCICONS debug buffer from pci.c 2015-04-09 14:55:01 +02:00
cinap_lenrek fcd45e0cdd pci: just in case the bios is drunk 2015-04-08 03:46:49 +02:00
cinap_lenrek b7ceab84d3 pc, pc64: handle 64-bit pci membars
this avoids listing the upper half of 64-bit membars
in Pcidev.mem[] array avoiding potential confusion
in drivers.

we also check if the upper half is programmed to zero
by bios and otherwise zap the entry in Pcidev.mem[]
and print a warning.
2015-04-08 03:34:08 +02:00
cinap_lenrek fba26da490 pc, pc64: extend initial memory map for qemu multiboot data
qemu puts multiboot data after the end of the kernel image, so
to be able to KADDR() that memory early, we extend the initial
identity mapping by 16K. right now we just got lucky with
the pc kernel as it rounds the map to 4MB pages.
2015-04-08 02:50:09 +02:00
mischief 853823f435 pc: import intel i218 nic changes from 9atom 2015-04-07 11:38:48 -07:00
cinap_lenrek 49fe7b0dd0 kernel: move arrow cursor definition to port/devmouse.c 2015-04-07 22:05:48 +02:00
cinap_lenrek ba7fbf0114 audiohda: add AMD FCH Azalia Controller (thanks qeed) 2015-04-02 05:30:00 +02:00
cinap_lenrek 0b001e265c ether8169: fix Macv45 2015-04-01 15:22:37 +02:00
cinap_lenrek 0f785af644 ether8169: add 8168GU mac id (thanks qeed) 2015-04-01 14:58:29 +02:00
cinap_lenrek 2d0088598b devkbd: remove kbdputc() unused definition. 2015-04-01 12:21:11 +02:00
cinap_lenrek 736df3bd6c devkbd: remove unused constants 2015-04-01 12:15:54 +02:00
cinap_lenrek bf365ac50e pc, pc64: state dependency to usbehci.h in mkfiles 2015-03-25 17:42:51 +01:00
cinap_lenrek 8e61a0036d usbohci: ensure Ed and Td alignment, fix for amd64 2015-03-22 17:41:35 +01:00
cinap_lenrek c6069e28ac pc, pc64: simplify intrdisable() 2015-02-20 18:43:32 +01:00
cinap_lenrek 581f3852fe pc, pc64: fix intrdisable() MaxIrqLAPIC -> MaxVectorAPIC (thanks mischief) 2015-02-18 06:30:01 +01:00
cinap_lenrek 995379e388 usbehci: initial support for usb on zynq, remove uncached.h
the following hooks have been added to the ehci Ctlr
structore to handle cache coherency (on arm):

	void*	(*tdalloc)(ulong,int,ulong);
	void*	(*dmaalloc)(ulong);
	void	(*dmafree)(void*);
	void	(*dmaflush)(int,void*,ulong);

tdalloc() is used to allocate descriptors and the periodic
frame schedule array. on arm, this needs to return uncached
memory. tdalloc()ed memory is never freed.

dmaalloc()/dmafree() is used for io buffers. this can return
cached memory when when hardware maintains cache coherency (pc)
or dmaflush() is provided to flush/invalidate the cache (zynq),
otherwise needs to return uncached memory.

dmaflush() is used to flush/invalidate the cache. the first
argument tells us if we need to flush (non zero) or
invalidate (zero).

uncached.h is gone now. this change makes the handling explicit.
2015-02-14 03:00:31 +01: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 d21af17367 wifi: fix recvbeacon()
we used to read beyond the boundaries of the becon because of
the end pointer was offset by the beacon header. this is
also what caused the double entries.
2015-01-30 13:41:23 +01:00
cinap_lenrek 18b931dde7 wifi: ignore truncated tlv in beacon/probes 2015-01-30 02:00:07 +01:00
cinap_lenrek 3d4d594049 pc: dont handle pending floating point exception in fpsave thru FPOFF
the FPOFF macro that follows the FXSAVE/FSAVE instructions in l.s
used to execute WAIT instruction when the TS flag was not set. this
is wrong and causes pending exceptions to be raised from fpsave which
is called from provsave() which holds up->rlock making it deadlock
when matherror() tries to postnote() to itself.

so making FPOFF non-waiting (just set TS flag).

we handle pending exception when restoring the context.
2015-01-23 14:01:56 +01:00
cinap_lenrek c4170c5052 igfx: remove hardware cursor support for X60t, does not work 2015-01-17 05:14:23 +01:00
cinap_lenrek 66d0bb89a4 iwl: add "reset" ctl message to software tigger device reset 2015-01-17 01:52:24 +01:00
cinap_lenrek 22d15f98ba igfx: determine amount of preallocated stolen graphics memory for hw cursor
allocate the hardware cursor plane at the end of
preallocated stolen graphics memory.
2015-01-16 13:38:52 +01:00
cinap_lenrek 5e50b13d34 devvga: use uintptr for VGAscr.paddr and VGAscr.storage
some vga drivers use virtual addresses in VGAscr.storage,
so has to be uintptr sized for amd64.
2015-01-16 11:36:11 +01:00
cinap_lenrek 24d693348a igfx: reverting previous change, pci id is for the second graphics controller pci device 2015-01-12 04:07:16 +01:00
cinap_lenrek ce69208641 igfx: support for X200 (thanks bigato) 2015-01-12 03:09:58 +01:00
cinap_lenrek 6e67b04a1f igfx: use mmio to access registers instead of pio, fix wrong igfxmmio segment size
initially, pio was used to access registers so i didnt need
a kernel driver for initial testing.

pio does not work under efi, so use mmio to access registers.
2015-01-10 03:07:29 +01:00
cinap_lenrek 15590e39c6 igfx: implement hardware cursor
this can even be used with the vesa driver, just
enable the cursor after mode switch like:

echo hwgc igfxhwgc >/dev/vgactl
2015-01-09 22:23:25 +01:00
cinap_lenrek 35ad5c9136 igfx: aaaand the kernel part :( 2015-01-09 03:03:23 +01:00
cinap_lenrek 6fe180657f igfx: work in progress intel graphics driver
this driver can modeset lvds on x200s and x230.
everything else is completely untested.
no hardware cursor implemented.
no vgadb entries are provided.
2015-01-09 02:55:12 +01:00
cinap_lenrek 384d4d2d62 sdide: add vid/did for 82801IIH Intel Q35 IDE controller (thanks kenji) 2015-01-04 12:49:44 +01:00
cinap_lenrek 5b24195a0a sdiahci: sanitize ahci pci bar
make sure the ahci pci bar is not in i/o space and has
the right size. also make sure Aport registers are within
the ahci bar range.
2015-01-04 04:26:58 +01:00
cinap_lenrek b5008f3b56 devvga: disable hardware blanking when switching drivers, check softscreen
we have to reset hwblank when switching drivers to
prevent the generic vgablank() to be called by
blankscreen().

remove code setting hwblank from vga drivers as
devvga will always force hwblank to be 1 or 0
depending on if the driver provides a native blanking
routine.

set hwaccel to 1 when the driver provides native fill
and scroll routines independent of softscreen being
disabled. this allows hw acceleration to be used when
softscreen gets switched off.
2015-01-03 18:33:35 +01:00
cinap_lenrek 6cb93914f2 devvga: better way to prevent blank hwaccel race
don't hold drawlock duing vga enable and disable, but just zero
the function pointers under drawlock *before* disabling the vga
device.

holding the drawlock while calling out into enable and disable
is not a good idea. with vgavesa, this might deadlock when
userspace realemu tries to print in a rio window with vgavesa.
2015-01-02 17:07:47 +01:00
cinap_lenrek 9aec87c46c vgavesa: get rid of the vesa kproc
in 9front, screen blanking is always initiated from process context,
so there is no need for a kproc anymore.

care has been taken for the race between vesadisable() and vesablank()
by acquiering the drawlock prior calling scr->dev->enable() and
scr->dev->disable(). this also has the side effect of accelerated
fills and scrolls not being called during device disable.
2015-01-02 15:29:15 +01:00
ftrvxmtrx 04ec990b67 vga, vesa: revert. this needs to be in aux/vga instead 2014-12-26 16:10:45 +01:00
ftrvxmtrx 2cc7c72f8e vga, vesa: scaling modes
At least on some NVIDIA cards the default scaling mode makes
black borders visible on all sides, even on native resolution.
This patch adds a generic "scaling MODE" command to vgactl
and adds support for it on VESA through NVIDIA VBE OEM extension.
It hasn't been tested on any other video cards, but shouldn't
break anything as the scaling mode is only set on write to vgactl.
2014-12-26 15:40:06 +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 c404fd9d6f sdvirtio: provide enable() and disable() functions so it can be switched off 2014-12-22 16:16:36 +01:00
cinap_lenrek e0c221eea6 pc, pc64: fix intrdisable() to remove the Vctl entry even tho we can't disable the interrupt on apic 2014-12-22 16:10:18 +01:00
cinap_lenrek b486d8871b sdvirtio: move common "queue i/o and wait" code into vqio() function, handle notify suppression 2014-12-22 12:17:48 +01:00
cinap_lenrek 515893dda6 pc, pc64, xen: simplify #P/irqalloc 2014-12-22 10:49:52 +01:00
cinap_lenrek f4c6dad8e1 pc, pc64: include PCArch.id in #P/archctl simplify #P/ioalloc read handler 2014-12-22 09:33:35 +01:00
cinap_lenrek 2d06aac2ab pc, pc64: adjust mpshutdown() comment to reflect the current state 2014-12-19 23:57:43 +01:00
cinap_lenrek 7523131e78 pc, pc64: untangle acpireset() from mpshutdown()
mpshutdown() used to call acpireset() making it impossible to build
a kernel without archacpi. now, mpshutdown() is a helper function
that only shuts down the application processors that gets used from
mpreset() and acpireset().

the generic machine reset code in exported by devarch's archreset()
function that is called by mpreset() and from acpireset() as a fallback.
so the code duplication that was in mpshutdown() is avoided.
2014-12-19 23:34:43 +01:00
cinap_lenrek b7e7e5ef3f pc: remove mmuinit0()
all mmuinit0() does is initialize m->gdt, but this isnt neccesary
as this is done by mmuinit() anyway before loading the gdt.
2014-12-18 02:04:42 +01:00
cinap_lenrek 476a47b15c pc, pc64: cleanup devarch
- shorten cpuidprnt so it doesnt have to break line
- addarchfile: complain when running out of entries
- fix range check in rmemrw() (harmless)
- use nil instead of 0 for pointers
2014-12-17 22:49:51 +01:00
cinap_lenrek 0e2ff6fb1f pc: remove unused bootdisk[] variable 2014-12-17 09:45:50 +01:00
cinap_lenrek 06e6115044 pc, pc64: remove old B.COM command line parsing and just pass tokenized BOOTLINE to /boot/boot as argv[]
this change allows command line passing to /boot/boot from qemu like:
qemu -kernel 9pcf -append "-u glenda tcp"
2014-12-17 09:23:21 +01:00
cinap_lenrek 5c29603f50 kernel: remove obsolete comment regarding Mntcache size in */main.c 2014-12-16 08:11:21 +01:00