Commit Graph

303 Commits

Author SHA1 Message Date
njl
2958530007 Finish the job of sorting all includes and fix the build by including
malloc.h before proc.h on sparc64.  Noticed by das@

Compiled on:	alpha, amd64, i386, pc98, sparc64
2005-02-06 01:55:08 +00:00
njl
cd2bcf063b Sort includes a little so that bus.h comes before cpu.h (for device_t). 2005-02-04 06:58:09 +00:00
njl
54a88fdbee Add an implementation of cpu_est_clockrate(9). This function estimates the
current clock frequency for the given CPU id in units of Hz.
2005-02-04 05:32:56 +00:00
njl
2579b2e0bf Sort functions. 2005-02-01 06:36:27 +00:00
cognet
5638709391 Make sure we can boot both with and without MMU enabled. 2005-01-23 22:08:31 +00:00
cognet
fe5f83713c Define bus_dmamap_load_buffer before bus_dmamap_load to make gcc happy. 2005-01-23 22:07:33 +00:00
cognet
37230f7c69 Fix compile for !KTR. 2005-01-23 21:39:23 +00:00
cognet
28e246b289 Remove references to non-existing symbols DO_corb and got_mmu.
While I'm there, remove dead code.
2005-01-20 22:23:26 +00:00
cognet
2a66290389 Fix compile for __ARMEB__. 2005-01-19 16:22:20 +00:00
cognet
5608e326b2 MFpowerpc: Work around the problem of returning a 32 bits value from
__syscall() on a 32 bits big-endian arch.

