]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoUse io(4) for I/O port access on ia64, rather than through sysarch(2).
marcel [Mon, 11 Jan 2010 18:10:13 +0000 (18:10 +0000)]
Use io(4) for I/O port access on ia64, rather than through sysarch(2).
I/O port access is implemented on Itanium by reading and writing to a
special region in memory. To hide details and avoid misaligned memory
accesses, a process did I/O port reads and writes by making a MD system
call. There's one fatal problem with this approach: unprivileged access
was not being prevented. /dev/io serves that purpose on amd64/i386, so
employ it on ia64 as well. Use an ioctl for doing the actual I/O and
remove the sysarch(2) interface.

Backward compatibility is not being considered. The sysarch(2) approach
was added to support X11, but support for FreeBSD/ia64 was never fully
implemented in X11. Thus, nothing gets broken that didn't need more work
to begin with.

MFC after: 1 week

14 years agoRather than using an extra variable, only call uname if really needed and
bz [Mon, 11 Jan 2010 17:58:15 +0000 (17:58 +0000)]
Rather than using an extra variable, only call uname if really needed and
then directly assign the result.

Submitted by: jmallett
MFC after: 24 days
X-MFC with: r201815

14 years agoCorrect a path in an include I missed earlier
imp [Mon, 11 Jan 2010 17:29:20 +0000 (17:29 +0000)]
Correct a path in an include I missed earlier
Remove references to if_watchdog.  The rge_watchdog routine was empty anyway.

14 years agoFix bug in cfe_enumenv(). The CFE API to invoke is CFE_CMD_ENV_ENUM
imp [Mon, 11 Jan 2010 17:16:06 +0000 (17:16 +0000)]
Fix bug in cfe_enumenv(). The CFE API to invoke is CFE_CMD_ENV_ENUM
and not CFE_CMD_ENV_SET.

Submitted by: neel@

14 years agoRemove redundant interrupt mapper code. We don't need to disable the
imp [Mon, 11 Jan 2010 17:14:46 +0000 (17:14 +0000)]
Remove redundant interrupt mapper code. We don't need to disable the
interrupt sources feeding into a hardintr anymore. The
mips_mask_hard_irq() function does that for us while an interrupt is
being processed.

Submitted by: neel@

14 years agoGet sb_zbpci.c compiling again after the macros PCI_BUSMAX,
imp [Mon, 11 Jan 2010 17:14:10 +0000 (17:14 +0000)]
Get sb_zbpci.c compiling again after the macros PCI_BUSMAX,
PCI_SLOTMAX and PCI_FUNCMAX were moved to pcireg.h.

Submitted by: neel@

14 years agoDon't include <utmp.h> when using <utmpx.h>.
ed [Mon, 11 Jan 2010 16:27:56 +0000 (16:27 +0000)]
Don't include <utmp.h> when using <utmpx.h>.

libopie includes both <utmp.h> and <utmpx.h> in this case and uses some
#defines to let the code use struct utmpx and its utility functions.
We'd better not include <utmp.h> here, because maybe it will not be
present in the future.

14 years agoSimplify pmap_init(). Additionally, correct a harmless misbehavior on i386.
alc [Mon, 11 Jan 2010 16:01:20 +0000 (16:01 +0000)]
Simplify pmap_init().  Additionally, correct a harmless misbehavior on i386.
Specifically, where locore had created large page mappings for the kernel,
the wrong vm page array entries were being initialized.  The vm page array
entries for the pages containing the kernel were being initialized instead
of the vm page array entries for page table pages.

MFC after: 1 week

14 years agoEliminate an unused declaration.
alc [Mon, 11 Jan 2010 15:51:13 +0000 (15:51 +0000)]
Eliminate an unused declaration.

14 years agoFix the previous commit (still not used to svn vs. cvs). Use the
harti [Mon, 11 Jan 2010 09:16:42 +0000 (09:16 +0000)]
Fix the previous commit (still not used to svn vs. cvs). Use the
define from paths.h for the default temporary directory and remove
and unneccessary getenv call.

14 years agoAttempt to cope with the dev/rmi -> mips/rmi/dev move.
imp [Mon, 11 Jan 2010 04:49:44 +0000 (04:49 +0000)]
Attempt to cope with the dev/rmi -> mips/rmi/dev move.

14 years agoCope with the octeon1->cavium move.
imp [Mon, 11 Jan 2010 04:40:38 +0000 (04:40 +0000)]
Cope with the octeon1->cavium move.

14 years agoCope with the octeon1->cavium move. Note: none of this junk belongs here.
imp [Mon, 11 Jan 2010 04:38:37 +0000 (04:38 +0000)]
Cope with the octeon1->cavium move.  Note: none of this junk belongs here.

14 years agoCope with the move and if_timer going way.
imp [Mon, 11 Jan 2010 04:29:26 +0000 (04:29 +0000)]
Cope with the move and if_timer going way.

14 years agoMerge from projects/mips to head by hand:
imp [Mon, 11 Jan 2010 04:13:06 +0000 (04:13 +0000)]
Merge from projects/mips to head by hand:

Defintions for cavium uart (do they belong here?)

14 years agoMerge from projects/mips to head by hand:
imp [Mon, 11 Jan 2010 03:43:18 +0000 (03:43 +0000)]
Merge from projects/mips to head by hand:

copy over cfe_env.c...

14 years agoAdd a new option, -q howmany, which when used in conjuction with -w,
delphij [Mon, 11 Jan 2010 03:00:17 +0000 (03:00 +0000)]
Add a new option, -q howmany, which when used in conjuction with -w,
exits netstat after _howmany_ outputs.

Requested by: thomasa
Reviewed by: freebsd-net (bms, old version in early 2007)
MFC after: 1 month

14 years agoThis was somehow copied to the wrong place :(. Remove the spare copy.
imp [Mon, 11 Jan 2010 00:41:14 +0000 (00:41 +0000)]
This was somehow copied to the wrong place :(.  Remove the spare copy.

14 years agoMove this to the right location. Grump.
imp [Mon, 11 Jan 2010 00:40:19 +0000 (00:40 +0000)]
Move this to the right location.  Grump.

14 years agoAdd the Globetrotter GE40x.
thompsa [Mon, 11 Jan 2010 00:18:40 +0000 (00:18 +0000)]
Add the Globetrotter GE40x.

Submitted by: Mike Tancsa

14 years agoMerge change r198561 from projects/mips to head:
imp [Sun, 10 Jan 2010 22:34:18 +0000 (22:34 +0000)]
Merge change r198561 from projects/mips to head:

r198561 | thompsa | 2009-10-28 15:25:22 -0600 (Wed, 28 Oct 2009) | 4 lines
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.

14 years agoLet lastcomm(1) build without <utmp.h>.
ed [Sun, 10 Jan 2010 21:59:06 +0000 (21:59 +0000)]
Let lastcomm(1) build without <utmp.h>.

Use MAXLOGNAME - 1 instead of UTNAMESIZE. There is no definition for TTY
name sizes, at least not as low as 8, so hardcode it for now.

14 years agoProperly make the end key work again for TERM=xterm.
ed [Sun, 10 Jan 2010 21:41:37 +0000 (21:41 +0000)]
Properly make the end key work again for TERM=xterm.

I've been so busy hacking on utmpx the last couple of days, out of
reflex, I committed it to the wrong source tree. Note to myself: don't
hack on FreeBSD while watching TV at the same time.

PR: conf/142578
Submitted by: Yuri Pankov <yuri pankov gmail com>
Reminded by: stefanf

14 years agoEliminate unused declarations.
alc [Sun, 10 Jan 2010 21:00:52 +0000 (21:00 +0000)]
Eliminate unused declarations.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:29:20 +0000 (20:29 +0000)]
Merge from projects/mips to head by hand:

sorry for the huge firehose on this commit, it would be too tedious
to do file by file

r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines
Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the
BSP.  Provide a missing prototype.

r201880 | neel | 2010-01-08 19:17:14 -0700 (Fri, 08 Jan 2010) | 7 lines
Compute the target of the jump in the 'J' and 'JAL' instructions
correctly. The 256MB segment is formed by taking the top 4 bits
of the address of the instruction in the "branch delay" slot
as opposed to the 'J' or 'JAL' instruction itself.

r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines
Centralize initialization of pcpu, and set curthread early...

r201770 | neel | 2010-01-07 22:53:11 -0700 (Thu, 07 Jan 2010) | 4 lines
Add a DDB command "show pcb" to dump out the contents of a thread's PCB.

r201631 | neel | 2010-01-05 23:42:08 -0700 (Tue, 05 Jan 2010) | 5 lines
Remove all CFE-specific code from locore.S. The CFE entrypoint initialization
is now done in platform-specific code.

r201563 | neel | 2010-01-04 23:58:54 -0700 (Mon, 04 Jan 2010) | 6 lines
This change increases the size of the kernel stack for thread0 from
PAGE_SIZE to (2 * PAGE_SIZE). It depends on the memory allocated by
pmap_steal_memory() being aligned to a PAGE_SIZE boundary.

r200656 | imp | 2009-12-17 16:55:49 -0700 (Thu, 17 Dec 2009) | 7 lines
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.

r200342 | imp | 2009-12-09 18:42:44 -0700 (Wed, 09 Dec 2009) | 4 lines
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.

r199760 | imp | 2009-11-24 10:15:22 -0700 (Tue, 24 Nov 2009) | 2 lines
Add in Cavium's CID.  Report what the unknown CID is.

r199755 | imp | 2009-11-24 09:53:58 -0700 (Tue, 24 Nov 2009) | 5 lines
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.

r199754 | imp | 2009-11-24 09:32:31 -0700 (Tue, 24 Nov 2009) | 6 lines
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.

r199753 | imp | 2009-11-24 09:30:29 -0700 (Tue, 24 Nov 2009) | 3 lines
Remove a comment that's bogus.
Include opt_cputype.h since TARGET_OCTEON moved there.

r199752 | imp | 2009-11-24 09:29:23 -0700 (Tue, 24 Nov 2009) | 4 lines
Make sure kstack0 is page aligned.
# this may have been from neel@ for the sibyte stuff

r199742 | imp | 2009-11-24 01:35:11 -0700 (Tue, 24 Nov 2009) | 8 lines
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.

r199741 | imp | 2009-11-24 01:21:48 -0700 (Tue, 24 Nov 2009) | 2 lines
TARGET_OCTEON reqiures opt_cputype.h.

r199736 | imp | 2009-11-24 00:40:38 -0700 (Tue, 24 Nov 2009) | 2 lines
Prefer ANSI spellings of uintXX_t, etc.

r199598 | imp | 2009-11-20 09:30:35 -0700 (Fri, 20 Nov 2009) | 3 lines
Horrible kludge to make octeon32 work.  I think a better way is to
move the generic code into the config files....

r199597 | imp | 2009-11-20 09:27:50 -0700 (Fri, 20 Nov 2009) | 4 lines
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...

r199496 | gonzo | 2009-11-18 15:52:05 -0700 (Wed, 18 Nov 2009) | 5 lines
- 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

r199246 | neel | 2009-11-13 02:24:09 -0700 (Fri, 13 Nov 2009) | 10 lines
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)

