Commit graph

3925 commits

Author SHA1 Message Date
cinap_lenrek 16e08adb32 efi: add initial pxe support (v4 only) 2014-10-23 23:11:49 +02:00
cinap_lenrek e81e1a4aed pc, pc64: make mtrr() callable from interrupt context and before mpinit
to make it possible to mark the bootscreen framebuffer
as write combining in early initialization, mtrr() is
changed not not to error() but to return an error string.

as bootscreen() is used before multiprocessor initialization,
we have to synchronize the mtrr's for every processor as
it comes online. for this, a new mtrrsync() function is
provided that is called from cpuidentify() if mtrr support
is indicated.

the boot processor runs mtrrsync() which snarfs the
registers. later, mtrrsync() is run again from the
application processors which apply the values from the
boot processor.

checkmtrr() from mp.c was removed as its task is also
done by mtrrsync() now.
2014-10-21 06:03:03 +02:00
cinap_lenrek dfe8c8bffb 9boot(8): document efi booting 2014-10-19 21:55:19 +02:00
cinap_lenrek d91fe5b38b inst: ignore *bootscreen= variable when generating plan9.ini 2014-10-19 21:17:08 +02:00
cinap_lenrek bcc65db171 pc, pc64: lookup pci device for bootscreen() and maximize framebuffer aperture so can change screen resolution 2014-10-19 21:00:34 +02:00
cinap_lenrek d7785060fb efi: use LocateHandle() and HandleProtocol() to check for multiple gop protocols to find a usable one
the gop returned by LocateProtocol() is not usable on thinkpad x230,
so iterate over all handles to find a usable one.
2014-10-19 19:55:45 +02:00
cinap_lenrek d6ea496960 efi: fix compiler warnings, remove indicator prints in readn() 2014-10-19 22:01:13 +02:00
cinap_lenrek f0ff0fb054 efi: simplify bootscreen code 2014-10-18 19:15:53 +02:00
aiju 040166493d games/gba: add state saving 2014-10-18 19:08:38 +02:00
cinap_lenrek 99e004c72e efi: convert pixel format to bootscreen color channel 2014-10-18 18:48:56 +02:00
cinap_lenrek 6aa6e9fc8b efi: make clean target virtual 2014-10-18 02:15:40 +02:00
cinap_lenrek 6f3dfb57eb efi: add experimental efi bootloader
this is basically a port of 9boot to EFI. theres
support for IA32 (386) and X64 (amd64).

has been tested only under qemu with OVMF so far.
2014-10-18 02:13:02 +02:00
cinap_lenrek 0a6439a1f5 pc, pc64: allow passing RSDT pointer in *acpi= boot parameter, early bootscreeninit(), fix rampage() usage
rampage() cannot be used after meminit(), so test for
conf.mem[0].npage != 0 and use xalloc()/mallocalign()
instead. this allows us to use vmap() early before
mmuinit() which is needed for bootscreeninit() and
acpi.

to get memory for page tables, pc64 needs a lowraminit().

with EFI, the RSDT pointer is passed in *acpi= parameter
from the efi loader. as the RSDT is ususally at the end of
the physical address space (and not to be found in
bios areas), we cannot KMAP() it so we need to vmap().
2014-10-18 02:01:58 +02:00
BurnZeZ 81e0d6e988 sysupdate/psfax/play: fix unquoted brackets causing rc to perform unnecessary file lookups 2014-10-15 15:57:51 -04:00
cinap_lenrek b52f0c884e pc: add *bootscreen= variable to pass pre-initialized framebuffer info to kernel
EFI system has no cga or vesa anymore, so it becomes neccesary to
pass GOP framebuffer info to the kernel to get some output on the
screen.
2014-10-13 23:02:53 +02:00
cinap_lenrek cc6ab31891 pc: sanity check bda value in lowraminit() to avoid overflow with efi 2014-10-12 20:18:59 +02:00
stanley lieber ca694c51ef pkg: change default repo to http://9front.org/pkg/386 2014-10-12 13:27:53 -04:00
BurnZeZ 748a95266f rio: fix "-cd dir" in mountspec being ignored 2014-10-11 11:47:38 -04:00
stanley lieber 081bbcf0a1 fortunes: You have an agenda. 2014-10-06 21:17:26 -04:00
aiju 5de71b116a games/gba: new faster ppu code, audio support 2014-10-03 16:52:56 +02:00
aiju 02ea56dbda added gbatype 2014-09-30 20:46:13 +02:00
aiju 74b7abe95c games/gba: fix dma repeat bit and eeprom addresses 2014-09-30 15:48:32 +02:00
aiju 4f264cedfb added crc32 2014-09-30 13:07:36 +02:00
cinap_lenrek 4f4d71b941 hgfs: make data files with meta headers having the right size after open
to get the right data size of a file, the revlog needs to have been
opened and the metaheader parsed. as an optimization, we used to
open revlog only on the first read resulting revlogs with metaheaders
having the wrong size returned by fstat() until the first read().

tar relies on fstat() giving the correct file size, so just open
the revlog on open. reading directories can still yield the wrong
size but it is not that critical.
2014-09-29 21:01:51 +02:00
cinap_lenrek c1dc5d15c3 snap: change ulong return of stackptr() to uvlong for amd64 2014-09-29 20:11:58 +02:00
aiju 752841fcc1 games/gba: small fixes 2014-09-28 19:41:52 +02:00
cinap_lenrek 15afb9d00b apply ps2mouse corruption fix to omap
the omap ps2mouse driver is currently unused, but
in case of being finished at some point, apply the
fix from the pc driver.
2014-09-28 19:02:25 +02:00
cinap_lenrek dbb0f46e58 merge 2014-09-28 18:29:41 +02:00
cinap_lenrek 36db1295be pc/pc64: fix ps2mouse memory corruption race
there was a memory corruption bug caused by us enabling the
ps2mouseputc() handler *before* initializing packetsize.

