Commit Graph

468 Commits

Author SHA1 Message Date
Olivier Houchard
477d836c4d MFother arches :
date: 2006/04/12 04:22:50;  author: alc;  state: Exp;  lines: +14 -41
Retire pmap_track_modified().  We no longer need it because we do not
create managed mappings within the clean submap.  To prevent regressions,
add assertions blocking the creation of managed mappings within the clean
submap.

Reviewed by: tegge
2006-04-22 22:51:32 +00:00
Warner Losh
018dc558f6 When returning a resource that we've allocated with rman_reserve_resource,
go ahead and set the rid for that resource.
2006-04-20 04:12:02 +00:00
Olivier Houchard
eb66942114 We need to adjust the bus handle if the resource is SYS_RES_MEMORY, NOT
SYS_RES_IOPORT.
2006-04-13 15:07:59 +00:00
Olivier Houchard
b8986f5675 Disable/enable fiqs as well as irqs. 2006-04-13 14:25:28 +00:00
Olivier Houchard
123a5345c1 MFp4: Use CPU_CONTROL_ROUNDROBIN for arm9, it seems to give marginally
better performances.
2006-04-09 23:07:31 +00:00
Olivier Houchard
43293c6937 Not only disable/enable interrupts, do it for FIQs as well, when needed. 2006-04-09 20:16:47 +00:00
Olivier Houchard
174329aff2 MFp4: Don't write-back the PTEs if they are mapped write-through, this was
apparently only needed because skyeye has bugs in its cache emulation.
2006-04-09 20:03:03 +00:00
Olivier Houchard
602c85541e MFp4: Catchup with recent UART changes. 2006-04-06 20:47:54 +00:00
Olivier Houchard
1ac232117c Add a new option, XSCALE_DISABLE_CCNT, to not use the xscale ccnt as a
timecounter (because gxemul doesn't emule it yet).
2006-04-06 17:11:08 +00:00
Warner Losh
5ec7256cb1 Add debug writes in error cases that, in theory, should never happen 2006-04-06 04:32:29 +00:00
Warner Losh
723c740a55 Connect twi to the FreeBSD iicbus infrastructure. 2006-04-06 04:31:19 +00:00
Warner Losh
222c969f16 Pull in numerous fixes from myself and cognet. With these fixes the
KB9202 eval board is finally stable with a nfs root.
2006-04-06 04:30:23 +00:00
Warner Losh
f535b19502 Remove unused bit definitions.
Minor style cleanup while I'm here.
2006-04-06 04:29:24 +00:00
Warner Losh
b2e16e9338 Optimize the TX side of the part by using the PDC to move bytes out to
the wire.  This increases the speed considerably.  Start to put
infrastructure in place to do RX side, but that requires more study
before it can be done.
2006-04-06 04:27:19 +00:00
Peter Wemm
b9eee07e36 Remove the unused sva and eva arguments from pmap_remove_pages(). 2006-04-03 21:16:10 +00:00
Olivier Houchard
ac2bfec884 Implement pmap_object_init_pt() the way it is on sparc64/alpha, by doing
nothing except asserting the vm object is locked, and a device object,
instead of a useless printf.
2006-03-26 22:03:43 +00:00
Warner Losh
e40dc9a60d Skeleton support for the SSC device, which implements I2S interfaces,
amoung others.
2006-03-24 07:42:33 +00:00
Warner Losh
60a5289836 Skeleton PIO support. 2006-03-24 07:39:29 +00:00
Warner Losh
c44fe487c2 Add the sekelton of support for the Power Management Controller. 2006-03-24 07:37:56 +00:00
Warner Losh
72ec44a573 Add rtc to files.at91 2006-03-24 07:36:23 +00:00
Warner Losh
74e4c374f2 Add RTC support. This may be of dubious value since the RTC is reset
to 1998 every reboot.
2006-03-24 07:35:30 +00:00
Olivier Houchard
5207a211b3 MFp4: Don't force single-user now we can go multi-user.
Call cninit() only after the pagetable has been set, as locore.S won't
map the system device for us anymore.
2006-03-22 22:31:31 +00:00
Olivier Houchard
e9f654ba90 MFp4: More special casing of when vector_page == 0x00000000 :
catch attempts to write to vector_page earlier in pmap_fault_fixup(),
and deny it.
2006-03-22 22:11:10 +00:00
Olivier Houchard
6f4640d092 MFp4: If we're mapping the vector page (this will happen if we didn't
relocate it), do not attempt to call pmap_vac_me_harder() on the page.
At this point m will be NULL, and we know we won't have any cache
issues with this page.
2006-03-22 21:23:27 +00:00
Olivier Houchard
a1de0396bd MFp4: teach the KB920x bits how to know where the ELF trampoline puts the
strtab and the symtab.
2006-03-22 21:16:51 +00:00
Olivier Houchard
eea877f42d MFp4: Handle break interrupts (it seems to only work for USART, not DBGU). 2006-03-22 21:16:09 +00:00
Warner Losh
36dd3fdf9e MFp4:
Add bus attachment for the ohci device on this chip.  The bus and hub
are detected correctly, but the children devices aren't detected
correctly for reasons unknown.
2006-03-18 01:45:29 +00:00
Warner Losh
1b0561a15d Add ohci controller mapping. 2006-03-18 01:43:54 +00:00
Warner Losh
2dc738a640 MFp4:
o update TODO list
o Better use of busdma
o mark RX dtors as COHERENT.  This helps performance a lot by not requiring
  so many EXPENSIVE cache flushes.  The cost of accessing it non-cached
  is much smaller.