r198842 | gonzo | 2009-11-02 23:42:55 -0700 (Mon, 02 Nov 2009) | 3 lines
- Handle errors when adding children to nexus. This sittuation
    might occure when there is dublicate of child's entry in hints

r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines
With this commit our friend RMI will now compile. I have
not tested it and the chances of it running yet are about
ZERO.. but it will now compile. The hard part now begins,
 making it run ;-)

r198569 | neel | 2009-10-28 23:18:02 -0600 (Wed, 28 Oct 2009) | 5 lines
Deal with overflow of the COUNT register correctly. The 'cycles_per_hz'
has nothing to do with the rollover.

r198550 | imp | 2009-10-28 11:03:20 -0600 (Wed, 28 Oct 2009) | 3 lines
Remove useless for statement.  i isn't used after it.
Remove needless braces.

r198534 | gonzo | 2009-10-27 21:34:05 -0600 (Tue, 27 Oct 2009) | 8 lines
- 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

r198531 | gonzo | 2009-10-27 18:01:20 -0600 (Tue, 27 Oct 2009) | 3 lines
- Remove bunch of declared but not defined cach-related variables
- Add mips_picache_linesize and mips_pdcache_linesize variables

r198530 | gonzo | 2009-10-27 17:45:48 -0600 (Tue, 27 Oct 2009) | 3 lines
- Replace stubs with actual cache info
- minor style(9) fix

r198355 | neel | 2009-10-21 22:35:32 -0600 (Wed, 21 Oct 2009) | 11 lines
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.

r198354 | neel | 2009-10-21 20:51:31 -0600 (Wed, 21 Oct 2009) | 9 lines
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.

r198310 | gonzo | 2009-10-20 17:13:08 -0600 (Tue, 20 Oct 2009) | 5 lines
- 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.

r198264 | neel | 2009-10-19 22:36:08 -0600 (Mon, 19 Oct 2009) | 5 lines
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.

r198208 | imp | 2009-10-18 09:21:48 -0600 (Sun, 18 Oct 2009) | 3 lines
Get the PC from the trap frame, since it isn't saved as part of the
pcb regs.

r198205 | imp | 2009-10-18 08:55:55 -0600 (Sun, 18 Oct 2009) | 3 lines
Use correct signature for MipsEmulateBranch.  The other one doesn't
work for 64-bit compiles.

r198182 | gonzo | 2009-10-16 18:22:07 -0600 (Fri, 16 Oct 2009) | 11 lines
- 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

r198181 | gonzo | 2009-10-16 16:52:18 -0600 (Fri, 16 Oct 2009) | 2 lines
- Get rid of label_t. It came from NetBSD and was used only in one place

r198066 | gonzo | 2009-10-13 19:43:53 -0600 (Tue, 13 Oct 2009) | 5 lines
- 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

r197796 | gonzo | 2009-10-05 17:19:51 -0600 (Mon, 05 Oct 2009) | 2 lines
- Revert part of r197685 because this change leads to wrong data in cache.

r197685 | gonzo | 2009-10-01 14:05:36 -0600 (Thu, 01 Oct 2009) | 2 lines
- Sync caches properly when dealing with sf_buf

r197014 | imp | 2009-09-08 21:57:10 -0600 (Tue, 08 Sep 2009) | 2 lines
Ugly hack to get this to compile.  I'm sure there's a better way...

r197013 | imp | 2009-09-08 21:54:55 -0600 (Tue, 08 Sep 2009) | 2 lines
First half of making this 64-bit clean: fix prototypes.

r196988 | gonzo | 2009-09-08 13:15:29 -0600 (Tue, 08 Sep 2009) | 2 lines
- MFC from head@196987

r196313 | imp | 2009-08-17 06:14:40 -0600 (Mon, 17 Aug 2009) | 2 lines
suword64 and csuword64.  Needed by ELF64 stuff...

r196266 | imp | 2009-08-15 16:51:11 -0600 (Sat, 15 Aug 2009) | 5 lines
(1) Fix a few 32/64-bit bugs.
(2) Also, always allocate 2 pages for the stack to optimize TLB usage.
Submitted by: neel@ (2)

r196265 | imp | 2009-08-15 16:48:09 -0600 (Sat, 15 Aug 2009) | 2 lines
Various 32/64-bit confusion cleanups.

