Commit Graph

151061 Commits

Author SHA1 Message Date
Randall Stewart
d0a679ea35 This is a list of the files for RMI's md_root
file system to get to multi-user. There are
still some rough edges, rge has an issue. And
someone held a spin lock to long.. But its
coming along :-)
2009-12-23 14:48:26 +00:00
Warner Losh
0eb9a6955c Bring in support for n64 and n32 ABIs, at least at the base.
o Rename __start to __start_mips and change the args a little
o Create a new __start written in assembler that copes with the
  different ABIs and rewrites the args a little to make their passing
  more abi agnostic.
o Add an alias _start for __start for the Cavium toolchain (in the
  cavium port, a custom ld script is used which references _start
  instead of the traditional mips __start).
o call _init_tls() when we aren't being an a.out shared library (which
  is the only time _DYNAMIC is != NULL, I think).  We could likely
  retire support for a.out shared libraries entirely, but that will be
  in the future when I'm sure there's not some subtle reason to keep
  them around.

# Note: the reason mips starts at __start instead of _start is purely
# historical, but I didn't want to change it here and in the
# toolchain.  The Cavium build process is kind of the odd duck here,
# but it is trivial to support both, so why not...
2009-12-23 08:22:48 +00:00
Warner Losh
a321ad5e62 Start to add support for N32 and N64 ABIs.
In addition, add a work around for (or maybe you would call it
increase compatibility with) Cavium toolchain:

	the .cprestore macro references fp rather than sp, so we need
	to copy sp to fp in a couple of places.

Also add a couple of comments to explain what's going on.

Obtained from:	Cavium FreeBSD/octeon port.
2009-12-23 08:16:53 +00:00
Warner Losh
5599367b47 Load gp for N32 and N64 operations.
Obtained from:	Cavium's Octeon port
2009-12-23 08:13:44 +00:00
Randall Stewart
c33e262ffe Fixes so kdb works. 2009-12-21 11:29:30 +00:00
Randall Stewart
2be832193d Adds JC's fix to get rid of stray intr's.
Obtained from:	JC - jayachandraanc@netlogicmicro.com
2009-12-20 17:53:35 +00:00
Warner Losh
488141d9e8 Place holder ptrace mips module. Not entirely sure what's required
here yet, so I've not connected it to the build.  I think that we'll
need to move something into the processor specific part of the mips
port by requiring mips_cpu_ptrace or platform_cpu_ptrace be provided
by the ports to get/set processor specific registers, ala SSE
registers on x86.
2009-12-17 23:55:49 +00:00
Warner Losh
c643f1e35d Remove the now-obsolete comments about compile-with. There are no
compile-with lines in this file at all.  So we don't need two warnings
about them.
2009-12-15 23:22:19 +00:00
Warner Losh
eb1b8eeafe Should have been copied frmo OCTEON.hints, but I botched that, so
we're stuck with this.  Given that this branch will soon be merged and
retired, I don't think it matters much.
2009-12-15 00:44:33 +00:00
Warner Losh
912012d34a Hook up parsing of the boot records. 2009-12-10 01:45:06 +00:00
Warner Losh
41d3506b15 Get the sense of this right. We use uintpr_t for bus_addr_t when
we're building everything except octeon && 32-bit.  As note before, we
need a clearner way, but at least now the hack is right.
2009-12-10 01:44:11 +00:00
Warner Losh
e6e7f898dd app_descriptor_addr is unused (I know it is referened still). And
unnecessary since we pass in a3 unmodified to platform_start.
Eliminate it from here and kill one more TARGET_OCTEON in the process.
2009-12-10 01:42:44 +00:00
Warner Losh
6bd8c4ff58 This file is OBE and should have been removed when we renamed things
to OCTEON1.hints.

