Commit Graph

150330 Commits

Author SHA1 Message Date
Randall Stewart
ebe8d22e40 white space changes 2009-10-29 21:21:01 +00:00
Randall Stewart
f40c80b188 White space changes 2009-10-29 21:14:10 +00:00
Randall Stewart
1b4a3a93ea updates to rge to get it to compile 2009-10-29 15:55:58 +00:00
Randall Stewart
6e3272ee6f more Updates on the RMI code close to compiling now ;-) 2009-10-29 15:55:25 +00:00
Neel Natu
131ec9efd8 Deal with overflow of the COUNT register correctly. The 'cycles_per_hz'
has nothing to do with the rollover.

Approved by: imp (mentor)
2009-10-29 05:18:02 +00:00
Andrew Thompson
64ec125306 Fix build from r198563 (again). Sigh. 2009-10-28 21:41:23 +00:00
Andrew Thompson
394bd883ea Fix build from r198563 2009-10-28 21:39:33 +00:00
Andrew Thompson
d1c3ac3a7a Use init_static_kenv() and setenv() to simplify the environment string handling. 2009-10-28 21:36:46 +00:00
Andrew Thompson
3c2330f2e4 Parse and save the command line passed in from RedBoot (exec -c "xxx") and also
the board specific environment variables.

This is not ar71xx specific and should be shared better.
2009-10-28 21:27:56 +00:00
Andrew Thompson
ed7d70c2bb Allow a scratch buffer to be set in order to be able to use setenv() while
booting, before dynamic kenv is running. A few platforms implement their own
scratch+sprintf handling to save data from the boot environment.
2009-10-28 21:25:22 +00:00
Warner Losh
5919fef7ac Remove useless for statement. i isn't used after it.
Remove needless braces.
2009-10-28 17:03:20 +00:00
Oleksandr Tymoshenko
1453f4e112 - Fix busdma sync: dcache invalidation operates on cache line aligned
addresses and could modify areas of memory that share the same cache
  line at the beginning and at the ending of the buffer. In order to
  prevent a data loss we save these chunks in temporary buffer before
  invalidation and restore them afer it.

Idea suggested by: cognet
2009-10-28 03:34:05 +00:00
Oleksandr Tymoshenko
0ffd7b6759 - Remove bunch of declared but not defined cach-related variables
- Add mips_picache_linesize and mips_pdcache_linesize variables
2009-10-28 00:01:20 +00:00
Oleksandr Tymoshenko
7e60d1a36c - Replace stubs with actual cache info
- minor style(9) fix
2009-10-27 23:45:48 +00:00
Randall Stewart
ee09312370 White space changes. 2009-10-26 11:00:37 +00:00
Randall Stewart
8ab98910b4 Fix Copyright ;-) 2009-10-26 10:59:55 +00:00
Andrew Thompson
c64429e2b5 If the FIS entry is smaller than the sector size then set it as hot so g_slice
calls us to fix it, we then issue a read for a full sector and then copy in/out
the payload. This will happen if Redboot is compiled with
CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG.
2009-10-25 19:13:39 +00:00
Oleksandr Tymoshenko
c3655ab0d0 - Add write support for mx25l flash chip
- Some minor style(9) fixes
2009-10-25 08:43:38 +00:00
Neel Natu
abd74e0c14 Remove redundant instructions from tlb.S
The "_MTC0 v0, COP_0_TLB_HI" is actually incorrect because v0 has not been
initialized at that point. It worked correctly because we subsequently
did the right thing and initialized TLB_HI correctly.

The "li v0, MIPS_KSEG0_START" is redundant because we do exactly the same
thing 2 instructions down.

Approved by: imp (mentor)
2009-10-22 04:35:32 +00:00
Neel Natu
24c8d4c173 Get rid of the hardcoded constants to define cacheable memory:
SDRAM_ADDR_START, SDRAM_ADDR_END and SDRAM_MEM_SIZE

Instead we now keep a copy of the memory regions enumerated by
platform-specific code and use that to determine whether an address
is cacheable or not.