r196264 | imp | 2009-08-15 16:45:46 -0600 (Sat, 15 Aug 2009) | 6 lines
(1) Some CPUs have a range to map I/O cyces on the pci bus.  So allow
them to work by allowding the nexus to assign ports.
(2) Remove some Octeon junk that shouldn't be necessary.
Submitted by: neel@ (#1) for SB1 port.

r196061 | gonzo | 2009-08-04 11:32:55 -0600 (Tue, 04 Aug 2009) | 2 lines
- Use register_t for registers values

r195984 | gonzo | 2009-07-30 17:48:29 -0600 (Thu, 30 Jul 2009) | 4 lines
- Properly unwind stack for functions with __noreturn__ attribute
Submitted by: Neelkanth Natu <neelnatu@yahoo.com>

r195983 | gonzo | 2009-07-30 17:29:59 -0600 (Thu, 30 Jul 2009) | 4 lines
- mark map as coherent if requested by flags
- explicitly set memory allocation method in map flags instead
    of duplicating conditions for malloc/contigalloc

r195584 | imp | 2009-07-10 13:09:34 -0600 (Fri, 10 Jul 2009) | 3 lines
Use PTR_* macros for pointers, and not potentially mips64 unsafe
operations.

r195583 | imp | 2009-07-10 13:08:48 -0600 (Fri, 10 Jul 2009) | 2 lines
Use PTR_* macros to deal with pointers.

r195579 | imp | 2009-07-10 13:04:32 -0600 (Fri, 10 Jul 2009) | 2 lines
use ta0-ta3 rather than t4-t7 for n32/n64 goodness.

r195511 | gonzo | 2009-07-09 13:02:17 -0600 (Thu, 09 Jul 2009) | 3 lines
- Ooops, this debug code wasn't supposed to get into
     final commit. My appologises.

r195478 | gonzo | 2009-07-08 16:28:36 -0600 (Wed, 08 Jul 2009) | 5 lines
- Port busdma code from FreeBSD/arm. This is more mature version
    that takes into account all limitation to DMA memory (boundaries,
    alignment) and implements bounce pages.
- Add BUS_DMASYNC_POSTREAD case to bus_dmamap_sync_buf

r195438 | imp | 2009-07-08 00:00:18 -0600 (Wed, 08 Jul 2009) | 2 lines
Turns out this code was right, revert last change.

r195429 | gonzo | 2009-07-07 13:55:09 -0600 (Tue, 07 Jul 2009) | 5 lines
- Move dpcpu initialization to mips_proc0_init. It's
    more appropriate place for it. Besides dpcpu_init
    requires pmap module to be initialized and calling it
    int pmap.c hangs the system

r195399 | imp | 2009-07-06 01:49:24 -0600 (Mon, 06 Jul 2009) | 2 lines
Prefer uintptr_t to int cast here.

r195398 | imp | 2009-07-06 01:48:31 -0600 (Mon, 06 Jul 2009) | 3 lines
Better types for 64-bit compatibility.  Use %p and cast to void * and
prefer uintptr_t to other int-type casts.

r195397 | imp | 2009-07-06 01:47:39 -0600 (Mon, 06 Jul 2009) | 2 lines
No need to force mips32 here.

r195396 | imp | 2009-07-06 01:46:13 -0600 (Mon, 06 Jul 2009) | 3 lines
Pass in the uint64 value, rather than a pointer to it.  that's what
the function expects...

r195395 | imp | 2009-07-06 01:45:02 -0600 (Mon, 06 Jul 2009) | 3 lines
Use ta0 instead of t4 and ta1 instead of t5.  These map to the same
registers on O32 builds, but t4 and t5 don't exist on N32 or N64.

r195394 | imp | 2009-07-06 01:43:50 -0600 (Mon, 06 Jul 2009) | 3 lines
Use better casts for passing the small integer as a pointer here.
Basically, replace int with uintptr_t.

r195393 | imp | 2009-07-06 01:42:54 -0600 (Mon, 06 Jul 2009) | 5 lines
(1) Improvements for SB1.  only allow real memory to be accessed.
(2) make compile n64 by using more-proper casts.
Submitted by: Neelkanth Natu (1)

r195373 | imp | 2009-07-05 09:23:54 -0600 (Sun, 05 Jul 2009) | 5 lines
(1) Use PTR_LA rather than bare la for N64 goodness (it is dla there)
(2) SB1 needs COHERENT policy, not cached for the config register
Submitted by: (2) Neelkanth Natu

r195372 | imp | 2009-07-05 09:22:22 -0600 (Sun, 05 Jul 2009) | 3 lines
use "PTR_LA" in preference to a bare la so it translates to dla on
64-bit ABIs.

r195371 | imp | 2009-07-05 09:21:35 -0600 (Sun, 05 Jul 2009) | 6 lines
Now that we define atomic_{load,store}_64 inline in atomic.h, we don't
need to define them here for the !N64 case.
We now define atomic_readandclear_64 in atomic.h, so no need to repeat
it here.

r195364 | imp | 2009-07-05 09:10:07 -0600 (Sun, 05 Jul 2009) | 5 lines
use %p in preference to 0x%08x for printing register_t values.  Cast
them to void * first.  This neatly solves the "how do I print a
register_t" problem because sizeof(void *) is always the same as
sizeof(register_t), afaik.

r195353 | imp | 2009-07-05 00:46:54 -0600 (Sun, 05 Jul 2009) | 6 lines
Publish PAGE_SHIFT to assembler
# we should likely phase out PGSHIFT
Submitted by: Neelkanth Natu

r195350 | imp | 2009-07-05 00:39:37 -0600 (Sun, 05 Jul 2009) | 7 lines
Switch to ABI agnostic ta0-ta3.  Provide defs for this in the right
places.  Provide n32/n64 register name defintions.  This should have
no effect for the O32 builds that everybody else uses, but should help
make N64 builds possible (lots of other changes are needed for that).
Obtained from: NetBSD (for the regdef.h changes)

r195334 | imp | 2009-07-03 21:22:34 -0600 (Fri, 03 Jul 2009) | 6 lines
Move from using the lame invalid address I chose when trying to get
Octeon going...  Turns out that you get tlb shutdowns with this...
Use PGSHIFT instead of PAGE_SHIFT.
Submitted by: Neelkanth Natu

r195147 | gonzo | 2009-06-28 15:01:00 -0600 (Sun, 28 Jun 2009) | 2 lines
- Replace casuword and casuword32 stubs with proper implementation

r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines
- Add support for handling TLS area address in kernel space.
    From the userland point of view get/set operations are
    performed using sysarch(2) call.

r195127 | gonzo | 2009-06-27 17:01:35 -0600 (Sat, 27 Jun 2009) | 4 lines
- Make cpu_set_upcall_kse conform MIPS ABI. T9 should be
    the same as PC in subroutine entry point
- Preserve interrupt mask

r194938 | gonzo | 2009-06-24 20:15:04 -0600 (Wed, 24 Jun 2009) | 3 lines
- Invalidate cache in pmap_qenter. Fixes corruption of data
    that comes through pipe (may be other bugs)

r194505 | gonzo | 2009-06-19 13:02:40 -0600 (Fri, 19 Jun 2009) | 5 lines
- Keep interrupts mask intact by RESTORE_CPU in MipsKernGenException
    trap() function re-enables interrupts if exception happened with
    interrupts enabled and therefor status register might be modified
    by interrupt filters

r194277 | gonzo | 2009-06-15 20:36:21 -0600 (Mon, 15 Jun 2009) | 2 lines
- Remove debug printfs

r194275 | gonzo | 2009-06-15 19:43:33 -0600 (Mon, 15 Jun 2009) | 2 lines
- Handle KSEG0/KSEG1 addresses for /dev/mem as well. netstat requires it

r193491 | gonzo | 2009-06-05 03:21:03 -0600 (Fri, 05 Jun 2009) | 6 lines
- Status register should be set last in RESTORE_CPU in order
    to prevent race over k0, k1 registers.
- Update interrupts mask in saved status register for
    MipsUserIntr and MipsUserGenException. It might be
    modified by intr filter or ithread.

r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines
- Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default
   we assume that there is no FPU, because majority of SoC does
   not have it.

r192794 | gonzo | 2009-05-26 00:20:50 -0600 (Tue, 26 May 2009) | 5 lines
- Preserve INT_MASK fields in Status register across
    context switches. They should be modified only by
    interrupt setup/teardown and pre_ithread/post_ithread
    functions

r192793 | gonzo | 2009-05-26 00:02:38 -0600 (Tue, 26 May 2009) | 2 lines
- Remove erroneus "break" instruction, it was meant for debug

r192792 | gonzo | 2009-05-26 00:01:17 -0600 (Tue, 26 May 2009) | 2 lines
- Remove now unused NetBSDism intr.h

r192791 | gonzo | 2009-05-25 23:59:05 -0600 (Mon, 25 May 2009) | 7 lines
- Provide proper pre_ithread/post_ithread functions for both
    hard and soft interrupts
- Do not handle masked interrupts
- Do not write Cause register because most bytes are read-only and
    writing the same byte to RW fields are pointless. And in case of
    software interrupt utterly wrong

r192664 | gonzo | 2009-05-23 13:42:23 -0600 (Sat, 23 May 2009) | 4 lines
- cpu_establish_hardintr modifies INT_MASK of Status
    register, so we should use disableintr/restoreintr that
    modifies only IE bit.

r192655 | gonzo | 2009-05-23 12:00:20 -0600 (Sat, 23 May 2009) | 6 lines
- Remove stale comments
- Replace a1 with k1 to while restoring context. a1 was there by mistake,
    interrupts are disabled at this point and it's safe to use k0, k1.
    This code never was reached beacasue current Status register handling
    prevented interrupta from user mode.

r192496 | gonzo | 2009-05-20 17:07:10 -0600 (Wed, 20 May 2009) | 4 lines
- Invalidate caches for respective areain KSEG0 in order
    to prevent further overwriting of KSEG1 data with
    writeback.

r192364 | gonzo | 2009-05-18 20:43:21 -0600 (Mon, 18 May 2009) | 6 lines
- Cleanup ticker initialization code. For some MIPS cpu Counter
    register increments only every second cycle. The only timing
    references for us is Count value. Therefore it's better to convert
    frequencies related to it and use them. Besides cleanup this commit
    fixes twice more then requested sleep interval problem.

r192176 | gonzo | 2009-05-15 20:34:03 -0600 (Fri, 15 May 2009) | 3 lines
- Add informational title for cache info lines to separate
    them from environment variables dump

r192119 | gonzo | 2009-05-14 15:26:07 -0600 (Thu, 14 May 2009) | 3 lines
- Off by one check fix. Check for last address in region
    to fit in KSEG1

r191841 | gonzo | 2009-05-05 20:55:43 -0600 (Tue, 05 May 2009) | 5 lines
- Use index ops in order to avoid TLBMiss exceptions when flushing caches
    on mapping removal
- Writeback all VA for page that is being copied in pmap_copy_page to
    guaranty up-to-date data in SDRAM

r191613 | gonzo | 2009-04-27 20:59:18 -0600 (Mon, 27 Apr 2009) | 4 lines
- When destroying va -> pa mapping writeback all caches or we may endup
    with partial page content in SDRAM
- style(9) fix

r191583 | gonzo | 2009-04-27 12:46:57 -0600 (Mon, 27 Apr 2009) | 5 lines
- Use new spacebus
- Be a bit more verbose on failures
- style(9) fixes
- Use default rid value of 0 instead of MIPS_MEM_RID (0x20)

r191577 | gonzo | 2009-04-27 12:29:59 -0600 (Mon, 27 Apr 2009) | 4 lines
- Use naming convention the same as MIPS spec does: eliminate _sel1 sufix
  and just use selector number. e.g. mips_rd_config_sel1 -> mips_rd_config1
- Add WatchHi/WatchLo accessors for selctors 1..3 (for debug purposes)

r191453 | gonzo | 2009-04-23 23:28:44 -0600 (Thu, 23 Apr 2009) | 4 lines
Fix cut'n'paste code. cfg3 should get the value of selector 3
Spotted by: thompa@

r191452 | gonzo | 2009-04-23 22:18:16 -0600 (Thu, 23 Apr 2009) | 2 lines
- Print supported CPU capabilities during stratup

r191448 | gonzo | 2009-04-23 21:38:51 -0600 (Thu, 23 Apr 2009) | 2 lines
- Fix whitespace to conform style(9)

r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines
- Make mips_bus_space_generic be of type bus_space_tag_t instead of
    struct bus_space and update all relevant places.

r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines
Use FreeBSD/arm approach for handling bus space access: space tag is a pointer
to bus_space structure that defines access methods and hence every bus can
define own accessors. Default space is mips_bus_space_generic. It's a simple
interface to physical memory, values are read with regard to host system
byte order.

r191083 | gonzo | 2009-04-14 19:47:52 -0600 (Tue, 14 Apr 2009) | 4 lines
- Cleanout stale #ifdef'ed chunk of code
- Fix whitespaces
- Explicitly undefine  NEXUS_DEBUG flag

r191079 | gonzo | 2009-04-14 16:53:22 -0600 (Tue, 14 Apr 2009) | 2 lines
- Revert changes accidentally killed by merge operation

------------------------------------------------------------------------
r187512 | gonzo | 2009-01-20 22:49:30 -0700 (Tue, 20 Jan 2009) | 4 lines
- Check if maddr/msize hints are there before setting hinted
    resources to device
- Check for irq hint too

r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines
- Add trampoline stuff for bootloaders that do not support ELF
- Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with
    KERNLOADADDR/TRAMPLOADADDR and clean configs

14 years agoMake make respect the TMPDIR environment variable.
harti [Sun, 10 Jan 2010 20:26:03 +0000 (20:26 +0000)]
Make make respect the TMPDIR environment variable.

PR: bin/115447
Submitted by: Eugene Grosbein

14 years agoFix mis-merge from projects/mips... the diff didn't apply correctly
imp [Sun, 10 Jan 2010 20:22:05 +0000 (20:22 +0000)]
Fix mis-merge from projects/mips...  the diff didn't apply correctly
and I didn't notice until after the commit.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:14:38 +0000 (20:14 +0000)]
Merge from projects/mips to head by hand:

copy over the generic bus space implementation...

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:13:58 +0000 (20:13 +0000)]
Merge from projects/mips to head by hand:

Copy over elf_trampoline.c for crunched kernel support.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:13:05 +0000 (20:13 +0000)]
Merge from projects/mips to head by hand:

Copy over sys_machdep.c

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:12:17 +0000 (20:12 +0000)]
Merge from projects/mips to head by hand:

Copy over inckern.S for crunched kernel support.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:11:10 +0000 (20:11 +0000)]
Merge from projects/mips to head by hand:

r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines
Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the
BSP.  Provide a missing prototype.

r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines
Centralize initialization of pcpu, and set curthread early...

r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines
With this commit our friend RMI will now compile. I have
not tested it and the chances of it running yet are about
ZERO.. but it will now compile. The hard part now begins,
 making it run ;-)

r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines
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.

r194213 | gonzo | 2009-06-14 15:04:54 -0600 (Sun, 14 Jun 2009) | 2 lines
- Fix prototype and implementation of admsw_shutdown

r192790 | gonzo | 2009-05-25 23:52:24 -0600 (Mon, 25 May 2009) | 2 lines
- Provide proper pre_ithread/post_ithread functions

r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines
- Make mips_bus_space_generic be of type bus_space_tag_t instead of
    struct bus_space and update all relevant places.

r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines
Use FreeBSD/arm approach for handling bus space access: space tag is a pointer
to bus_space structure that defines access methods and hence every bus can
define own accessors. Default space is mips_bus_space_generic. It's a simple
interface to physical memory, values are read with regard to host system
byte order.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:09:30 +0000 (20:09 +0000)]
Merge from projects/mips to head by hand:

r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines
Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the
BSP.  Provide a missing prototype.

r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines
Centralize initialization of pcpu, and set curthread early...

r201631 | neel | 2010-01-05 23:42:08 -0700 (Tue, 05 Jan 2010) | 5 lines
Remove all CFE-specific code from locore.S. The CFE entrypoint initialization
is now done in platform-specific code.
Approved by: imp (mentor)

r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines
With this commit our friend RMI will now compile. I have
not tested it and the chances of it running yet are about
ZERO.. but it will now compile. The hard part now begins,
 making it run ;-)

r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines

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.

r196236 | imp | 2009-08-14 19:03:13 -0600 (Fri, 14 Aug 2009) | 3 lines
Fix style error replicated multiple times.  Move to
mips_bus_space_generic for octeon obio impl.

r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines
- Make mips_bus_space_generic be of type bus_space_tag_t instead of
    struct bus_space and update all relevant places.

r187415 | gonzo | 2009-01-18 16:49:02 -0700 (Sun, 18 Jan 2009) | 3 lines
- Move Silicon Backplanes code out to system-wide level (dev/siba) as
    it's going to be used not only for siba5 devices.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:06:14 +0000 (20:06 +0000)]
Merge from projects/mips to head by hand:

r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines
Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the
BSP.  Provide a missing prototype.

r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines
With this commit our friend RMI will now compile. I have
not tested it and the chances of it running yet are about
ZERO.. but it will now compile. The hard part now begins,
 making it run ;-)

r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines
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.

r196836 | gonzo | 2009-09-04 13:02:11 -0600 (Fri, 04 Sep 2009) | 2 lines
- Clean out some XXXMIPS comments that's not relevant now

r196236 | imp | 2009-08-14 19:03:13 -0600 (Fri, 14 Aug 2009) | 3 lines
Fix style error replicated multiple times.  Move to
mips_bus_space_generic for octeon obio impl.

r195496 | imp | 2009-07-09 09:04:52 -0600 (Thu, 09 Jul 2009) | 2 lines
Don't force ISA_MIPS32.

r195495 | imp | 2009-07-09 09:04:24 -0600 (Thu, 09 Jul 2009) | 4 lines
Make the yamon function pointer stuff 64-bit safe.  Make the base
unsigned long, and sign extend the address of the function we're
calling through.

r195494 | imp | 2009-07-09 08:54:09 -0600 (Thu, 09 Jul 2009) | 3 lines
Addresses should be unsigned long.  Make the address constants
unsigned long.

r194929 | gonzo | 2009-06-24 16:42:52 -0600 (Wed, 24 Jun 2009) | 6 lines
- Do not use hardcoded uart speed
- Call mips_timer_early_init before initializing uart in order
    to make DELAY usable for ns8250 driver
Submitted by: Neelkanth Natu

r194212 | gonzo | 2009-06-14 14:54:46 -0600 (Sun, 14 Jun 2009) | 2 lines
- Fix prototypes to make compiler happy

r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines
- Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default
   we assume that there is no FPU, because majority of SoC does
   not have it.

r192788 | gonzo | 2009-05-25 22:51:56 -0600 (Mon, 25 May 2009) | 3 lines
- Provide proper pre_thread/post_ithread functions for GT PCI
    controller.

r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines
- Make mips_bus_space_generic be of type bus_space_tag_t instead of
    struct bus_space and update all relevant places.

r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines
Use FreeBSD/arm approach for handling bus space access: space tag is a pointer
to bus_space structure that defines access methods and hence every bus can
define own accessors. Default space is mips_bus_space_generic. It's a simple
interface to physical memory, values are read with regard to host system
byte order.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 20:03:16 +0000 (20:03 +0000)]
Merge from projects/mips to head by hand:

I think these are the relevant changes, but definitely are a superset
of them.  Software archaeologists are invited to check the branch
itself for the details.

r199695 | imp | 2009-11-23 00:49:50 -0700 (Mon, 23 Nov 2009) | 2 lines
Specify loader script and load address

r198263 | neel | 2009-10-19 22:31:20 -0600 (Mon, 19 Oct 2009) | 7 lines
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)

r194163 | imp | 2009-06-14 00:12:21 -0600 (Sun, 14 Jun 2009) | 2 lines
Kludge: pretend to be ISA_MIPS32 for the moment.

r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines
- Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default
   we assume that there is no FPU, because majority of SoC does
   not have it.

r187461 | gonzo | 2009-01-19 21:24:03 -0700 (Mon, 19 Jan 2009) | 3 lines
- KERNLOADADDR should be defined with makeoption.
    Redboot loads kernel now

r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines
- Add trampoline stuff for bootloaders that do not support ELF
- Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with
    KERNLOADADDR/TRAMPLOADADDR and clean configs

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 19:54:18 +0000 (19:54 +0000)]
Merge from projects/mips to head by hand:

ALCHEMY config file.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 19:53:37 +0000 (19:53 +0000)]
Merge from projects/mips to head by hand:

Merge support for very early alchemy port.  I wouldn't merge this
except I don't want it to get lost when we retire projects/mips.
Should be consiered pre-alpha at this stage.  Also, alchemy is now
owned by rmi, but started out life as a separate processor line, so
I'm leaving it in its own directory rather than try to shoe-horn it
into the unrelated rmi directory.  Its future location is an open
question.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 19:50:24 +0000 (19:50 +0000)]
Merge from projects/mips to head by hand:

r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines
Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the
BSP.  Provide a missing prototype.

r200343 | imp | 2009-12-09 18:44:11 -0700 (Wed, 09 Dec 2009) | 4 lines
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.

r199760 | imp | 2009-11-24 10:15:22 -0700 (Tue, 24 Nov 2009) | 2 lines
Add in Cavium's CID.  Report what the unknown CID is.

r199754 | imp | 2009-11-24 09:32:31 -0700 (Tue, 24 Nov 2009) | 6 lines
Include opt_cputype.h for all .c and .S files referencing TARGET_OCTEON.
Spell ld script name right.

r199599 | imp | 2009-11-20 09:32:26 -0700 (Fri, 20 Nov 2009) | 2 lines
Another kludge for 64-bit bus_addr_t with 32-bit pointers...

r199496 | gonzo | 2009-11-18 15:52:05 -0700 (Wed, 18 Nov 2009) | 5 lines
- 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

r198958 | rrs | 2009-11-05 11:15:47 -0700 (Thu, 05 Nov 2009) | 2 lines
For XLR adds extern for its bus space routines

r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines
With this commit our friend RMI will now compile. I have
not tested it and the chances of it running yet are about
ZERO.. but it will now compile. The hard part now begins,
 making it run ;-)

r198666 | imp | 2009-10-29 18:37:50 -0600 (Thu, 29 Oct 2009) | 2 lines
Add some newer MIPS CO cores.

r198665 | imp | 2009-10-29 18:37:04 -0600 (Thu, 29 Oct 2009) | 4 lines
db_expr_t is really closer to a register_t.
Submitted by: bde@

r198531 | gonzo | 2009-10-27 18:01:20 -0600 (Tue, 27 Oct 2009) | 3 lines
- Remove bunch of declared but not defined cach-related variables
- Add mips_picache_linesize and mips_pdcache_linesize variables

r198354 | neel | 2009-10-21 20:51:31 -0600 (Wed, 21 Oct 2009) | 9 lines
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.

r198310 | gonzo | 2009-10-20 17:13:08 -0600 (Tue, 20 Oct 2009) | 5 lines
- 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.

r198207 | imp | 2009-10-18 08:57:04 -0600 (Sun, 18 Oct 2009) | 2 lines
Undo spamage of last MFC.

r198206 | imp | 2009-10-18 08:56:33 -0600 (Sun, 18 Oct 2009) | 3 lines
_ALIGN has to return u_long, since pointers don't fit into u_int in
64-bit mips.

r198182 | gonzo | 2009-10-16 18:22:07 -0600 (Fri, 16 Oct 2009) | 11 lines
- 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

r198181 | gonzo | 2009-10-16 16:52:18 -0600 (Fri, 16 Oct 2009) | 2 lines
- Get rid of label_t. It came from NetBSD and was used only in one place

r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines

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.

r198066 | gonzo | 2009-10-13 19:43:53 -0600 (Tue, 13 Oct 2009) | 5 lines
- 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

r197685 | gonzo | 2009-10-01 14:05:36 -0600 (Thu, 01 Oct 2009) | 2 lines
- Sync caches properly when dealing with sf_buf

r196215 | imp | 2009-08-14 10:15:18 -0600 (Fri, 14 Aug 2009) | 6 lines
(u_int) is the wrong type here.  Use unsigned long instead, even
though that's only less wrong...

r196199 | imp | 2009-08-13 13:47:13 -0600 (Thu, 13 Aug 2009) | 7 lines
Use unsigned long instead of unsigned for the integer casts here.  The
former works for both ILP32 and LP64 programming models, while the
latter fails LP64.

r196089 | gonzo | 2009-08-09 19:49:59 -0600 (Sun, 09 Aug 2009) | 4 lines
- Make i/d cache size field 32-bit to prevent overflow
Submited by: Neelkanth Natu

r195582 | imp | 2009-07-10 13:07:07 -0600 (Fri, 10 Jul 2009) | 2 lines
fix prototype for MipsEmulateBranch.

r195581 | imp | 2009-07-10 13:06:43 -0600 (Fri, 10 Jul 2009) | 2 lines
Better definitions for a few types for n32/n64.

r195580 | imp | 2009-07-10 13:06:15 -0600 (Fri, 10 Jul 2009) | 5 lines
Fixed aligned macros...

r195478 | gonzo | 2009-07-08 16:28:36 -0600 (Wed, 08 Jul 2009) | 5 lines
- Port busdma code from FreeBSD/arm. This is more mature version
    that takes into account all limitation to DMA memory (boundaries,
    alignment) and implements bounce pages.
- Add BUS_DMASYNC_POSTREAD case to bus_dmamap_sync_buf

r195440 | imp | 2009-07-08 00:01:37 -0600 (Wed, 08 Jul 2009) | 2 lines
Fix atomic_store_64 prototype for 64-bit systems.

r195392 | imp | 2009-07-05 20:27:03 -0600 (Sun, 05 Jul 2009) | 3 lines
The MCOUNT macro isn't going to work in 64-bit mode.  Add a note to
this effect.

r195391 | imp | 2009-07-05 20:22:51 -0600 (Sun, 05 Jul 2009) | 3 lines
Provide a macro for PTR_ADDU as well.  We may need to implement this
differently for N32...  Use PTR_ADDU in DO_AST macro.

r195390 | imp | 2009-07-05 20:22:06 -0600 (Sun, 05 Jul 2009) | 4 lines
Change the addu here to daddu.
addu paranoina prodded by: jmallet@

r195382 | imp | 2009-07-05 15:16:26 -0600 (Sun, 05 Jul 2009) | 5 lines
addu and subu are special.  We need to use daddu and dsubu here to get
proper behavior.
Submitted by: jmallet@

r195370 | imp | 2009-07-05 09:20:16 -0600 (Sun, 05 Jul 2009) | 6 lines
The SB1 has cohernet memory, so add it.
Also, Maxmem is better as a long.
Submitted by: Neelkanth Natu

r195369 | imp | 2009-07-05 09:19:28 -0600 (Sun, 05 Jul 2009) | 4 lines
The SB1 needs a special value for the cache field of the pte.
Submitted by: Neelkanth Natu

r195368 | imp | 2009-07-05 09:18:06 -0600 (Sun, 05 Jul 2009) | 2 lines
compute the areas to save registers in for 64-bit access correctly.

r195367 | imp | 2009-07-05 09:17:11 -0600 (Sun, 05 Jul 2009) | 3 lines
First cut at 64-bit types.  not 100% sure these are all correct for
N32 ABI.

r195366 | imp | 2009-07-05 09:16:27 -0600 (Sun, 05 Jul 2009) | 3 lines
Trim unreferenced goo.  SDRAM likely should be next, but it is still
referenced.

r195365 | imp | 2009-07-05 09:13:24 -0600 (Sun, 05 Jul 2009) | 9 lines

First cut at atomics for 64-bit machines and SMP machines.
# Note: Cavium provided a port that has atomics similar to these, but
# that does a syncw; sync; atomic; sync; syncw where we just do the classic
# mips 'atomic' operation (eg ll; frob; sc).  It is unclear to me why
# the extra is needed.  Since my initial target is one core, I'll defer
# investigation until I bring up multiple cores.  syncw is an octeon specific
# instruction.

r195359 | imp | 2009-07-05 02:14:00 -0600 (Sun, 05 Jul 2009) | 4 lines
Bring in cdefs.h from NetBSD to define ABI goo.
Obtained from: NetBSD

r195358 | imp | 2009-07-05 02:13:19 -0600 (Sun, 05 Jul 2009) | 4 lines
Pull in machine/cdefs.h for the ABI definitions.  Provide a PTR_LA,
ala sgi, and use it in preference to a bare 'la' so that it gets
translated to a 'dla' for the 64-bit pointer ABIs.

r195357 | imp | 2009-07-05 01:01:34 -0600 (Sun, 05 Jul 2009) | 2 lines
Use uintptr_t rather than unsigned here for 64-bit correctness.

r195356 | imp | 2009-07-05 01:00:51 -0600 (Sun, 05 Jul 2009) | 6 lines
Define __ELF_WORD_SIZE appropriately for n64.  Note for N32 I believe
this is correct.  While registers are 64-bit, n32 is a 32-bit ABI and
lives in a 32-bit world (with explicit 64-bit registers, however).
Change an 8, which was 4 + 4 or sizeof(int) + SZREG to be a simple '4
+ SZREG' to reflect the actual offset of the structure in question.

r195355 | imp | 2009-07-05 00:56:51 -0600 (Sun, 05 Jul 2009) | 7 lines
(1) Use uintptr_t in preference to unsigned.  The latter isn't right for
64-bit case, while the former is.
(2) include a SB1 specific coherency mapping
Submitted by: Neelkanth Nath (2)

r195352 | imp | 2009-07-05 00:44:37 -0600 (Sun, 05 Jul 2009) | 3 lines
db_expr_t should be a intptr_t, not an int.  These expressions can be
addresses or numbers, and that's a intptr_t if I ever saw one.

r195351 | imp | 2009-07-05 00:43:01 -0600 (Sun, 05 Jul 2009) | 4 lines
Define COP0_SYNC for SB1 CPU.
Submitted by: Neelkanth Natu