Submitted by:	jmallet
2009-11-26 15:50:52 +00:00
Warner Losh
c64b37ff1f Add in Cavium's CID. Report what the unknown CID is. 2009-11-24 17:15:22 +00:00
Warner Losh
6adde02590 kill stray printf 2009-11-24 17:14:23 +00:00
Warner Losh
0ff75e4f84 Only all critical_enter()/critical_exit() if curthread has been set.
Otherwise we dereference a null pointer and can't get useful panic
info early in boot.
2009-11-24 17:06:11 +00:00
Warner Losh
73ee766076 looks like there's more to this patch than just this one file. I'll
leave it to neel@ to get all the relevant pieces into the tree.

# we now get well into mi_start before we die
2009-11-24 16:53:58 +00:00
Warner Losh
04c50bba10 Include opt_cputype.h for all .c and .S files referencing TARGET_OCTEON.
Spell ld script name right.

# for the most part, we need to enhance infrastructure to obviate the need
# for such an intrusive option.
2009-11-24 16:32:31 +00:00
Warner Losh
8fccbb54b6 Remove a comment that's bogus.
Include opt_cputype.h since TARGET_OCTEON moved there.
2009-11-24 16:30:29 +00:00
Warner Losh
bf718921ac Make sure kstack0 is page aligned.
# this may have been from neel@ for the sibyte stuff
2009-11-24 16:29:23 +00:00
Warner Losh
715f0e291b Get rid of redundant .kernel in these names. 2009-11-24 14:57:50 +00:00
Warner Losh
96a25a70ad Move the hard-wiring of the dcache on octeon outside of the if
statement.  When no caches support was added, it looks like
TARGET_OCTEON was bogusly moved inside the if.  Also, include
opt_cputype.h to make TARGET_OCTEON actually active.

# now we die in pmap init somewhere...  Most likely because 32MB of RAM is
# too tight given the load address we're using.
2009-11-24 08:35:11 +00:00
Warner Losh
29a21af372 TARGET_OCTEON reqiures opt_cputype.h. 2009-11-24 08:21:48 +00:00
Warner Losh
4a2199914f remove bogus panic.
Don't use fortran style line control.
2009-11-24 08:21:23 +00:00
Warner Losh
d2aaaeac19 Rewrite to try to be more sane:
o Introduce a uart bus space so that we don't have to hack dev/uart to do 8
  byte reads.  This also handles the shift properly, so reset the shift we
  want dev/uart doing to 0.  In effect, this bus space makes the octeon
  registers have an interface to dev/uart that looks just like the old ISA
  bus, but does the necessary 64-bit read/write to the bus.  We only support
  read/write operations.  We do all the widths, but likely could get away
  with only 64-bit and 8-bit given the restricted nature of use of this bus.
o use bus_space_map to set the .bsh rather than a direct assignment.
o Minor cleanup of uart_cpu_getdev to make it conform more to the other
  implementations.
o Add some coments for future work.

