Commit Graph

596 Commits

Author SHA1 Message Date
jake
c1838df603 Made the prototypes for pmap_kenter and pmap_kremove MD. These functions
are machine dependent because they are not required to update the tlb when
mappings are added or removed, and doing so is machine dependent.
In addition, an implementation may require that pages mapped with pmap_kenter
have a backing vm_page_t, which is not necessarily true of all physical
pages, and so may choose to pass the vm_page_t to pmap_kenter instead of the
physical address in order to make this requirement clear.
2003-03-16 04:16:03 +00:00
mux
15b2d31e35 Grab Giant around calls to contigmalloc() and contigfree() so
that drivers converted to be MP safe don't have to deal with it.
2003-03-13 17:18:48 +00:00
jhb
e4bcd25517 Replace calls to WITNESS_SLEEP() and witness_list() with equivalent calls
to WITNESS_WARN().
2003-03-04 21:03:05 +00:00
grehan
e58d97a666 Simplify ofw_pci_fixup(). It doesn't need to be recursive, since the
bridge code already handles IRQ adjustment on the far side of a bridge.

Reviewed by:  benno
2003-03-03 12:05:06 +00:00
benno
367f245ca9 These files are no longer used. They have been replaced with similarly named
.S files.
2003-02-28 03:35:42 +00:00
grehan
0b19632a93 Register typo and incorrect 32-bit constant load in previous commit.
Resulted in AST delivery not working.
2003-02-26 14:41:39 +00:00
mux
186c547c81 Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.
It was bogusly set to 64 * 1024 or 128 * 1024 because it was
bogusly reused in the BUS_DMAMAP_NSEGS definition.
2003-02-26 02:16:06 +00:00
mux
541937cf73 Cleanup of the d_mmap_t interface.
- Get rid of the useless atop() / pmap_phys_address() detour.  The
  device mmap handlers must now give back the physical address
  without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
  int.  Now we properly pass a vm_offset_t * and expect it to be
  filled by the mmap handler when the mapping was successful.  The
  mmap handler must now return 0 when successful, any other value
  is considered as an error.  Previously, returning -1 was the only
  way to fail.  This change thus accidentally fixes some devices
  which were bogusly returning errno constants which would have been
  considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
  no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with:		alc, phk, jake
Reviewed by:		peter
Compile-tested on:	LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on:	i386
2003-02-25 03:21:22 +00:00
grehan
47fb20d3f1 Catch up with ATAng changes 2003-02-24 03:12:30 +00:00
grehan
2e05ab323f Doh. Forgot to remove _KERNEL version. 2003-02-23 13:47:44 +00:00
grehan
9e23e010b0 Expose powerpc_mb() to user-space. Currently needed for atomic.h users,
this may go away in the future.
2003-02-22 22:58:13 +00:00
grehan
eeab657973 Adjust IRQ count for psim's OpenPIC model - it seems to be
off by 1.
2003-02-20 01:59:42 +00:00
grehan
24a98368c5 Catch up to latest KSE changes 2003-02-20 01:57:49 +00:00
imp
cf874b345d Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
julian
af55753a06 Move a bunch of flags from the KSE to the thread.
I was in two minds as to where to put them in the first case..
I should have listenned to the other mind.

Submitted by:	 parts by davidxu@
Reviewed by:	jeff@ mini@
2003-02-17 09:55:10 +00:00
jeff
590a39e29b - Split the struct kse into struct upcall and struct kse. struct kse will
soon be visible only to schedulers.  This greatly simplifies much the
   KSE code.

Submitted by:	davidxu
2003-02-17 05:14:26 +00:00
jeff
aa384c931f - Move ke_sticks, ke_iticks, ke_uticks, ke_uu, ke_su, and ke_iu back into
the proc.  These counters are only examined through calcru.