once we enabled the handler, mouse interrupts could come
in and advance the packet buffer index (nb) beyond the
buffer boundaries.

as ps2mouseputc() only checked for ++nb == packetsize, once
nb was advanced beyond the packetsize, it would continue writing
beyond the buffer and corrupt memory with each mouse packet byte.

solution is to initialize packetsize *before* enabling the
handler, and also do a >= check in ps2mouseputc() in case the
packetsize gets changed to a smaller value at runtime.
2014-09-28 18:28:38 +02:00
cinap_lenrek a494cc74ad ndb/dns: request recursion only for local dns servers
we used to set RD flag in requests unconditionally, which
is fine by the standard but some dns server administrators
seem to use it as a denial of service indicator (for ther
non recursive authoritative nameservers) and ignore the
request.

so only set the RD flag when talking to local dns servers.
2014-09-28 05:15:25 +02:00
cinap_lenrek eb6a4fc1a4 devcons: avoid division by zero reading Qsysstat
alexchandel got the kernel to crash with divide error
on qemu 2.1.2/macosx at this location. probably
caused by perfticks()/tsc being wrong or accounttime()
not having been called yet from timer interrupt yet for
some reason.
2014-09-28 02:42:33 +02:00
aiju c8cf0cee47 games/gba: remove bogus file 2014-09-28 22:42:11 +02:00
aiju 05bdd09bc3 merge 2014-09-27 20:51:00 +02:00
aiju 77f3fa19de games/gba: slowly working (no pun intended) 2014-09-27 20:50:20 +02:00
mischief d271631647 hgignore: ignore amd64 kernel and init 2014-09-27 01:35:06 -07:00
mischief ee29c17639 pc64: enable rtl8169 driver (thanks awabimakoto for testing) 2014-09-24 14:19:22 -07:00
cinap_lenrek decc7ec518 6c/8c: eleminate moves by swaping source and destination operands in peephole pass 2014-09-24 20:45:16 +02:00
cinap_lenrek 4cb032442a acid: fix sysr1() stack corruption
the syscall stubs (for amd64) currently have a unconditional
spill of the first (register) argument to the stack.

sysr1 (and _nsec) are exceptional in that they do not
take any arguments, so the stub is writing unconditionally
to ther first argument slot on the stack.

i could avoid emiting the spill in the syscall stubs for
sysr1 but that would also break truss which assumes fixed
instruction sequence from stub start to the syscall number.

i'm not going to complicate the syscall stubs just for
sysr1 (_nsec is not used in 9front), but just add a dummy
argument to sysr1 definition that can receive the bogus
argument spill.
2014-09-22 23:07:59 +02:00
cinap_lenrek 84c40fb226 devip: sanity check Nchan in Fsproto()
devip can only handle Maskconv+1 conversations per
protocol depending on how many bits it uses in the
qid to encode the conversation number.

we check this when the protocol gets registered.

if we do not do this, the kernel will mysteriously
panic when the conversaion numbers collide which
took some time to debug.
2014-09-21 19:24:38 +02:00
cinap_lenrek 59ab557f31 sysinfo: relax regex for start of kernel boot messages
we used to look for /^Plan 9$/ for the start of kernel
boot messages in /dev/kmesg. but the xen kernel prints
Plan 9 (.....) on boot. so just look for line starting
with /^Plan 9/ for now.
2014-09-21 18:28:35 +02:00
cinap_lenrek c145a2c0aa devip: print protocol name in garbage collection notification 2014-09-21 18:02:53 +02:00
cinap_lenrek 47e52123d0 pc64: print "Plan 9" on boot, cleanup pccpu64 files 2014-09-21 16:06:25 +02:00
cinap_lenrek 2604bc3603 stats: handle /dev/sysstat 32bit overflow in delta calculation
the numbers from /dev/sysstat overflow on 32bit, so have
to do subtraction modulo 2^32 as we calculate with 64bit
integers.

thanks mischief for reporting this.
2014-09-20 18:06:59 +02:00
cinap_lenrek 19a8f66eec pc64: syscallfmt for nsec syscall 2014-09-20 01:37:11 +02:00
cinap_lenrek acd15f13c4 pc64: put return value of nsec syscall in register on amd64
WHAT WHERE THEY *THINKING*??!?!

unlike seek, the (new) nsec syscall (not used in 9front libc)
returns the time value in register (from nix), so do the same
for compatibility.
2014-09-20 01:07:46 +02:00
cinap_lenrek f899e55818 libmemdraw: fix byte ordering in memfillcolor()
memfillcolor() used to write longs in host byte
order which is wrong. have to always use little
endian.

to simplify, moved little endian conversion into
memsetl() and memsets() avoiding code duplication.
2014-09-19 17:49:48 +02:00
cinap_lenrek a1b2b9b126 lib9p: fix nil dereference crash in remove for directory permission check
file->parent can be nil when the file has been previously removed.
removefile() deals with this, so skip the permission check in
that case and let removefile() error out.
2014-09-19 05:22:26 +02:00
cinap_lenrek 5d8300d2eb teg2: fix wrong l2 setshift address in wholecache() (from sources) 2014-09-17 16:34:30 +02:00
cinap_lenrek ce80c5029e oggdec: recognize "begin of stream" packets and restart decoding 2014-09-16 20:25:01 +02:00
cinap_lenrek 187aad97be merge 2014-09-16 16:42:16 +02:00