# with these changes, we now make it through cninit, but there's still some
# problem that's preventing output, as well as another problem that causes
# us to call panic just after we return from cninit() in platform_start.
2009-11-24 07:50:19 +00:00
Warner Losh
dda960c862 Add size of octeon uart registers to map. 2009-11-24 07:41:15 +00:00
Warner Losh
c37c85b0e4 Prefer ANSI spellings of uintXX_t, etc. 2009-11-24 07:40:38 +00:00
Warner Losh
bdc7523ccf Specify loader script and load address 2009-11-23 07:49:50 +00:00
Warner Losh
e04942b0d7 Start linking at the kernel link address....
# this gets me a loading, but not working, kernel on octeon's simulator.
2009-11-23 07:49:22 +00:00
Warner Losh
cefc105a54 Linker scripts for octeon1 kernels of various flavors. 2009-11-23 07:11:10 +00:00
Warner Losh
714697cd3d Another kludge for 64-bit bus_addr_t with 32-bit pointers... 2009-11-20 16:32:26 +00:00
Warner Losh
10153d080c Horrible kludge to make octeon32 work. I think a better way is to
move the generic code into the config files....
2009-11-20 16:30:35 +00:00
Warner Losh
1e80c0e4aa cast vaddr to uintptr_t before casting it to a bus_space_handle_t.
# I'm sure this indicates a problem, but I'm not sure what...
2009-11-20 16:27:50 +00:00
Warner Losh
e7a9535945 32-bit mixed-mode OCTEON kernel config file. 2009-11-20 16:23:04 +00:00
Warner Losh
6962307a9a If we're ompiling ISA_MIPS32, then use the 32-bit address-size
definitions.
2009-11-20 15:59:41 +00:00
Warner Losh
6ecc37e794 Don't assume register addresses can fit into void *. Minor formatting
simplification while I'm here.
2009-11-20 15:57:45 +00:00
Warner Losh
21ed765c7f Formatting nit. 2009-11-20 15:56:51 +00:00
Oleksandr Tymoshenko
2839b59a94 - Add intr counters for APB interrupts 2009-11-18 22:53:05 +00:00
Oleksandr Tymoshenko
51d85c463d - Add cpu_init_interrupts function that is supposed to
prepeare stuff required for spinning out interrupts later
- Add API for managing intrcnt/intrnames arrays
- Some minor style(9) fixes
2009-11-18 22:52:05 +00:00
Oleksandr Tymoshenko
b39188331e - Code reorg: extract mx25l_read and mx25l_write methods
- Add entry for Spansion flash controller
    Submitted by: Eric L. Chen <lihong@ieee.org>
2009-11-18 22:14:36 +00:00
Neel Natu
b3d4d25037 Make pmap_copy_page() L2-cache friendly by doing the copy through the
cacheable window on physical memory (KSEG0). On the Sibyte processor
going through the uncacheable window (KSEG1) bypasses both L1 and L2
caches so we may end up with stale contents in the L2 cache.

This also makes it consistent with the rest of the function that
uses cacheable mappings to copy pages.

Approved by: imp (mentor)
2009-11-13 09:24:09 +00:00
Oleksandr Tymoshenko
04709b7c07 - Reorganize hints according to if_arge changes: set media
for multiPHY MAC and use mask to specify PHYs.
2009-11-12 21:33:36 +00:00
Oleksandr Tymoshenko
2b8344b8fa - Handle multiphy MAC case: create interface with
fixed-state media with parameters set via hints
    and configure MAC accordingly to these parameters.
    All the underlying PHY magic is done by boot manager
    on startup. At the moment there is no proper way
    to make active and control all PHYs simultaneously
    from one MII bus and there is no way to associate
    incoming/outgoing packet with specific PHY.
2009-11-12 21:27:58 +00:00
Oleksandr Tymoshenko
445ee40baa - include register definitions for respective controllers 2009-11-12 20:48:04 +00:00
Oleksandr Tymoshenko
874108aed9 MFC @199204 2009-11-12 00:36:22 +00:00
Randall Stewart
e7e9513453 My NFS configured version. 2009-11-11 22:37:17 +00:00
Randall Stewart
4ba9b90b06 Ok set in the values in clock 7 as in the
original codes (I had changed one by accident)
Also do the pic_ack/pic_delayed_ack after the interrupt
so we clear it. The clock with these changes starts working.
Its off doing a short/long short/long warning but it
now runs.

My NFS mount now works but has the same problem with
sbin/init (errno 8 ENOEXEC) so it panics with no init.

Either this is a problem with my buildworld.. OR its a
yet undiscovered RMI issue.
2009-11-11 22:36:19 +00:00
Xin LI
41c8c6e876 Add interface description capability as inspired by OpenBSD.
MFC after:	3 months
2009-11-11 21:30:58 +00:00
John Baldwin
f140aad88c More consistent whitespace. 2009-11-11 20:29:40 +00:00
John Baldwin
58fbe5ab67 Use a dedicated callout to drive the transmit watchdog timer instead of
using if_watchdog and if_timer.

Tested by:	gavin
2009-11-11 20:27:53 +00:00