r195350 | imp | 2009-07-05 00:39:37 -0600 (Sun, 05 Jul 2009) | 7 lines
Switch to ABI agnostic ta0-ta3.  Provide defs for this in the right
places.  Provide n32/n64 register name defintions.  This should have
no effect for the O32 builds that everybody else uses, but should help
make N64 builds possible (lots of other changes are needed for that).
Obtained from: NetBSD (for the regdef.h changes)

r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines
- Add support for handling TLS area address in kernel space.
    From the userland point of view get/set operations are
    performed using sysarch(2) call.

r195076 | gonzo | 2009-06-26 13:54:06 -0600 (Fri, 26 Jun 2009) | 2 lines
- Add guards to ensure that these files are included only once

r194469 | gonzo | 2009-06-18 22:43:49 -0600 (Thu, 18 Jun 2009) | 16 lines
- Mark temp variable as "earlyclobber" in assembler inline in
    atomic_fetchadd_32.  Without it gcc would use it as input
    register for v and sometimes generate following code for
    function call like atomic_fetchadd_32(&(fp)->f_count, -1):
801238b4:       2402ffff        li      v0,-1
801238b8:       c2230018        ll      v1,24(s1)
801238bc:       00431021        addu    v0,v0,v1
801238c0:       e2220018        sc      v0,24(s1)
801238c4:       1040fffc        beqz    v0,801238b8 <dupfdopen+0x2e8>
801238c8:       00000000        nop
   Which is definitly wrong because if sc fails v0 is set to 0
   and previous value of -1 is overriden hence whole operation
   turns to bogus

r194164 | imp | 2009-06-14 00:14:25 -0600 (Sun, 14 Jun 2009) | 3 lines
bye bye.  This is no longer referenced, but much code from it will
resurface for a bus-space implementation.

r194160 | imp | 2009-06-14 00:10:36 -0600 (Sun, 14 Jun 2009) | 3 lines
Cavium-specific goo is no longer necessary here.  Of course, I now
have to write a bus space for cavium, but that shouldn't be too hard.

r194157 | imp | 2009-06-14 00:01:46 -0600 (Sun, 14 Jun 2009) | 2 lines
Move this to a more approrpiate plae.

r194156 | imp | 2009-06-13 23:29:13 -0600 (Sat, 13 Jun 2009) | 2 lines
Bring this in from the cavium port.

r193487 | gonzo | 2009-06-05 02:37:11 -0600 (Fri, 05 Jun 2009) | 2 lines
- Use restoreintr instead of enableint while accessing pcpu in DO_AST

r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines
- Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default
   we assume that there is no FPU, because majority of SoC does
   not have it.

r192817 | gonzo | 2009-05-26 10:35:05 -0600 (Tue, 26 May 2009) | 2 lines
- Add type cast for atomic_cmpset_acq_ptr arguments

r192792 | gonzo | 2009-05-26 00:01:17 -0600 (Tue, 26 May 2009) | 2 lines
- Remove now unused NetBSDism intr.h

r192177 | gonzo | 2009-05-15 20:39:13 -0600 (Fri, 15 May 2009) | 4 lines
- Add MIPS_IS_KSEG0_ADDR, MIPS_IS_KSEG1_ADDR and MIPS_IS_VALID_PTR
    macroses thet check if address belongs to KSEG0, KSEG1 or both
    of them respectively.

r191589 | gonzo | 2009-04-27 13:18:55 -0600 (Mon, 27 Apr 2009) | 3 lines
- Cast argument to proper type in order to avoid warnings like
    "shift value is too large for given type"

r191577 | gonzo | 2009-04-27 12:29:59 -0600 (Mon, 27 Apr 2009) | 4 lines
- Use naming convention the same as MIPS spec does: eliminate _sel1 sufix
  and just use selector number. e.g. mips_rd_config_sel1 -> mips_rd_config1
- Add WatchHi/WatchLo accessors for selctors 1..3 (for debug purposes)

r191451 | gonzo | 2009-04-23 22:17:21 -0600 (Thu, 23 Apr 2009) | 4 lines
- Define accessor functions for CP0 Config(16) register selects 1, 2, 3.
    Content of these registers is defined in MIPS spec and can be used
    for obtaining info about CPU capabilities.

r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines
- Make mips_bus_space_generic be of type bus_space_tag_t instead of
    struct bus_space and update all relevant places.

r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines
Use FreeBSD/arm approach for handling bus space access: space tag is a pointer
to bus_space structure that defines access methods and hence every bus can
define own accessors. Default space is mips_bus_space_generic. It's a simple
interface to physical memory, values are read with regard to host system
byte order.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 19:44:08 +0000 (19:44 +0000)]
Merge from projects/mips to head by hand:

Merge in rmi's fls64 code...

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 19:43:11 +0000 (19:43 +0000)]
Merge from projects/mips to head by hand:

Copy over new cdefs.h..

14 years agoRemove files that were deleted in the projects/mips branch.
imp [Sun, 10 Jan 2010 19:42:19 +0000 (19:42 +0000)]
Remove files that were deleted in the projects/mips branch.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 19:39:08 +0000 (19:39 +0000)]
Merge from projects/mips to head by hand:

r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines
Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the
BSP.  Provide a missing prototype.

r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines
Centralize initialization of pcpu, and set curthread early...

r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines
With this commit our friend RMI will now compile. I have
not tested it and the chances of it running yet are about
ZERO.. but it will now compile. The hard part now begins,
 making it run ;-)

r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines
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.

r194216 | gonzo | 2009-06-14 15:16:23 -0600 (Sun, 14 Jun 2009) | 2 lines
- Fix prototypes to make compiler happy

r194215 | gonzo | 2009-06-14 15:16:04 -0600 (Sun, 14 Jun 2009) | 2 lines
- Get rid of mask_fn and fix pre_filter/post_filter functions' prototypes

r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines
- Make mips_bus_space_generic be of type bus_space_tag_t instead of
    struct bus_space and update all relevant places.

r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines
Use FreeBSD/arm approach for handling bus space access: space tag is a pointer
to bus_space structure that defines access methods and hence every bus can
define own accessors. Default space is mips_bus_space_generic. It's a simple
interface to physical memory, values are read with regard to host system
byte order.

14 years agoPrint error messages to stderr.
thompsa [Sun, 10 Jan 2010 19:21:23 +0000 (19:21 +0000)]
Print error messages to stderr.

Submitted by: Hans Petter Selasky

14 years agoReset variable fields in case the transfer is opened again
thompsa [Sun, 10 Jan 2010 19:18:49 +0000 (19:18 +0000)]
Reset variable fields in case the transfer is opened again

Submitted by: Hans Petter Selasky

14 years agoChange the second usb example for ulpt to one describing libusb which would be
thompsa [Sun, 10 Jan 2010 18:53:15 +0000 (18:53 +0000)]
Change the second usb example for ulpt to one describing libusb which would be
more common.

14 years agoWhen setting up MSIs with a filter ensure that the event queue interrupt
marius [Sun, 10 Jan 2010 18:39:29 +0000 (18:39 +0000)]
When setting up MSIs with a filter ensure that the event queue interrupt
is cleared as it might have triggered before and given we supply NULL
as ic_clear, inthand_add() won't do this for us in this case.

14 years agoAdd INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms.
imp [Sun, 10 Jan 2010 17:44:22 +0000 (17:44 +0000)]
Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms.

# This is the resolution of removing it from DEFAULTS...

MFC after: 5 days

14 years agoWhile AHCI specification tells that multi-vector MSI doesn't use global IS
mav [Sun, 10 Jan 2010 16:05:05 +0000 (16:05 +0000)]
While AHCI specification tells that multi-vector MSI doesn't use global IS
register, nVidia chipsets have different oppinion, requiring every interrupt
to be acknowledged there.

While there, add interrupt descriptions in multi-vector MSI mode.

14 years agoNow that everything required to properly support Sun Fire V215/V245
marius [Sun, 10 Jan 2010 16:04:55 +0000 (16:04 +0000)]
Now that everything required to properly support Sun Fire V215/V245
is in place (r201932 and r202003 were the last parts missing), hook
up fire(4).

14 years agoAdd epic(4), a driver for the front panel LEDs in Sun Fire V215/V245.
marius [Sun, 10 Jan 2010 15:44:48 +0000 (15:44 +0000)]
Add epic(4), a driver for the front panel LEDs in Sun Fire V215/V245.
It's named after the driver doing the same job in OpenSolaris.

14 years ago- According to OpenSolaris it's sufficient to align the MSIs of a
marius [Sun, 10 Jan 2010 15:12:15 +0000 (15:12 +0000)]
- According to OpenSolaris it's sufficient to align the MSIs of a
  device in the table based on the count rather than the maxcount.
  Also the previous code didn't work properly as it would have been
  necessary to reserve the entire maxcount range in order keep later
  requests from filling the spare MSIs between count and maxcount,
  which would be complicated to unreserve in fire_release_msi().
- For MSIs with filters rather than handlers only don't clear the
  event queue interrupt via fire_intr_clear() since given that these
  are executed directly would clear it while we're still processing
  the event queue, which in turn would lead to lost MSIs.