o Copy data from Rx buffers to make IP header 4 byte aligned.
o CRC length included in reported length, so cope
o Don't free TX buffer twice
o Manage TX buffers better.
o Enable just the interrupts we want.
o Manage OACTIVE better

# Some of these done by cognet
# These changes let us get to # via NFS root.
2006-03-18 01:43:25 +00:00
Warner Losh
a9e7d93f31 MFP4:
Gratuitously sort alphabetically.
2006-03-18 01:39:23 +00:00
Warner Losh
f54a134552 MFP4:
GC and fix definitions.

# some of this may have been done by cognet
2006-03-18 01:38:25 +00:00
Warner Losh
f3de38a73d MFp4:
o Add memory barrier to bus space
o Allow for up to 3 IRQs per device
o Move to table driven population of children devices.
o Add support for usb ohci memory mapped controller resource allocation.
o Clean up a bunch of extra writes to disable interrupts that are now
  done elsewhere.
o Force all system interrupt handlers be fast.  We get deadlock if they
  aren't.
2006-03-18 01:35:49 +00:00
Warner Losh
5bcedfaa73 MFp4:
o Disable all interrupts that the ST can generate until we have an ISR
  to service them.
o Correct clock calculation to make DELAY the right length...

Submitted by: cognet (#2)
2006-03-18 01:30:31 +00:00
Olivier Houchard
c0e239dead MFp4: Forget the asm inlined version of in_cksum_hdr(). It doesn't work if
the pointer is unaligned, and it just doesn't worth it.
2006-03-09 23:33:59 +00:00
Olivier Houchard
5adfa73930 Use BUS_DMA_COHERENT. 2006-03-02 14:06:38 +00:00
Olivier Houchard
db45b073f7 Use 8 * sizeof(int) instead of hardcoding 32, for the unlikely case this
code ever get used on a plateform where sizeof(int) != 4.

Suggested by:	jmg
2006-03-02 00:37:40 +00:00
Olivier Houchard
2456c0ea88 Try to honor BUS_DMA_COHERENT : if the flag is set, normally allocate memory
with malloc() or contigmalloc() as usual, but try to re-map the allocated
memory into a VA outside the KVA, non-cached, thus making the calls to
bus_dmamap_sync() for these buffers useless.
2006-03-01 23:04:25 +00:00
Olivier Houchard
4cb8778630 Use a better panic message than lol. 2006-03-01 20:43:51 +00:00
Olivier Houchard
12ce8511ba Make sure we decrement p_lock before leaving prefetch_abort_handler() 2006-03-01 20:42:47 +00:00
Olivier Houchard
c2d5c96b29 userret() now only takes 2 parameters. 2006-03-01 18:33:45 +00:00
Olivier Houchard
493be2ca17 Get this to compile with the recent UART changes. 2006-02-27 23:19:13 +00:00
John Baldwin
06ad42b2f7 Close some races between procfs/ptrace and exit(2):
- Reorder the events in exit(2) slightly so that we trigger the S_EXIT
  stop event earlier.  After we have signalled that, we set P_WEXIT and
  then wait for any processes with a hold on the vmspace via PHOLD to
  release it.  PHOLD now KASSERT()'s that P_WEXIT is clear when it is
  invoked, and PRELE now does a wakeup if P_WEXIT is set and p_lock drops
  to zero.
- Change proc_rwmem() to require that the processing read from has its
  vmspace held via PHOLD by the caller and get rid of all the junk to
  screw around with the vmspace reference count as we no longer need it.
- In ptrace() and pseudofs(), treat a process with P_WEXIT set as if it
  doesn't exist.
- Only do one PHOLD in kern_ptrace() now, and do it earlier so it covers
  FIX_SSTEP() (since on alpha at least this can end up calling proc_rwmem()
  to clear an earlier single-step simualted via a breakpoint).  We only
  do one to avoid races.  Also, by making the EINVAL error for unknown
  requests be part of the default: case in the switch, the various
  switch cases can now just break out to return which removes a _lot_ of
  duplicated PRELE and proc unlocks, etc.  Also, it fixes at least one bug
  where a LWP ptrace command could return EINVAL with the proc lock still
  held.
- Changed the locking for ptrace_single_step(), ptrace_set_pc(), and
  ptrace_clear_single_step() to always be called with the proc lock
  held (it was a mixed bag previously).  Alpha and arm have to drop
  the lock while the mess around with breakpoints, but other archs
  avoid extra lock release/acquires in ptrace().  I did have to fix a
  couple of other consumers in kern_kse and a few other places to
  hold the proc lock and PHOLD.

Tested by:	ps (1 mostly, but some bits of 2-4 as well)
MFC after:	1 week
2006-02-22 18:57:50 +00:00
Warner Losh
2f415ac34d These files apply to all the atmel parts that freebsd is going to run on,
so name them more generically.  If we do support the MMU-less ARM7 parts,
then we'll need to, at that time, expand the files we have.
2006-02-17 22:33:13 +00:00
Warner Losh
77017e63bb This file was obsolete when committed. Catchup and delete it. 2006-02-17 22:23:36 +00:00
Warner Losh
e1fa2d9556 Use the correct address for the ohci device. 2006-02-11 03:58:07 +00:00
Poul-Henning Kamp
eb2da9a51f Simplify system time accounting for profiling.
Rename struct thread's td_sticks to td_pticks, we will need the
other name for more appropriately named use shortly.  Reduce it
from uint64_t to u_int.

Clear td_pticks whenever we enter the kernel instead of recording
its value as reference for userret().  Use the absolute value of
td->pticks in userret() and eliminate third argument.
2006-02-08 08:09:17 +00:00
Olivier Houchard
e56b7f20a0 Set the MAC address after we just read it at attach time, as it seems needed. 2006-02-07 21:31:13 +00:00
Olivier Houchard
9bfe35c80d Set m_pkthdr.len and m_pkthdr.rcvif. 2006-02-07 20:48:52 +00:00
Warner Losh
37a395c110 This file isn't GENERIC, so change the header 2006-02-07 18:45:54 +00:00
Warner Losh
e51680a229 Rather than pull in all the phy, just pull in the lxt phy that we need
for this board (although our lxtphy driver isn't claiming it, but that's
a different problem).

This saves 57k in this kernel.
2006-02-07 18:43:46 +00:00