Submitted by:	davidxu
Tested on:	x86, alpha, UP/SMP
2003-02-17 02:19:58 +00:00
phk
4bfb37f22e Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
obrien
d386c20878 Fix whitespace problems with option lines. 2003-02-13 22:27:40 +00:00
obrien
85bd6322e6 Fix the style of the SCHED_4BSD commit. 2003-02-13 22:24:44 +00:00
grehan
99c21f7b7f Missed odd address test when transcribing the Alpha version.
This fixes the checksum problems seen with telnet.
2003-02-13 08:56:41 +00:00
mike
b4e3f2f94a Implement fpclassify():
o Add a MD header private to libc called _fpmath.h; this header
  contains bitfield layouts of MD floating-point types.
o Add a MI header private to libc called fpmath.h; this header
  contains bitfield layouts of MI floating-point types.
o Add private libc variables to lib/libc/$arch/gen/infinity.c for
  storing NaN values.
o Add __double_t and __float_t to <machine/_types.h>, and provide
  double_t and float_t typedefs in <math.h>.
o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF,
  HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to
  <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via
  <machine/float.h>.
o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based
  on the size of its argument.  __fpclassifyl() is never called on
  alpha because (sizeof(long double) == sizeof(double)), which is good
  since __fpclassifyl() can't deal with such a small `long double'.

This was developed by David Schultz and myself with input from bde and
fenner.

PR:		23103
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
		(significant portions)
Reviewed by:	bde, fenner (earlier versions)
2003-02-08 20:37:55 +00:00
benno
28054ea687 Oops. Include opt_ddb.h. 2003-02-06 11:07:39 +00:00
benno
205fd17b03 Add a driver that attaches to the gpio node of macio and allows you to enter
DDB when the interrupt button (aka the "programmer's switch") is pressed.

This isn't unfortunately an NMI, but it's a handy way to get into DDB
quickly if needed.
2003-02-06 10:59:06 +00:00
benno
4bfbbecf11 Add a cast to silence a warning. 2003-02-06 10:47:57 +00:00
benno
ba64b35fac If a device tries to allocate an interrupt that's not on it's resource list,
assume that the child knows what it's doing and add it to the resource list.
2003-02-06 10:42:22 +00:00
benno
b5f68d4796 GC an unused variable. 2003-02-05 12:34:10 +00:00
benno
ae993b98b1 Export the ns_per_tick variable through md_var.h rather than by declaring
it extern in cpu.c.
2003-02-05 12:33:49 +00:00
benno
7bef634602 - Use cpu_setup() instead of identifycpu().
- Remove identifycpu().
2003-02-05 12:10:46 +00:00
benno
e16610544e Add cpu.c. This contains one exported function, cpu_setup(), which handles
setup of and printing information about cpus.

Obtained from:	NetBSD (parts)
2003-02-05 12:09:53 +00:00
benno
33c2dbc662 - Update spr.h
- Add hid.h

Obtained from:	NetBSD

NOTE: This undoes some changes I'd made to prefix the processor name defines
with PVR_.  This was due to my original decision to use MPC750 as a cpu name.
With this changed, the PVR_ change is no longer required.
2003-02-05 12:04:29 +00:00
benno
88bcf728ef Add an inline function wrapper for the mfpvf (Move From Processor Version
Register) instruction.
2003-02-05 11:59:27 +00:00
benno
331547882e Not all cpus are MPC750s. Replace the MPC750 cpu option with OEA. This
stands for Operating Environment Architecture and is the specification that
all of the MPC6xx, MPC7xx, MPC7xxx and IBM7xx CPUs adhere to.
2003-02-05 11:37:59 +00:00
benno
966bb12f6e Replace the inline asm in delay() with a while loop. This may not be as
efficient but it appears to actually work.  Some investigation may be
required.
2003-02-05 11:26:14 +00:00
benno
53ee945def - Rename the "powerpc" timecounter to the "decrementer" timecounter.
- Initialise it earlier.
2003-02-05 11:16:36 +00:00
harti
570156f24c Fix a problem in bus_dmamap_load_{mbuf,uio} when the first mbuf or the first
uio segment is empty. In this case no dma segment is create by
bus_dmamap_load_buffer, but the calling routine clears the first flag.
Under certain combinations of addresses of the first and second mbuf/uio
buffer this leads to corrupted DMA segment descriptors. This was already
fixed by tmm in sparc64/sparc64/iommu.c.