- Save one level of indentation in fire_setup_intr().
- Correct a bug in fire_teardown_intr() which prevented it from
  correctly restoring the MSI in the resource, causing allocation of
  a resource representing an MSI to fail after the first pass when
  repeatedly loading and unloading a driver module.

14 years agoDon't panic on attach if we can't allocate ifp
gavin [Sun, 10 Jan 2010 14:48:42 +0000 (14:48 +0000)]
Don't panic on attach if we can't allocate ifp

Approved by: ed (mentor)
MFC after: 2 weeks

14 years agoGive a less silly response to a silly request.
cperciva [Sun, 10 Jan 2010 14:30:30 +0000 (14:30 +0000)]
Give a less silly response to a silly request.

Prior to this commit, fread/fwrite calls with size * nmemb > SIZE_MAX
were handled by reading or writing (size_t)(size * nmemb) bytes; for
example, on 32-bit platforms, fread(ptr, 641, 6700417, f) would read 1
byte and indicate that the requested 6700417 blocks had been read.

This commit adds a check for such integer overflows, and treats them as
if an overly large request was passed to read/write; i.e., it sets errno
to EINVAL, sets the error indicator on the file, and returns a short
object count (0, to be specific).

The overflow check involves an integer division, so as a performance
optimization we check first to see if both size and nmemb are less than
2^16; if they are, no overflow is possible and we avoid the division.
We assume here that size_t is at least 32 bits; this appears to be true
on all platforms FreeBSD supports.

Although this commit fixes an integer overflow, it is not likely to have
any security implications, since any program which would be affected by
this bug fix is quite clearly already very confused.

Reviewed by: kib
MFC after: 1 month

14 years agoCorrect a typo.
bz [Sun, 10 Jan 2010 12:03:53 +0000 (12:03 +0000)]
Correct a typo.

MFC after: 5 days

14 years agoReport which of IXP700 legacy ATA channels is SATA.
mav [Sun, 10 Jan 2010 11:02:10 +0000 (11:02 +0000)]
Report which of IXP700 legacy ATA channels is SATA.

14 years agoMake a chain be a list of queues, and make threads waiting
davidxu [Sun, 10 Jan 2010 09:31:57 +0000 (09:31 +0000)]
Make a chain be a list of queues, and make threads waiting
for same key coalesce to same queue, this makes searching
path shorter and improves performance.
Also fix comments about shared PI-mutex.

14 years ago- Report SATA in legacy emulation mode still as SATA.
mav [Sun, 10 Jan 2010 09:20:56 +0000 (09:20 +0000)]
- Report SATA in legacy emulation mode still as SATA.
- Make ATA XPT able to handle such case.

14 years agoApply patches directly to sources. Their effect is as follows:
ru [Sun, 10 Jan 2010 08:02:07 +0000 (08:02 +0000)]
Apply patches directly to sources.  Their effect is as follows:

- Make one-true-awk respect locale's collating order in [a-z]
  bracket expressions, until a more complete fix (like handing
  BREs) is ready.

- Don't require a space between -[fv] and its argument.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:46:19 +0000 (05:46 +0000)]
Merge from projects/mips to head by hand:

r200593 | imp | 2009-12-15 16:22:19 -0700 (Tue, 15 Dec 2009) | 4 lines
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.

r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines
With this commit our friend RMI will now compile. I have
not tested it and the chances of it running yet are about
ZERO.. but it will now compile. The hard part now begins,
making it run ;-)

r198311 | neel | 2009-10-20 18:56:13 -0600 (Tue, 20 Oct 2009) | 8 lines
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.

r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines
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.

r196315 | imp | 2009-08-17 06:37:06 -0600 (Mon, 17 Aug 2009) | 5 lines
Like qdivrem, remove the other quad_t support stuff from 64-bit
kernels.

r195331 | imp | 2009-07-03 20:49:17 -0600 (Fri, 03 Jul 2009) | 4 lines
Merge in new cfe environment passing of kenv for swarm/sibyte boards.
Submitted by:   Neelkanth Natu

r195732 | gonzo | 2009-07-16 20:28:27 -0600 (Thu, 16 Jul 2009) | 2 lines
- Add DES and Blowfish implementstions to build. Required by crypto(4)

r195437 | imp | 2009-07-07 23:57:58 -0600 (Tue, 07 Jul 2009) | 2 lines
The kernel isn't quite ready for this to be optional...

r195401 | imp | 2009-07-06 02:16:25 -0600 (Mon, 06 Jul 2009) | 4 lines
Only build qdivrem on 32-bit ISA...

r195331 | imp | 2009-07-03 20:49:17 -0600 (Fri, 03 Jul 2009) | 4 lines
Merge in new cfe environment passing of kenv for swarm/sibyte boards.
Submitted by:   Neelkanth Natu

r195165 | gonzo | 2009-06-29 11:36:47 -0600 (Mon, 29 Jun 2009) | 2 lines
- add sys_machdep.c to build

r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines
- Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default
   we assume that there is no FPU, because majority of SoC does
   not have it.

r191085 | gonzo | 2009-04-14 20:41:35 -0600 (Tue, 14 Apr 2009) | 2 lines
- mainbus.c seems not to be used, disconnect it from build

r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines
Use FreeBSD/arm approach for handling bus space access: space tag is a pointer
to bus_space structure that defines access methods and hence every bus can
define own accessors. Default space is mips_bus_space_generic. It's a simple
interface to physical memory, values are read with regard to host system
byte order.

r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines
- Add trampoline stuff for bootloaders that do not support ELF
- Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with
    KERNLOADADDR/TRAMPLOADADDR and clean configs

r187415 | gonzo | 2009-01-18 16:49:02 -0700 (Sun, 18 Jan 2009) | 3 lines
- Move Silicon Backplanes code out to system-wide level (dev/siba) as
    it's going to be used not only for siba5 devices.

14 years agoMerge r187418 from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:36:38 +0000 (05:36 +0000)]
Merge r187418 from projects/mips to head by hand:

r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines
- Add trampoline stuff for bootloaders that do not support ELF
- Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with
    KERNLOADADDR/TRAMPLOADADDR and clean configs

14 years agoMerge r187428, r191079, r195533, r195669, r197004, r197012 and r197015
imp [Sun, 10 Jan 2010 05:34:46 +0000 (05:34 +0000)]
Merge r187428, r191079, r195533, r195669, r197004, r197012 and r197015
from projects/mips to head by hand:

r197015 | imp | 2009-09-08 21:59:46 -0600 (Tue, 08 Sep 2009) | 2 lines
Prefer PTR_LA over a naked la to work with 64-bits..

r197012 | imp | 2009-09-08 21:46:04 -0600 (Tue, 08 Sep 2009) | 3 lines
Use proper set of flags to build the tramp.  this gets 64-bit almost
building and lets me debug the 'almost' :)

r197004 | imp | 2009-09-08 18:47:12 -0600 (Tue, 08 Sep 2009) | 2 lines
Use ${LDSCRIPT_NAME} in preference to ldscript.$M.

r195669 | gonzo | 2009-07-13 17:03:44 -0600 (Mon, 13 Jul 2009) | 3 lines
- Remove -mno-dsp from CFLAGS. MIPS DSP ASE is off by default
  now (as it should be)

r195533 | imp | 2009-07-10 01:21:26 -0600 (Fri, 10 Jul 2009) | 4 lines
Add in the emulation selection when linking...  We're still not 100%
of the way there, but we're better with it.  hack.so build now, but
we die when we try to link it in.

r191079 | gonzo | 2009-04-14 16:53:22 -0600 (Tue, 14 Apr 2009) | 2 lines
- Revert changes accidentally killed by merge operation

r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines
- Add trampoline stuff for bootloaders that do not support ELF
- Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with
    KERNLOADADDR/TRAMPLOADADDR and clean configs

14 years agoMerge r192355 from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:28:36 +0000 (05:28 +0000)]
Merge r192355 from projects/mips to head by hand:

r192355 | gonzo | 2009-05-18 17:20:56 -0600 (Mon, 18 May 2009) | 2 lines
- Add support for MX25Lxxx SPI flash (readonly atm)

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:16:55 +0000 (05:16 +0000)]
Merge from projects/mips to head by hand:

merge register definitions for mx25l flash.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:15:46 +0000 (05:15 +0000)]
Merge from projects/mips to head by hand:

Merge support for MX25L spi flash.

14 years agomirror copy in head for less insane diffing...
imp [Sun, 10 Jan 2010 05:14:15 +0000 (05:14 +0000)]
mirror copy in head for less insane diffing...

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:11:27 +0000 (05:11 +0000)]
Merge from projects/mips to head by hand:

Copy sys/dev/rmi to sys/mips/rmi/dev [sic].  For devices that are on
only one SoC, or family of SoC, we place them under sys/<vendor>/dev.
I'll fix the build problems this causes as best I can since rmi kernel
require external toolchains due to lack of support for rmi op-codes in
the ancient binutils we have in the tree.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:07:29 +0000 (05:07 +0000)]
Merge from projects/mips to head by hand:

Merge the siba bus device.  This was moved from mips to dev because
siba bus can be in other architectures, like ARM.