Approved by: imp (mentor)
2009-10-22 02:51:31 +00:00
Oleksandr Tymoshenko
1a71736fb1 - Keep recovering from "MFC went wrong". Add missing ieee80211_* parts,
mergeinfo is already in place
2009-10-21 20:33:50 +00:00
Neel Natu
561f0b80b1 Update options.mips to support config options required to build the SWARM
kernel.

The SWARM kernel does not build yet but at least it gets past the kernel
config stage.

Approved by: imp (mentor)
2009-10-21 00:56:13 +00:00
Oleksandr Tymoshenko
55173ef287 - Commit missing part of "bt" fix: store PC register in pcb_context struct
in cpu_switch and use it in stack_trace function later. pcb_regs contains
    state of the process stored by exception handler and therefor is not
    valid for sleeping processes.
2009-10-20 23:13:08 +00:00
Neel Natu
344214e344 Fix a bug where we would think that the L1 instruction and data cache are
present even though the line size field in the CP0 Config1 register is 0.

Approved by: imp (mentor)
2009-10-20 04:36:08 +00:00
Neel Natu
d428afbbbb The default KERNLOADADDR does not work on MALTA hardware. On my platform the
"First free SDRAM address" reported by YAMON is 0x800b6e61.

So use a conservative KERNLOADADDR of 0x80100000.

Approved by: imp (mentor)
2009-10-20 04:31:20 +00:00
Warner Losh
f2c23ba7c4 Get the PC from the trap frame, since it isn't saved as part of the
pcb regs.
2009-10-18 15:21:48 +00:00
Warner Losh
f43da83b9d Undo spamage of last MFC. 2009-10-18 14:57:04 +00:00
Warner Losh
d14d3e0866 _ALIGN has to return u_long, since pointers don't fit into u_int in
64-bit mips.
2009-10-18 14:56:33 +00:00
Warner Losh
f107b0cc55 Use correct signature for MipsEmulateBranch. The other one doesn't
work for 64-bit compiles.
2009-10-18 14:55:55 +00:00
Oleksandr Tymoshenko
4e6df32763 - Use PC/RA/SP values as arguments for stacktrace_subr instead of trapframe.
Context info could be obtained from other sources (see below) no only from
    td_pcb field
- Do not show a0..a3 values unless they're obtained from the stack. These
    are only confirmed values.
- Fix bt command in DDB. Previous implementation used thread's trapframe
    structure as a source info for trace unwinding, but this structure
    is filled only when exception occurs. Valid register values for sleeping
    processes are in pcb_context array. For curthread use pc/sp/ra for current
    frame
2009-10-17 00:22:07 +00:00
Oleksandr Tymoshenko
7dba4abc79 - Get rid of label_t. It came from NetBSD and was used only in one place 2009-10-16 22:52:18 +00:00
Randall Stewart
257c916acf More initial RMI files. Note that these so far do NOT
compile and many of them may disappear. For example
the xlr_boot1_console.c is old code that is ifdef'd out.
I will clean these sorts of things up as I make progress
on the port. So far the only thing I have I think straightened
out is the bits around the interupt handling... and hey that
may be broke ;-)
2009-10-15 21:14:42 +00:00
Randall Stewart
022e93cf87 Adds the untouched code from the RMI 6.4 stuff.
This has a security device and the gig ethernet device.
Note the 10gig device driver is yet missing.
2009-10-15 21:08:06 +00:00
Randall Stewart
b398a6322f These don't compile yet, but they are some of the first drivers
that will need working on to fit from 6.x -> head. But first
I must get the base to compile (wanted to get as much in the tree
as I could before my flight to India).
2009-10-15 21:06:59 +00:00
Randall Stewart
8f28855b07 Adds the first files from the RMI work with my re-work of their
intr_machdep.c to use updated interfaces etc. More coming.. and
some day it may compile ;-)
2009-10-15 21:05:09 +00:00
Randall Stewart
3f907e3338 Does 4 things:
1) Adds future RMI directories
2) Places intr_machdep.c in specfic files.arch pointing to the generic
   intr_machdep.c.  This allows us to have an architecture dependant intr_machdep.c
   (which we will need for RMI) in the machine specific directory
3) removes intr_machdep.c from files.mips
4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We
   may need to look at finding a better place to put this. But first I want to
   get this thing compiling.