PR:		kern/47733
Reviewed by:	sam
Approved by:	jake (mentor)
2003-02-04 16:30:27 +00:00
jake
6b3763a173 Split statclock into statclock and profclock, and made the method for driving
statclock based on profhz when profiling is enabled MD, since most platforms
don't use this anyway.  This removes the need for statclock_process, whose
only purpose was to subdivide profhz, and gets the profiling clock running
outside of sched_lock on platforms that implement suswintr.
Also changed the interface for starting and stopping the profiling clock to
do just that, instead of changing the rate of statclock, since they can now
be separate.

Reviewed by:	jhb, tmm
Tested on:	i386, sparc64
2003-02-03 17:53:15 +00:00
benno
65f30a1a64 Add device zs to GENERIC on powerpc. 2003-02-02 06:11:23 +00:00
joe
457d099669 Put replace spaces with tabs in keeping with the rest of the file. 2003-02-01 18:45:18 +00:00
julian
e8efa7328e Reversion of commit by Davidxu plus fixes since applied.
I'm not convinced there is anything major wrong with the patch but
them's the rules..

I am using my "David's mentor" hat to revert this as he's
offline for a while.
2003-02-01 12:17:09 +00:00
benno
ad96cd6ffb - Introduce a flags value into the interrupt handler structure.
- Copy the flags passed to inthand_add into the flags value.
- If the interrupt is INTR_FAST, re-enable the irq after running the handler.
2003-02-01 07:20:36 +00:00
grehan
a7fd524f8e - add pmap_pagedaemon_waken variable
- remove dead code and fix warnings in pmap_zero_page/zero_page_area
- implement
    pmap_clear_reference
    pmap_ts_referenced
    pmap_page_exists_quick
    pmap_remove_all
- align pmap_qenter/qremove closer with i386 code
- fix vm_page locking in pmap_new_thread (from benno)
- add new parameter to pmap_clear_bit to return original
  pte value

Approved by:  benno
2003-02-01 02:56:48 +00:00
benno
1679457554 Make nirq mean 'number of irqs' and not 'last irq'. 2003-02-01 00:43:25 +00:00
benno
cd92290e8c Rework of how memory resources are discovered and dealt with in macio.
- Store the OpenFirmware "reg" property in the macio ivars.
- Use a struct to define the structure of a "reg" property entry.
- Discover all memory ranges, not just the first.
- In ata_macio, manage our own range and hand out our own allocations using
  bus_space_subregion.
- Fix bus_space_subregion to handle subregions of sparse maps.
2003-01-30 11:28:29 +00:00
benno
70310f135b Put the right fix in. Instead of deleting the declaration of __FBSDID, we
undef it before this definition.
2003-01-28 10:54:31 +00:00
benno
e0d8560e86 Back the previous commit out. It didn't actually fix the problem I was
seeing and the memory barrier isn't needed with the bridges we're using.

Fix the function style however.
2003-01-27 12:59:52 +00:00
benno
cf3eae4413 Back out some changes that snuck in with the last commit.
Pointy hat to:	benno
2003-01-27 04:32:10 +00:00
benno
a87cc2cb56 Flesh out bus_dmamap_sync. 2003-01-27 04:27:01 +00:00
benno
72fd8bd93e Use td->td_sticks, not td->td_kse->ke_sticks.
Forgotten by:	davidxu
2003-01-27 04:26:09 +00:00
benno
2521c07307 Remove a duplicate definition of the __FBSDID macro. 2003-01-27 04:24:57 +00:00