14 years agoThese files have been moved on the branch. Delete them here before
imp [Sun, 10 Jan 2010 05:05:33 +0000 (05:05 +0000)]
These files have been moved on the branch.  Delete them here before
copying them from the branch.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 05:01:47 +0000 (05:01 +0000)]
Merge from projects/mips to head by hand:

Placeholder for ptrace machine specific stuff...  This will likely be
used to report CP2 or CP3 registers on those CPUs that have them...

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 04:49:13 +0000 (04:49 +0000)]
Merge from projects/mips to head by hand:

loader script for octeon1 in n32 abi mode.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 04:48:26 +0000 (04:48 +0000)]
Merge from projects/mips to head by hand:

Special linker file for octeon1 in pseudo-32-bit mode.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 03:47:12 +0000 (03:47 +0000)]
Merge from projects/mips to head by hand:

mips64 ld script for the kernel.

14 years agoMerge from projects/mips to head by hand:
imp [Sun, 10 Jan 2010 03:46:08 +0000 (03:46 +0000)]
Merge from projects/mips to head by hand:

special ld script for 64-bit octeon link.

14 years agoMirror copy in /head..
imp [Sun, 10 Jan 2010 03:28:25 +0000 (03:28 +0000)]
Mirror copy in /head..

14 years agoRemove debugging printf(). There's no need to print the image
marcel [Sun, 10 Jan 2010 00:14:04 +0000 (00:14 +0000)]
Remove debugging printf(). There's no need to print the image
base address anymore.

14 years agoUse uname -m [1] and rename BUILD_ARCH to XMACHINE[2].
bz [Sat, 9 Jan 2010 23:37:29 +0000 (23:37 +0000)]
Use uname -m [1] and rename BUILD_ARCH to XMACHINE[2].

Submitted by: nyan[1], imp[2]
MFC after: 27 days
X-MFC with: r201815

14 years agoUse the correct types to store uids and gids in the credential cache.
brooks [Sat, 9 Jan 2010 23:36:51 +0000 (23:36 +0000)]
Use the correct types to store uids and gids in the credential cache.

14 years agoRegen diffs.
ru [Sat, 9 Jan 2010 23:34:45 +0000 (23:34 +0000)]
Regen diffs.

14 years agoImprove the comment about CMGROUP_MAX.
brooks [Sat, 9 Jan 2010 23:24:49 +0000 (23:24 +0000)]
Improve the comment about CMGROUP_MAX.

MFC after: 3 days

14 years agoUpdate the comment on printing group membership to reflect that fact
brooks [Sat, 9 Jan 2010 23:23:52 +0000 (23:23 +0000)]
Update the comment on printing group membership to reflect that fact
that each groupt the process is a member of is printed rather than an
entry for each group the user could be a member of.

MFC after: 3 days

14 years agoCorrect the explination text for the kern.ngroups. It reflects the
brooks [Sat, 9 Jan 2010 23:22:31 +0000 (23:22 +0000)]
Correct the explination text for the kern.ngroups.  It reflects the
number of supplemental groups, not the total number of groups.

MFC after: 3 days

14 years agoUpdate to a 26-Nov-2009 release.
ru [Sat, 9 Jan 2010 23:19:01 +0000 (23:19 +0000)]
Update to a 26-Nov-2009 release.

14 years agoRemove file system support based on the simple file system protocol
marcel [Sat, 9 Jan 2010 22:54:29 +0000 (22:54 +0000)]
Remove file system support based on the simple file system protocol
as this only allows us to access file systems that EFI knows about.
With a loader that can only use EFI-supported file systems, we're
forced to put /boot on the EFI system partition. This is suboptimal
in the following ways:
1.  With /boot a symlink to /efi/boot, mergemaster complains about
    the mismatch and there's no quick solution.
2.  The EFI loader can only boot a single version of FreeBSD. There's
    no way to install multiple versions of FreeBSD and select one
    at the loader prompt.
3.  ZFS maintains /boot/zfs/zpool.cache and with /boot a symlink we
    end up with the file on a MSDOS file system. ZFS does not have
    proper handling of file systems that are under Giant.

Implement a disk device based on the block I/O protocol instead and
pull in file system code from libstand. The disk devices are really
the partitions that EFI knows about.

This change is backward compatible.

MFC after: 1 week

14 years agoClean up import.
ru [Sat, 9 Jan 2010 22:47:40 +0000 (22:47 +0000)]
Clean up import.

14 years agoImplement the fo_readdir method. This does not support long
marcel [Sat, 9 Jan 2010 22:33:34 +0000 (22:33 +0000)]
Implement the fo_readdir method. This does not support long
file names.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

14 years agoLong ago, in r120654, the rounding of KERNend and physfree in locore
alc [Sat, 9 Jan 2010 22:09:10 +0000 (22:09 +0000)]
Long ago, in r120654, the rounding of KERNend and physfree in locore
was changed from a small page boundary to a large page boundary.  As
a consequence pmap_kmem_choose() became a pointless waste of address
space.  Eliminate it.

14 years ago- Add code allowing a network device to only be open and closed once
marius [Sat, 9 Jan 2010 21:23:39 +0000 (21:23 +0000)]
- Add code allowing a network device to only be open and closed once
  by keeping it opened after the first open and closing it via the
  cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to
  avoid the open-close-dance on every file access which with firmware
  that for example performs an auto-negotiation on every open causes
  netbooting to take horribly long. Basically the behavior with this
  knob enabled resembles the one employed between r60506 and r177108
  (and for sparc64 also again since r182919) with the addition that
  the network device now is closed eventually before entering the
  kernel and before rebooting. Actually I think this should be the
  desired MI behavior, however the U-Boot loader actually requires
  net_close() to be called after every transaction in order for some
  local shutdown operations to be performed (and which I think thus
  will break on concurrent opens, i.e. when netdev_opens is > 1, like
  the loader does at least for disks when LOADER_GZIP_SUPPORT is
  enabled).
- Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially
  increased netdev_opens for sparc64 in order to keep the network
  device opened forever, as at least some firmware versions require
  the network device to be closed eventually before entering the
  kernel or otherwise will DMA received packets to stale memory.
  The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be
  set as well for the same reasons.

14 years agoUpdate files to remove when MK_BLUETOOTH=no.
antoine [Sat, 9 Jan 2010 19:52:42 +0000 (19:52 +0000)]
Update files to remove when MK_BLUETOOTH=no.

14 years agoThe client type rule allows DHCP, implicitly. Since DHCPv6 uses
ume [Sat, 9 Jan 2010 19:16:27 +0000 (19:16 +0000)]
The client type rule allows DHCP, implicitly.  Since DHCPv6 uses
link-local address unlike with DHCP, we need one more rule to allow
the DHCPv6.

Reported by: David Horn <dhorn2000__at__gmail.com>

14 years agoAdd files to remove when MK_AUTHPF=no.
antoine [Sat, 9 Jan 2010 19:13:56 +0000 (19:13 +0000)]
Add files to remove when MK_AUTHPF=no.

14 years agoAdd files to remove when MK_ATM=no.
antoine [Sat, 9 Jan 2010 19:12:33 +0000 (19:12 +0000)]
Add files to remove when MK_ATM=no.

14 years agoAdd files to remove when MK_AT=no.
antoine [Sat, 9 Jan 2010 19:09:16 +0000 (19:09 +0000)]
Add files to remove when MK_AT=no.

14 years agoAdd files to remove when MK_APM=no.
antoine [Sat, 9 Jan 2010 19:07:04 +0000 (19:07 +0000)]
Add files to remove when MK_APM=no.

14 years agoAdd files to remove when MK_AMD=no.
antoine [Sat, 9 Jan 2010 19:04:38 +0000 (19:04 +0000)]
Add files to remove when MK_AMD=no.

14 years agoSend link state change control messages to "orphans" hook as well.
fjoe [Sat, 9 Jan 2010 19:03:48 +0000 (19:03 +0000)]
Send link state change control messages to "orphans" hook as well.

MFC after: 1 week

14 years agoAdd files to remove when MK_ACCT=no.
antoine [Sat, 9 Jan 2010 19:02:33 +0000 (19:02 +0000)]
Add files to remove when MK_ACCT=no.

14 years agoAdd missing library dependency.
antoine [Sat, 9 Jan 2010 18:59:03 +0000 (18:59 +0000)]
Add missing library dependency.

MFC after: 1 month

14 years agoMerge from projects/mips to head by hand:
imp [Sat, 9 Jan 2010 18:59:03 +0000 (18:59 +0000)]
Merge from projects/mips to head by hand:

Copy the support files for the Octeon 1 CPU from sys/mips/octeon1 on
the projects/mips side to sys/mips/cavium on the head side to conform
to the other vendor code.  This code was contributed by Cavium to the
project and forward ported by Warner Losh, with some additional code
from Randal Stewart.

# I'll fix the building problems the move creates in a future commit.

14 years agolibusb20 was renamed libusb several months ago.
antoine [Sat, 9 Jan 2010 18:55:29 +0000 (18:55 +0000)]
libusb20 was renamed libusb several months ago.

MFC after: 1 month

14 years agoFix a typo.
antoine [Sat, 9 Jan 2010 18:53:03 +0000 (18:53 +0000)]
Fix a typo.

MFC after: 1 month