Commit Graph

24 Commits

Author SHA1 Message Date
tsutsui addcf5d254 #if defined(_KERNEL_OPT) is enough, #if !defined(_LKM) isn't needed
in that case. Pointed out by mrg.
2003-11-08 15:19:20 +00:00
tsutsui 7a6d021fe2 Include "opt_lockdebug.h" only #if !defined(_LKM) && defined(_KERNEL_OPT). 2003-11-08 12:06:20 +00:00
itohy 29f0f3babf Change the location of BSD disklabel not to overlap with LIF header.
LABELSECTOR:  0 -> 1
	LABELOFFSET: 64 -> 0

per discussion on NetBSD mailing lists: port-hp700 and tech-kern.
2003-10-18 23:45:30 +00:00
matt 467632cd2a Install <machine/mcontext.h> 2003-09-20 22:25:07 +00:00
chs b5ed452510 just include the hppa version. 2003-08-31 01:28:22 +00:00
chs cc0b88792e update for LWPs, and some lite cleanup. 2003-08-31 01:26:31 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
thorpej 452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
thorpej cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
kent cd7d9faeaf Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it. 2003-01-28 01:07:51 +00:00
chs 8e1d2230d8 use explicitly-sized types for LIF structure fields and
make them all unsigned.
2002-11-28 06:06:13 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
fredette 94791afd65 No longer use BTLB entries to map the entire address spaces of I/O subsystems,
since BTLB entries can be scarce and very little of an I/O subsystem normally
needs to be mapped.

Instead, the pmap now allows mappings of I/O space to be entered with
pmap_kenter_pa.  bus_space mappings for small amounts of I/O space (as for
virtually all devices) are made this way, with BTLB entries still used for
large mappings for things like framebuffers.

This has led to more and cleaned-up uses of bus_space(9) and has caused
some autoconf cleanup.  Also, kgdb is now attached and connected before
autoconfiguration, which is much earlier than before.
2002-08-25 20:19:59 +00:00
fredette fa8a85a54d Cleaned up BTLB support. There are no longer BTLB function pointers
in struct hppa_cpu_info or anywhere else, now there are just hppa_btlb_*
functions.  Added support for machines with split I/D and variable-range
BTLBs.  Added support for purging BTLB entries.
2002-08-19 18:58:26 +00:00
fredette a3961f4a15 This cleans up interrupts with respect to GSC bus chips and the devices
they contain.  IRQ information for these has been removed from the
kernel configuration file.  GSC bus chips now choose an available CPU
IRQ for themselves, and know IRQ information for all of the devices
they may contain.  Minor autoconfiguration changes support this.

Renamed the old-style vmstat interrupt counters to say "ipl" and not
"irq", since they've been disconnected from irq numbers.  Also provide
a function to allocate an irq bit from an interrupt register, and a
function to report the next ipl bit that will be allocated.
2002-08-16 15:02:39 +00:00
fredette 670f0a07d9 First pass at changing how spl masks are built. Now there is no
longer a forced correspondence between bit numbers in an interrupt
register and bit numbers in an spl mask.  This will avoid conflicts
between various interrupt registers in the same system.

Instead, bits in the spl mask are allocated on a first come, first
served basis by devices which can interrupt.  The new hp700_intr_ipending_new
takes care of reading all interrupt request registers that need
servicing, and mapping the bits set in those registers to new bits
set in ipending.

This whole mechanism is in and works.  A later commit will see the
I/O subsystems fixing which bits in their interrupt registers are
connected to which devices, largely removing irq information from
kernel configuration files.  There will also be a cosmetic fix to
show which spl bit corresponds to a device.
2002-08-14 16:18:11 +00:00
fredette 02f0a2cf44 Significant pmap changes to no longer rely on the "U-bit" (TLB_UNCACHEABLE)
to deal with aliasing of regular memory pages, because many processors don't
support it.

Now, the pmap marks all mappings of a page that has any non-equivalent
aliasing and any writable mapping, and the fault handlers watch for this
and flush other mappings out of the TLB and cache before (re)entering a
conflicting mapping.

When a page has non-equivalent aliasing, only one writable mapping at
a time may be in the TLB and cache.  If no writable mapping is in the
TLB and cache, any number of read-only mappings may be.

The PA7100LC/PA7300LC fault handlers have not been converted yet.
2002-08-11 22:29:07 +00:00
fredette 960ef7a15a Made changes to how bus_dmamap_sync() and the if_ie_gsc driver work
when it comes to flushing the cache.  These changes should eliminate
the "ie0: receive descriptors out of sync" and "ie0: reset" messages.
2002-08-11 19:39:37 +00:00
briggs 0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
fredette 16cf89e5a5 Made changes in where/how the kernel is linked, and how the pmap
maps it with BTLB entries, to minimize the number of BTLB entries
needed.

Because the CPU type was often guessed incorrectly, the mapping of
HP board number to system name now includes information about the
expected CPU type.
2002-08-05 20:58:35 +00:00
fredette 1eb29e31bf Added hp700-specific files. Still a work in progress. 2002-06-06 19:48:01 +00:00