Commit Graph

585 Commits

Author SHA1 Message Date
kan
c9b2659ee8 Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoletes
the former and  __builtin_va_start was present in all GCC version 3.1 and
later.
2006-09-21 01:37:02 +00:00
imp
6af2f13b58 MFp4: first cut at getting I2C transfers working (generically). I'm
unsure if this driver correctly implements all the start/stop junk
right (but it did or didn't before I made this commit).
2006-09-07 21:53:28 +00:00
imp
423b53ad2f MFp4: berndt pointed me at an errata that shows that the stat register
offsets were originally documented incorrectly.  This fixes that.  It
shouldn't affect anything other than error stat reporting.
2006-09-07 21:50:01 +00:00
cognet
56796490ea Remove dead code, already defined in sys/cdef.h
Spotted out by:	bde
2006-08-30 11:45:07 +00:00
cognet
192d7d2aa6 Use ENTRY_NP for alternate entry points instead of ENTRY to avoid calling
mcount twice when profiling.

Spotted out by:	bde
2006-08-30 11:44:37 +00:00
cognet
8397e9dcdc Use ENTRY instead of ALTENTRY, it doesn't exist on arm. 2006-08-29 23:53:34 +00:00
cognet
ecf44c474e Ooops m->md.pvh_attrs can't be used to know if the page is writeable, because
it only remembers if the page is modified or referenced.

Bad review from:	cognet
2006-08-28 21:43:34 +00:00
cognet
fa893a6f9c Relocate the vector page for AT91, to work around bugs with the LOW_VECTOR
code.
2006-08-28 20:05:00 +00:00
davidxu
87b5aa08ee Implement casuword32, compare and set user integer, thank Marcel Moolenarr
who wrote the IA64 version of casuword32.
2006-08-28 02:28:15 +00:00
cognet
15bd8c41bf Fill in dump_avail[] before pmap_boostrap() is called so that
ARM_USE_SMALL_ALLOC work.
2006-08-27 13:23:51 +00:00
alc
72ff1a9186 Eliminate unused definitions. (They came from NetBSD.)
Discussed with: cognet, grehan, marcel
2006-08-25 23:51:11 +00:00
cognet
53e0a06a26 Explicitely set the "allocbuffer" field to NULL when creating a new dmamap. 2006-08-25 15:10:45 +00:00
cognet
3748f87bf1 Do not create dma maps with bus_dmamap_create, as we call
bus_dmamem_alloc later which will overwrite the value, leading to a small
memory leak.
2006-08-25 13:38:42 +00:00
cognet
d4600e67df Finally bring it support for the i80219 XScale processor.
Submitted by:	Max M. Boyarov <m.boyarov bsd by>
2006-08-24 23:51:28 +00:00
cognet
ccd457af25 Use ELFDATA2MSB if we're building big endian.
Noticed by:	Oleksandr Tymoshenko <gonzo freebsd org>
2006-08-24 23:00:03 +00:00
imp
95a426fdc6 add comment about why we include opt_global.h 2006-08-15 18:11:25 +00:00
cognet
d7e3bf9763 Ooops we need to include <machine/vmparam.h> to get the definition of
KERNBASE and VM_MAXUSER_ADDRESS.
Remove the useless include of opt_global.h, as noticed by netchild@ (the one
in arm/elf_trampoline.c is legit, because this file is compiled outside the
kernel, and doesn't use the standard CFLAGS).
2006-08-15 16:43:07 +00:00
imp
8d1199edcd Hook into the watchdog device, if present. Also, turn off the
watchdog timer stuff when we boot because the boot blocks are turning
it on...
2006-08-09 20:58:55 +00:00
cognet
2d628bb4d9 Rewrite ARM_USE_SMALL_ALLOC so that instead of the current behavior, it maps
whole the physical memory, cached, using 1MB section mappings. This reduces
the address space available for user processes a bit, but given the amount of
memory a typical arm machine has, it is not (yet) a big issue.
It then provides a uma_small_alloc() that works as it does for architectures
which have a direct mapping.
2006-08-08 20:59:38 +00:00
kevlo
ae60705942 Remove a bogus i = 0.
Approved by: cognet
2006-08-08 01:18:18 +00:00
alc
a152234cf9 Complete the transition from pmap_page_protect() to pmap_remove_write().
Originally, I had adopted sparc64's name, pmap_clear_write(), for the
function that is now pmap_remove_write().  However, this function is more
like pmap_remove_all() than like pmap_clear_modify() or
pmap_clear_reference(), hence, the name change.

The higher-level rationale behind this change is described in
src/sys/amd64/amd64/pmap.c revision 1.567.  The short version is that I'm
trying to clean up and fix our support for execute access.

Reviewed by: marcel@ (ia64)
2006-08-01 19:06:06 +00:00
jhb
3a707d012d Retire SYF_ARGMASK and remove both SYF_MPSAFE and SYF_ARGMASK. sy_narg is
now back to just being an argument count.
2006-07-28 20:22:58 +00:00
jhb
c62c38439f Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used to
mark system calls as being MPSAFE:
- Stop conditionally acquiring Giant around system call invocations.
- Remove all of the 'M' prefixes from the master system call files.
- Remove support for the 'M' prefix from the script that generates the
  syscall-related files from the master system call files.
- Don't explicitly set SYF_MPSAFE when registering nfssvc.
2006-07-28 19:05:28 +00:00
jhb
12302c47d0 Unify the checking for lock misbehavior in the various syscall()
implementations and adjust some of the checks while I'm here:
- Add a new check to make sure we don't return from a syscall in a critical
  section.
- Add a new explicit check before userret() to make sure we don't return
  with any locks held.  The advantage here is that we can include the
  syscall number and name in syscall() whereas that info is not available
  in userret().
- Drop the mtx_assert()'s of sched_lock and Giant.  They are replaced by
  the more general checks just added.

MFC after:	2 weeks
2006-07-27 22:32:30 +00:00
cognet
eb22761b8a Define BYTE_MSF if we're compiling a big endian kernel, so that DDB can
correctly disassemble instructions on big endian.
2006-07-27 11:41:37 +00:00
cognet
405961b2ae Use virtual_avail instead of freemempos as the starting point of the available
physical memory, as the vm uses the memory between freemempos and
virtual_avail.

MFC After:	3 days
2006-07-25 23:07:35 +00:00
kevlo
9600c80b61 Cleanup.
Approved by: cognet
2006-07-25 01:08:41 +00:00
alc
51bab356f5 Implement pmap_clear_write().
Discussed with: cognet@
2006-07-20 23:26:22 +00:00
cognet
83a16c4049 Fix ALT_BREAK_TO_DEBUGGER on the AT91 :
The core uart code expects the receive method to actually puts the
characters read into its buffers. For AT91, it's done in the ipend routine,
so also check if we have the alternate break sequence here.

MFC after:	3 days
2006-07-20 21:03:43 +00:00
cognet
c601d0f319 Make sure we use REDUCE32 on the result of do_cksum(), as in_cksum_skip()
expects this. If we do not, this could result in wrong checksums.

MFC after:	1 day
2006-07-18 00:07:05 +00:00
cognet
34956b2cd0 If we can't defrag a packet, re-queue it instead of dropping it. 2006-07-17 21:36:08 +00:00
cognet
68d3bbc684 #if => #ifdef 2006-07-17 21:20:00 +00:00
cognet
010b2aa1be at91_spi won't compile without spibus, so add it. 2006-07-17 21:17:20 +00:00
cognet
8b02dff467 Oops bring back code that shouldn't have been removed by the previous
commit.
2006-07-15 23:15:31 +00:00
cognet
f4ecac7c4e Make sure that if uma_small_alloc() gets called recursively, we just give up
and call kmem_malloc(), to avoid a deadlock.
2006-07-15 23:01:54 +00:00
cognet
1d520bd714 Add a comment explaining why the OHCI mapping has been commented out. 2006-07-15 00:09:53 +00:00
imp
29ab994ef0 MFp4: this now depends on new spi bus stuff 2006-07-14 22:41:54 +00:00
imp
a3607b2b33 MFp4: tweaks 2006-07-14 22:40:24 +00:00
imp
60a615aa4e MFp4: elevate quality of slow clock a little 2006-07-14 22:31:12 +00:00
imp
a96b0fc43f MFp4: paren police 2006-07-14 22:30:44 +00:00
imp
1248744935 MFp4:
Introduce framework to configure the multiplexed pins on boot.

	Since the USART supprots RS-485 multidrop mode, it allows the
	TX pins to float.  However, for RS-232 operations, we don't
	want these pins to float.  Instead, they should be pulled up
	to avoid mismatches.  Linux does something similar when it
	configures the TX lines.  This implies that we also allow the
	RX lines to float rather than be in the state they are left in
	by the boot loader.  Since they are input pins, I think that
	this is the right thing to do.

	Plus minor for our board.
2006-07-14 22:22:57 +00:00
imp
de4939a282 MFp4:
Fix typo in RTC_CALR_MK.
2006-07-14 22:06:01 +00:00
imp
05cb2db736 The TSC board uses a 16MHz base clock for the AT91RM9200, while the Kwikbyte
board uses a 10MHz base clock.  Cope with this difference.
2006-07-14 22:01:51 +00:00
imp
3b9505ced7 Implement the set_time function. Rather pointless with this RTC, as it
resets when the core resets, but there may be some use for it...
2006-07-14 21:37:19 +00:00
imp
d9d2d73de5 MF p4:
Adapt to forthcoming spi framework.  The ioctls for SPI commands and such
belong in the higher level driver.
2006-07-14 21:35:59 +00:00
imp
6dccb75673 Be sure to flush the cache after a partial read on timeout. Expand
comments about timeouts.  Fix a style nit.  Sometimes small messages
were getting corrupted.
2006-07-14 21:33:04 +00:00
imp
e5fffb8574 Move some of the common parameters into the std. files for this platform.
Also migrate from MD disk to NFS boot.
2006-07-14 15:20:31 +00:00
cognet
2b9f045c18 Remove prototype for the undefined function counterhandler().
Submitted by:	kevlo
2006-07-14 13:37:47 +00:00
cognet
15c9b6e9df Add remote GDB bits for arm. 2006-07-14 00:50:51 +00:00
jhb
a72b0bcd7f Simplify the pager support in DDB. Allowing different db commands to
install custom pager functions didn't actually happen in practice (they
all just used the simple pager and passed in a local quit pointer).  So,
just hardcode the simple pager as the only pager and make it set a global
db_pager_quit flag that db commands can check when the user hits 'q' (or a
suitable variant) at the pager prompt.  Also, now that it's easy to do so,
enable paging by default for all ddb commands.  Any command that wishes to
honor the quit flag can do so by checking db_pager_quit.  Note that the
pager can also be effectively disabled by setting $lines to 0.

Other fixes:
- 'show idt' on i386 and pc98 now actually checks the quit flag and
  terminates early.
- 'show intr' now actually checks the quit flag and terminates early.
2006-07-12 21:22:44 +00:00