2009-10-15 21:03:32 +00:00
Oleksandr Tymoshenko
3a5e117a7b - Move stack tracing function to db_trace.c
- Axe unused extern MipsXXX declarations
- Move all declarations for functions in exceptions.S/swtch.S
    from trap.c to respective headers
2009-10-14 01:43:53 +00:00
Oleksandr Tymoshenko
33df61e107 - Enable fdisk build for MIPS 2009-10-13 00:43:31 +00:00
Oleksandr Tymoshenko
cb00f8cae5 - Fix CPU divisor mask
Repored by: Luiz Otavio O Souza
2009-10-11 21:28:56 +00:00
Oleksandr Tymoshenko
ca2b541cb0 - curbrk variable for sbrk and brk should be the same
- Add correct variable names to Symbol.map
2009-10-06 06:35:52 +00:00
Oleksandr Tymoshenko
b3d484edee - Revert part of r197685 because this change leads to wrong data in cache. 2009-10-05 23:19:51 +00:00
Oleksandr Tymoshenko
5c0509f9c0 - Fix the problem presented by r196988. svn merge was erroneously
interrupted and after re-run new files were not added to repo though
respective revisions were marked as merged. This commit presents latest
versions of these files.
2009-10-02 23:48:42 +00:00
Oleksandr Tymoshenko
1ee774f614 - MFC 2009-10-02 19:51:03 +00:00
Qing Li
e5c610d659 The flow-table associates TCP/UDP flows and IP destinations with
specific routes. When the routing table changes, for example,
when a new route with a more specific prefix is inserted into the
routing table, the flow-table is not updated to reflect that change.
As such existing connections cannot take advantage of the new path.
In some cases the path is broken. This patch will update the affected
flow-table entries when a more specific route is added. The route
entry is properly marked when a route is deleted from the table.
In this case, when the flow-table performs a search, the stale
entry is updated automatically. Therefore this patch is not
necessary for route deletion.

Submitted by:	simon, phk
Reviewed by:	bz, kmacy
MFC after:	3 days
2009-10-01 20:32:29 +00:00
Oleksandr Tymoshenko
1c4059d5ea - Sync caches properly when dealing with sf_buf 2009-10-01 20:05:36 +00:00
John Baldwin
3538cf0cbe Put square backets ([]) around process names for system processes to patch
the behavior of ps(1).
2009-10-01 19:12:14 +00:00
Xin LI
6f62807611 Return EOPNOTSUPP instead of EINVAL when doing chflags(2) over an old
format ZFS, as defined in the manual page.

Submitted by:	pjd (response of my original patch but bugs are mine)
MFC after:	3 days
2009-10-01 18:58:26 +00:00
Andrew Thompson
c8a14b9124 EHCI Hardware BUG workaround
The EHCI HW can use the qtd_next field instead of qtd_altnext when a short
packet is received. This contradicts what is stated in the EHCI datasheet.
Also the total-bytes field in the status field of the following TD gets
corrupted upon reception of a short packet!  We work this around in software by
not queueing more than one job/TD at a time of up to 16Kbytes! The bug has been
seen on multiple INTEL based EHCI chips.  Other vendors have not been tested
yet.

- Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not
  applications using LibUSB v0.1, v1.2 and v2.0.
- Mass Storage (umass) is affected.

Submitted by:	Hans Petter Selasky
MFC after:	3 days
2009-10-01 18:37:16 +00:00
Joe Marcus Clarke
ad1e5416ab Correct the pthread stub prototype for pthread_mutexattr_settype to allow for
the type argument.  This is known to fix some pthread_mutexattr_settype()
invocations, especially when it comes to pulseaudio.

Approved by:	kib
		deischen (threads)
MFC after:	3 days
2009-10-01 18:23:50 +00:00
Edward Tomasz Napierala
2c29cfa083 Provide default implementation for VOP_ACCESS(9), so that filesystems which
want to provide VOP_ACCESSX(9) don't have to implement both.  Note that
this commit makes implementation of either of these two mandatory.

Reviewed by:	kib
2009-10-01 17:22:03 +00:00