Spotted out by:	grehan
2005-01-19 00:37:03 +00:00
cognet
ab7ed627f8 Start to support the big endian case as well. 2005-01-18 15:51:50 +00:00
cognet
5dcea2459e Add a new sysctl, hw.sevenseg.freq, to control the update frequency. 2005-01-16 13:18:52 +00:00
cognet
3f738b3942 Erm, don't forget to store the mbuf in the dmamap in bus_dmamap_load_mbuf_sg(),
so that bus_dmamap_sync() knows what to invalidate. This makes em(4) work again.
While I'm there, remove the unused "first" variable.
2005-01-16 13:15:16 +00:00
cognet
7c9c98e639 Add support for KTR_BUSDMA. 2005-01-15 19:42:28 +00:00
cognet
897fdcefd3 Add the prototype for bus_dmamap_load_mbuf_sg().
Spotted out by:	scottl
2005-01-15 19:31:08 +00:00
cognet
072c519386 MFi386: add bus_dmamap_load_mbuf_sg(). 2005-01-15 19:07:23 +00:00
cognet
5435311167 Add the 7 seg display. 2005-01-15 18:55:40 +00:00
cognet
6365349c89 Add support for the IQ31244 7 seg display.
Obtained from:	NetBSD
2005-01-15 18:55:22 +00:00
cognet
4955cf8c26 Start the license statement with /*- 2005-01-15 18:38:10 +00:00
cognet
4251591c3f Use device_set_desc(). 2005-01-15 16:57:00 +00:00
cognet
f34de841db Add the i80321 watchdog. 2005-01-15 16:56:22 +00:00
cognet
d96d350b95 Add a driver for the i80321 watchdog.
Obtained from:		NetBSD
2005-01-15 16:54:35 +00:00
cognet
14d3ee495d Add support for ptrace() and gdb breakpoints. 2005-01-10 22:43:16 +00:00
cognet
83fcc96139 Don't assume pmap_update() will cpwait for us, pmap_update will disappear soon. 2005-01-10 22:41:08 +00:00
imp
77267e277f Start all license statements with /*- 2005-01-05 21:58:49 +00:00
alc
a618275b13 Modify pmap_enter_quick() so that it expects the page queues to be locked
on entry and it assumes the responsibility for releasing the page queues
lock if it must sleep.

Remove a bogus comment from pmap_enter_quick().

Using the first change, modify vm_map_pmap_enter() so that the page queues
lock is acquired and released once, rather than each time that a page
is mapped.
2004-12-23 20:16:11 +00:00
cognet
a90b1e3656 - The IQ80321 has a jumper which changes the PCI device id from 4 to 8 for the
GigE controller, so handle this.
- Use the outbound window 0 if the PCI mem requested is in its range, instead
of inconditionally use the outbound window 1.
This should be enough to get FreeBSD/arm to work on the IQ80321 board as well.

Reported and tested by: Jia-Shiun Li <jiashiun at gmail dot com>
2004-12-21 11:36:09 +00:00
cognet
b231943e0e Update the StrongArm port to match the current code.
- Implement arm_mask_irqs and arm_unmask_irqs
- Provide the available physical address range after pmap_bootstrap allocated
things, instead or before, or bad things happen.
2004-12-18 17:58:49 +00:00
cognet
5b61dc111e Make sure gcc doesn't generate something such as swp r3, r4, [r3] for __swp,
as it has unpredictable results.
2004-12-18 17:43:01 +00:00
alc
ede2fb9751 In the common case, pmap_enter_quick() completes without sleeping.
In such cases, the busying of the page and the unlocking of the
containing object by vm_map_pmap_enter() and vm_fault_prefault() is
unnecessary overhead.  To eliminate this overhead, this change
modifies pmap_enter_quick() so that it expects the object to be locked
on entry and it assumes the responsibility for busying the page and
unlocking the object if it must sleep.  Note: alpha, amd64, i386 and
ia64 are the only implementations optimized by this change; arm,
powerpc, and sparc64 still conservatively busy the page and unlock the
object within every pmap_enter_quick() call.

Additionally, this change is the first case where we synchronize
access to the page's PG_BUSY flag and busy field using the containing
object's lock rather than the global page queues lock.  (Modifications
to the page's PG_BUSY flag and busy field have asserted both locks for
several weeks, enabling an incremental transition.)
2004-12-15 19:55:05 +00:00
cognet
7ce4a54e10 Enable interrupts once the active ones have been masked. 2004-12-14 18:57:21 +00:00
cognet
c372644159 Update the sp after popping the regs.
This is a good candidate for the golden pointy hat awards.
2004-12-14 18:45:05 +00:00
cognet
8e56111fcd Save a few more cycles in cpu_switch() and cpu_throw(). 2004-12-12 19:21:58 +00:00
cognet
f047a2aa01 Fix style. 2004-12-11 23:56:03 +00:00
cognet
3c819126da Add entries to trace syscalls with KTR. 2004-12-11 23:54:03 +00:00
cognet
975196bf45 Fix compilation with INVARIANTS. 2004-12-11 14:46:52 +00:00
cognet
01b59b6929 s/RETEQ/RETeq/. 2004-12-10 16:49:08 +00:00
cognet
988b22e8cb Include <sys/signalvar.h> for trapsignal(). 2004-12-07 17:39:42 +00:00
cognet
49745b3e73 Make sure to map the whole kernel into 1MB pages. Try to use the remaining
memory for things such as the kernel stack.
2004-12-05 22:48:04 +00:00
cognet
1286f9fc64 Reactivate the use of the minidata cache. 2004-12-05 22:47:25 +00:00
cognet
d852f75fe8 Do not change the page directory and do not flush the TLB when switching to
a kernel thread.
2004-12-05 22:46:59 +00:00
cognet
8c5a104a40 Remove an unused field from the struct pv_entry.
While I'm there, fix style.
2004-12-05 22:46:30 +00:00
cognet
df8773eb4e Include <sys/signalvar.h> for trapsignal(). 2004-12-02 23:31:48 +00:00
das
130bed6547 Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-27 06:51:39 +00:00
cognet
61c101ec0d Enable interrupts as soon as the pending interrupts have been masked. 2004-11-23 16:31:16 +00:00
cognet
8519448b1b Use ns8250. 2004-11-23 16:30:50 +00:00
cognet
f90c20620f Cleanup. 2004-11-21 19:41:27 +00:00
cognet
9990b1a0eb Set the frame pointer to 0 in fork_trampoline(). 2004-11-21 19:33:47 +00:00
cognet
22b168ab24 Implement breakpoints and single stepping on arm.
Obtained from:	NetBSD
2004-11-21 18:11:39 +00:00
cognet
feeee6f8b5 Remove useless code. 2004-11-20 16:52:30 +00:00
cognet
75354c7e52 Implement enough to be able to enter and leave DDB. 2004-11-20 16:52:10 +00:00
cognet
c2bbd5fdeb Get the kernel stack right now that the u-area is gone. 2004-11-20 16:51:32 +00:00
das
dbdcb7be99 Remove UAREA_PAGES and USPACE definitions. The definitions of
USPACE_SVC_STACK_TOP, USPACE_SVC_STACK_BOTTOM, USPACE_UNDEF_STACK_TOP,
and USPACE_UNDEF_STACK_BOTTOM look wrong to me, so I'm leaving them
alone.

Reviewed by:	arch@
2004-11-20 02:31:37 +00:00
das
799ea28b61 Remove some references to U area here while trying not to break
anything.  Someone with ARM hardware could do a lot more to untangle
this code.

Reviewed by:	arch@
2004-11-20 02:31:23 +00:00
das
901a681d75 Remove references to U area and garbage collect includes.
Reviewed by:	arch@
2004-11-20 02:30:59 +00:00
das
8375566745 U areas are going away, so don't allocate one for process 0.
Reviewed by:	arch@
2004-11-20 02:29:25 +00:00
cognet
d28f205253 Increase cnt.v_syscall and cnt.v_trap when needed. 2004-11-20 00:55:57 +00:00
cognet
1158e30208 Move KERNPHYSADDR and KERNVIRTADDR from std.i80321 to std.iq31244.
Use the correct KERNPHYSADDR.
2004-11-18 00:05:09 +00:00
cognet
7369f4070b Simplify a bit bus_dmamap_load_buffer by removing the "first" parameter, use
nseg == -1 instead.

Obtained from:	NetBSD
2004-11-16 00:57:44 +00:00
cognet
06281152f5 MFi386:
- inlina bus_dmamap_load_buffer
- Directly pass the pmap to bus_dmamap_load_buffer, instead of the struct thread
2004-11-15 23:59:28 +00:00
cognet
c49c604bed Remove debugging printf. 2004-11-13 15:12:26 +00:00
cognet
341a002b6b Don't forget to clear the PG_WRITEABLE flag when appropriate. 2004-11-13 14:54:31 +00:00
cognet
35680a9d48 Use uma_prealloc() on the l2table_zone to prevent a LOR at startup. 2004-11-13 14:41:27 +00:00
cognet
ac7d3d8927 Implement interrupt counting, so that vmstat -i work. 2004-11-12 21:49:05 +00:00
cognet
725eca69bd Don't forget to include opt_vm.h. 2004-11-10 22:11:08 +00:00
cognet
1cf3104ff5 Convert the IQ31244 code to use ARM32_NEW_VM_LAYOUT. 2004-11-10 22:09:39 +00:00
cognet
bcb8f16584 Invalidate the data cache in pmap_qremove() instead of in pmap_kenter(),
and in pmap_enter_quick() instead of pmap_enter().
2004-11-10 21:46:04 +00:00
trhodes
e849b9601d Remove __P here too.
Ok'ed by:	cognet
2004-11-10 01:33:42 +00:00
cognet
7e3e230230 Use the RET macro. 2004-11-09 16:47:47 +00:00
cognet
601293a498 Import a RET macro, that will use bx if the arch supports it.
Obtained from:	NetBSD
2004-11-09 16:45:55 +00:00
alc
279c442e7b Introduce two new options, "CPU private" and "no wait", to sf_buf_alloc().
Change the spelling of the "catch" option to be consistent with the new
options.  Implement the "no wait" option.  An implementation of the "CPU
private" for i386 will be committed at a later date.
2004-11-08 00:43:46 +00:00
cognet
e9b8703c85 Add device mem in config files. 2004-11-07 23:02:15 +00:00
cognet
103e95586e Import md bits for mem(4) on arm.
While I'm there, cleanup a bit pmap.h.
2004-11-07 23:01:36 +00:00
cognet
ce94b57ab1 Remove useless code. 2004-11-07 16:51:33 +00:00
cognet
78386f3ec2 Disable interrupts for atomic_cmpset_32, this one is just not atomic.
Don't export it to userland.
2004-11-05 23:48:12 +00:00
cognet
108b7172d7 Copy the syscall args in a tmp variable instead of directly using the
trapframe, as it can be modified in the syscall.
Call thread_user_enter() when appropriate.
2004-11-05 19:57:10 +00:00
cognet
f326fc1a81 Save a few cycles in context switch.
Update comments to reflect reality.
2004-11-05 19:54:13 +00:00
cognet
ecc55fe51d If we're still running at the physical address, jump to the virtual address
instead before calling initarm().
This removes the need to map virtual == physical in initarm().
2004-11-05 19:52:55 +00:00
cognet
fe20a8f9f4 Be more verbose about cache capacities. 2004-11-05 19:51:23 +00:00
cognet
bb1d95fb39 Implement casuptr. 2004-11-05 19:50:48 +00:00
cognet
ae291dcae9 Call pmap_pte_init_arm9 instead of pmap_pte_init_generic if
ARM9_CACHE_WRITE_THROUGH is defined.
2004-11-05 19:48:40 +00:00
cognet
1ff7126d41 In cpu_critical_fork_exit(), make sure to set td_md.md_critnest so that
interrupts will be enabled.

Spotted out by:	jhb
2004-11-05 18:29:45 +00:00
cognet
65c874982c Protect the function declarations with #ifdef _KERNEL. 2004-11-04 19:20:54 +00:00
cognet
f877e8fb34 Directly use __pcpu for PCPU_* instead of pcpup. 2004-11-04 19:19:44 +00:00
cognet
b06553ff94 Decrease KSTACK_PAGES and UAREA_PAGES. 2004-11-04 19:19:21 +00:00
cognet
a9cde5c028 Use interrupts_disable() and interrupts_restore() as intr_disable() and
intr_restore() instead of re-implement it.
2004-11-04 19:18:50 +00:00
cognet
174862f7bb Don't barf if no CPU type is defined while compiling kernel modules. 2004-11-04 19:16:31 +00:00
cognet
ad6f843dc2 Implement get_cyclecount(). 2004-11-04 19:15:43 +00:00
cognet
4603da4464 Try to implement atomic operations using swp, instead of disabling interrupts. 2004-11-04 19:14:50 +00:00
cognet
827366c155 Use casts to enforce the return type of bswap16() and bswap32(). 2004-11-04 19:07:28 +00:00
cognet
fcb45007e6 Implement cpu_thread_siginfo() and set_mcontext().
Nuke getframe(), and choose which stack to use directly in sendsig().
2004-11-04 19:04:30 +00:00
cognet
47de763a09 Implement cpu_set_upcall and cpu_set_upcall_kse.
Calculate td_frame and td_pcb the right way in cpu_thread_setup.
2004-11-04 18:59:02 +00:00
cognet
95719dc362 Get kernel modules to work. 2004-11-04 18:48:52 +00:00
andre
8b6661b126 Reduce annoying SCSI probing delay from 15 to 5 seconds in all GENRIC kernels.
Discussed on:	-current
2004-11-02 20:57:20 +00:00
jhb
a9860ec891 - Change the ddb paging "support" to use a variable (db_lines_per_page) to
control the number of lines per page rather than a constant.  The variable
  can be examined and changed in ddb as '$lines'.  Setting the variable to
  0 will effectively turn off paging.
- Change db_putchar() to force out pending whitespace before outputting
  newlines and carriage returns so that one can rub out content on the
  current line via '\r     \r' type strings.
- Change the simple pager to rub out the --More-- prompt explicitly when
  the routine exits.
- Add some aliases to the simple pager to make it more compatible with
  more(1): 'e' and 'j' do a single line.  'd' does half a page, and
  'f' does a full page.

MFC after:	1 month
Inspired by:	kris
2004-11-01 22:15:15 +00:00
cognet
4e18db9429 We want to ignore BUS_DMASYNC_POSTWRITE, not BUS_DMASYNC_POSTREAD.
Spotted out by:	mux
Pointy hat to:	cognet
2004-10-21 11:59:33 +00:00
cognet
672cff6bce Use a default MD_ROOT_SIZE of 65535. 2004-10-11 14:42:06 +00:00
cognet
6de2036711 Use MD_ROOT_SIZE, instead of our own macro. 2004-10-11 14:41:38 +00:00
cognet
d3c9c2ab1a Add optimized version of the bswap macroes for constants if __OPTIMIZED__ is
defined.
2004-10-01 16:55:59 +00:00
cognet
898ea0c226 There's no need to turn on MALLOC_PROFILE by default. 2004-10-01 16:51:37 +00:00