Commit graph

68 commits

Author SHA1 Message Date
cinap_lenrek
fadbb92afa zynq: do mpinit() early so cpu1 debug prints do not intermix 2015-03-06 14:31:51 +01:00
cinap_lenrek
3cd7978a72 zynq: fix usb by implementing delay() and give proper port speed in portstatus 2015-03-05 23:48:23 +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
6b2d1f0186 zynq: do fixed mapping for ocm memory on boot and make kaddr() and paddr() work with it
map the whole ocm memory on boot so we can translate physical to
virtual addresses and back for uncached memory using KADDR() and
PADDR().

replace ualloc() with ucalloc() returning virtual address. physical
address can be acquired with PADDR() now.

as ocm is now always mapped, use KADDR() instead of tmpmap() for
mp bootstrap.
2015-02-14 02:44:19 +01:00
cinap_lenrek
8ac5227a36 zynq: fix print format warning in screeninit() 2015-02-07 03:24:07 +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
9e45c8bc9b zynq: differentiate various pagefault types in faultarm() 2015-01-01 11:32:00 +01:00
cinap_lenrek
cdf7520738 zynq: enable branch prediction 2014-12-30 15:49:44 +01:00
cinap_lenrek
080cc49f50 zynq: implement µs() 2014-12-30 15:17:27 +01:00
cinap_lenrek
ed294a65cb zynq: enable prefetch hints and drop-prefetch 2014-12-30 15:16:46 +01:00
cinap_lenrek
cb2103879e zymq: lilu dallas, multicore
implement multiprocessor support.
2014-12-29 16:02:57 +01:00
cinap_lenrek
ed5c9fd00a zynq: only tmpmap() while splhi(), remove unneeded coherence() after tmpunmap(), splhi() in l2free()
we have to call tmpmap() with interrupts disabled as the map
is a per cpu and a interrupt can preempt us while we where
commited to use a entry but *before* we wrote it!

tmpunmap() already calls coherence() before flushpg() so it
is not needed after tmpunmap().

splhi() in l2free() isnt needed as l2free() is always called
with interrupts disabled from mmuswitch() and mmurelease().
2014-12-25 11:30:29 +01:00
cinap_lenrek
9b5387fbde zynq: dont do install target by default in the mkfile 2014-12-25 11:12:31 +01:00
cinap_lenrek
77e0feb67c zynq: fpsave() and fpclear() both need to disable the fpu
fpsave needs to disable the fpu! otherwise we won't catch
the mathtrap() in the kernel or when context switching to
another process that will attempt to use it.
2014-12-24 20:53:58 +01:00
cinap_lenrek
1c6daca577 zynq: active.machs = 1 2014-12-24 16:56:48 +01:00
cinap_lenrek
aca053c18a zynq: set mainmem->maxsize so kernel malloc() wont fail after 4MB 2014-12-24 13:37:54 +01:00
cinap_lenrek
2ef69f42d8 zynq: fix kernel configuration so it builds 2014-12-24 11:20:40 +01:00
aiju
7a3f0998a0 added zynq kernel 2014-12-24 10:21:51 +01:00