Commit Graph

430 Commits

Author SHA1 Message Date
thorpej 7de2c299a2 Don't define APTE_BASE if ARM32_PMAP_NEW is defined; the new pmap
doesn't use it.
2003-04-28 01:34:28 +00:00
ragge 69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00
toshii 7583c79436 Make it boot with ARM32_PMAP_NEW defined. 2003-04-26 08:31:30 +00:00
toshii 20697a7696 Fix a comment; 0x40000 isn't 1MB.
Use KERNEL_BASE instead of 0xc0000000. No functional change.
2003-04-26 07:09:26 +00:00
toshii 7dbee668be Some line folding cleanups.
Kill an unused variable.
2003-04-26 06:44:28 +00:00
wiz d75ae2c6f5 no iic, thus no rtc@iic, thus no todclock@rtc. 2003-04-17 11:45:13 +00:00
thorpej cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej fd53a1c386 Use PAGE_SIZE rather than NBPG. 2003-04-02 03:51:33 +00:00
chris 42d1c259a4 duplicate the changes from arm/arm32/stubs.c's dumpsys to remove pmap_map
usage.
Seems this file should really be split into the hpcarm specific bits
so it shares stubs.c with the other arm32 ports.

Pointed out by Håvard
2003-03-25 10:41:39 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
thorpej 23bc250391 Merge the nathanw_sa branch. 2003-01-17 21:55:23 +00:00
lukem 4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
takemura 285679b875 Added new ioctl command, WSMOUSEIO_GETID to tell touch panel identifier
for tpctl(8).
2003-01-03 04:36:26 +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
manu be554117a6 Removed debug messages 2002-11-07 17:26:34 +00:00
jdolecek c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
bsh 7b6639153c make atomic_{set,clear}_bit() inline for arm32 ports, and
add <machine/atomic.h> for them.
2002-10-19 12:22:33 +00:00
bjh21 d599df9587 Continue the " - . - 8" purge. Specifically:
add	rd, pc, #foo - . - 8		->	adr	rd, foo
ldr	rd, [pc, #foo - . - 8]		->	ldr	rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
2002-10-14 22:32:50 +00:00
elric 5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
jdolecek 4140408d7e g/c empty apmpoll(), use nopoll() instead 2002-10-07 21:32:10 +00:00
chs 038d3a7684 add missing protos. 2002-10-05 17:12:09 +00:00
thorpej c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
bsh 5880df1648 avoid warning when NAPM==0 2002-09-29 13:16:22 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
manu e2da53c091 More definitions to get apmd building (but it is not functionnal yet) 2002-09-19 16:52:00 +00:00
manu 7f8a47f4a1 - missing bits of apm
- KNF
2002-09-18 19:54:47 +00:00
lukem 3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
manu e77de5cb68 Initial APM support (enough to get battery level) 2002-09-16 19:52:52 +00:00
manu eee61c81f0 Fix a config mistake for wsmouse 2002-09-16 19:50:27 +00:00
thorpej c0691fd89d Back out previous; it breaks binary compatibility between platforms
in the same MACHINE_ARCH.
2002-09-14 15:54:00 +00:00
mycroft e9a1e15d7e Move some #defines out of _KERNEL. 2002-09-14 12:58:37 +00:00
manu 100872541e fix touchpanel broken behavior:
- when moving the stylus, the cursor was updated only when the screen was
released
- when moving the stylus for too long, the kernel crashed

This was caused by improper delays in SSP read and write, and by interrupt
hammering while the screen is touched). Both led to the machine handling
interrupts all the time and been unable to schedule the X server, therefore
the lack of cursor refresh.

The problem is fixed by
- masking touchpanel interrupts as soon as we are already handling them
- creating a kernel thread (j720ssp) that takes care of keyboard and
touchpanel I/O, instead of doing it in a softintr.
- reducing delays in j720ssp_readwrite operations from 5ms to 0.1ms.

NB: If the delay in j720ssp_readwrite operation is lowered to 0.1, then
switching on the screen using the power key pushes brightness to maximum.
In order to avoid this, we introduce a wait argument to j720ssp_readwrite,
which specify how many microseconds we have to wait. j720ssp_readwrite is
called with wait = 100 everywhere except in j720lcdparam where it is called
with wait = 500. That way it works.
2002-09-13 22:44:58 +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
manu f9889ab068 Correctly map altgr on a french keyboard 2002-08-27 17:54:30 +00:00
thorpej 77a6866508 Enable caching on kernel and user page tables. This saves having
to do uncached memory access during VM operations (which can be
quite expensive on some CPUs).

We currently write-back PTEs as soon as they're modified; there is
some room for optimization (to write them back in larger chunks).
For PTEs in the APTE space (i.e. PTEs for pmaps that describe another
process's address space), PTEs must also be evicted from the cache
complete (PTEs in PTE space will be evicted durint a context switch).
2002-08-24 02:16:30 +00:00
thorpej 6cc7c1c1ff * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
  where vtopte() is used.
2002-08-22 01:13:53 +00:00
thorpej 5fddbbe3d5 Do cached memory access to L1 tables, making sure to write-back the
cache after any L1 table modifications.
2002-08-21 18:34:31 +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
thorpej 79af00bddb Move the calls to uvm_page_physload() out of pmap_bootstrap() and
into platform-specific initialization code, giving platform-specific
code control over which free list a given chunk of memory gets put
onto.

Changes are essentially mechanical.  Test compiled for all ARM
platforms, test booted on Intel IQ80321 and Shark.

Discussed some time ago on port-arm.
2002-07-31 00:20:51 +00:00
thorpej d3aa5664b7 Move the uvm_setpagesize() call to platform-dependent code in preparation
for other changes to pmap_bootstrap().
2002-07-30 16:16:38 +00:00
manu 2126ded42f Implements WSKBDIO_GTYPE 2002-07-22 20:55:48 +00:00
manu 861152fbd3 Enable two WSDISPLAY options needed by the X server 2002-07-22 20:55:09 +00:00
manu a719492472 Added a commented out J720KBD_LAYOUT option, to show how default keymap can
be changed.
2002-07-21 19:20:55 +00:00
manu 11bde95a38 Added a french keymap, but the altgr key does not work yet (to be fixed later) 2002-07-21 19:16:39 +00:00
ichiro c0a235d462 change path of include file 2002-07-20 01:36:56 +00:00
ichiro 0fa83706ca make compile "IPAQ" 2002-07-19 19:29:28 +00:00
ichiro 422658da08 move sa11x0 to under arch/arm
make compile
2002-07-19 19:15:48 +00:00
toshii f72ad6b998 Support jornada720 touchpanel. 2002-07-19 08:49:48 +00:00
manu 210ae8794f Added PHY to the config file so that most PCMCIA ethernet board will work. 2002-07-18 20:03:41 +00:00
toshii aa2f38ff11 Recognize hpcboot's "b=xx" option, which specifies the root device to use. 2002-07-13 13:40:28 +00:00
toshii 01b6ded4f1 Comment out MEMORY_DISK_HOOKS as a workarund for the following problem.
hpcarm has a bug which prevents booting if kernel text+data size exceeds
3.75MB.
2002-06-22 13:04:00 +00:00
lukem fde6ae6f04 Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
2002-06-17 05:14:02 +00:00
toshii f98f1c4df5 Add a missing config_hook_init call. 2002-05-31 13:43:28 +00:00
rjs 6812acf29c Remove CPU_SA110 option. 2002-05-03 16:50:51 +00:00
rjs 767d5585e0 Use processor specific versions of ARM cache control functions for SA1100
and SA1110 instead of using SA110 ones.

Rename common StrongARM functions from sa110_* to sa1_*.

Reviewed by Jason Thorpe.
2002-05-03 16:45:21 +00:00
atatat d1b3852365 Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
2002-04-25 15:06:20 +00:00
thorpej eedd94475c * Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
  the magic "files include order" dance in N machine-dependent
  configuration definitions.
2002-04-16 20:50:16 +00:00
bjh21 b5d40b188c Remove bogus dependency on options HPCARM. 2002-04-13 19:15:52 +00:00
thorpej 32a0860797 Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel.  What
  you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
  on which ARM architecture versions are configured (based on CPU_*
  options).  Also defines ARM_NARCH to determins how many architecture
  versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
  which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
  to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
2002-04-12 18:50:29 +00:00
gmcgarry 6e066ba77a Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
2002-04-12 08:10:45 +00:00
thorpej 2bbba08b60 Delete option SAIP; nothing tests it. 2002-04-10 20:20:04 +00:00
thorpej 9d1c2c73c1 Eliminate all #ifdef HPCARM, and delete the option. 2002-04-10 20:17:23 +00:00
thorpej 1b20a04772 * Split pte_cache_mode into pte_l1_s_cache_mode, pte_l2_l_cache_mode,
and pte_l2_s_cache_mode.  The cache-meaningful bits are different
  for these descriptor types on some processor models.
* Add pte_*_cache_mask, corresponding to each above, which has a mask
  of the cache-meangful bits, and define those for generic and XScale
  MMU classes.  Note, the L2_S_CACHE_MASK_xscale definition requires
  use of the Extended Small Page L2 descriptor (the "X" bit overlaps
  with AP bits otherwise).
2002-04-09 22:37:00 +00:00
thorpej aee5994fce Use abstract names for the protection and PTE type bits in
L1 and L2 descriptors.  This will allow us to support different
PTE layouts that enable the use of extensions on different
processor models.
2002-04-09 19:37:14 +00:00
thorpej 991426d348 * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h.  While
  doing this, two bugs (as a result of typos) were fixed in

	arm/arm32/bus_dma.c
	evbarm/integrator/int_bus_dma.c
2002-04-05 16:58:01 +00:00
thorpej 4185029680 Use pte_cache_mode instead of PT_CACHEABLE. 2002-04-05 03:57:16 +00:00
thorpej 20b1bb2655 Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
  one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
  the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
  vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
  address of the vector page (which MUST be valid when the function
  is called) and a bitmask of vectors the kernel is going to take
  over, and performs all vector page initialization, including setting
  the V bit in the CPU Control register ("relocate vectors to high
  address"), if necessary.
2002-04-03 23:33:26 +00:00
lukem d213d804f7 Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
2002-04-02 05:30:34 +00:00
thorpej 13dab83888 Use the generic ARM procfs_machdep.c 2002-03-25 16:42:30 +00:00
thorpej aa0ba8096c Use the generic ARM process_machdep.c 2002-03-25 16:41:15 +00:00
thorpej ec1c475f7c Use the generic 32-bit ARM setstack.S 2002-03-25 16:36:25 +00:00
thorpej a4d12b89f5 Use the common 32-bit ARM setcpsr.S 2002-03-25 16:34:46 +00:00
thorpej dbe6d8291b * Fix use of pmap_curmaxkvaddr.
* Use the PTP hint in the pmap.
2002-03-25 04:51:19 +00:00
thorpej 35e2087b84 Make this compile again. 2002-03-24 21:46:28 +00:00
thorpej 2a68b2b9b1 Use the generic 32-bit ARM fault.c 2002-03-24 21:41:12 +00:00
thorpej 5ffc15a083 Use vtopte() instead of pmap_pte(). 2002-03-24 18:12:54 +00:00
thorpej 110e2a57ff * Change all uses of KERNEL_SPACE_START to KERNEL_BASE.
* Delete now unused KERNEL_SPACE_START.
2002-03-23 02:53:59 +00:00
thorpej aec8b8b92e * Fix the definition of KERNEL_BASE.
* Define KERNEL_TEXT_BASE, APTE_BASE, and KERNEL_VM_BASE in terms of
  KERNEL_BASE.
2002-03-23 02:42:46 +00:00
thorpej f0d2ad4c95 Slignt cleanup. 2002-03-23 02:33:38 +00:00
thorpej 0ba36d6f6f * Rename PROCESS_PAGE_TBLS_BASE -> PTE_BASE
* Rename ALT_PAGE_TBLS_BASE -> APTE_BASE
* Garbage-collect PAGE_TABLE_SPACE_START
2002-03-23 02:22:56 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
toshii a74f33173a Discard hpcarm copies of fusu.S and mem.c and use arm/arm32 versions. 2002-03-16 06:52:16 +00:00
lukem cd19d52695 * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
2002-03-10 19:56:37 +00:00
tsutsui 3c8b0446fe Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
2002-03-06 13:10:18 +00:00
chris 1181e367e0 Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
2002-03-03 11:22:58 +00:00
simonb 4324f37586 Use "#define<tab>". 2002-02-28 03:17:23 +00:00
christos e8116a8f5b - Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
2002-02-27 01:20:51 +00:00
toshii 3676484136 Make KERNEL_VM_SIZE a little larger so that ubc_init doesn't fail from
ENOMEM.
2002-02-23 14:02:48 +00:00
toshii 5e0f2080c8 Remove a bogus pmap_map_entry call. 2002-02-23 13:58:10 +00:00
thorpej 9d157337f4 Fix the "va" argument to pmap_map_entry() when mapping kernel_ptpt. 2002-02-22 18:25:08 +00:00
thorpej bb84e85802 Change pmap_map_entry() to work like pmap_map_chunk(): take a pointer
to the L1 table and a virtual address, and no pointer to the L2 table.
The L2 table will be looked up by pmap_map_entry(), which will panic
if the there is no L2 table for the requested VA.

NOTE: IT IS EXTREMELY IMPORTANT THAT THE CORRECT VIRTUAL ADDRESS
BE PROVIDED TO pmap_map_entry()!  Notably, the code that mapped
the kernel L2 tables into the kernel PT mapping L2 table were not
passing actual virtual addresses, but rather offsets into the range
mapped by the L2 table.  I have fixed up all of these call sites,
and tested the resulting kernel on both an IQ80310 and a Shark.
Other portmasters should examine their pmap_map_entry() calls if
their new kernels fail.
2002-02-22 04:49:19 +00:00
thorpej 79738a99e9 Keep track of which kernel PTs are available during bootstrap,
and let pmap_map_chunk() lookup the correct one to use for the
current VA.  Eliminate the "l2table" argument to pmap_map_chunk().

Add a second L2 table for mapping kernel text/data/bss on the
IQ80310 (fixes booting kernels with ramdisks).
2002-02-21 21:58:00 +00:00
thorpej 15e0450397 Always pass the L1 table to pmap_map_chunk(). This allows pmap_map_chunk()
to perform some error checking.
2002-02-21 05:25:23 +00:00
thorpej 454e106a48 map_chunk() -> pmap_map_chunk(), and move it to pmap.c 2002-02-21 02:52:19 +00:00
thorpej 425011f621 map_pagetable() -> pmap_link_l2pt(), and move it to pmap.c 2002-02-20 20:41:15 +00:00
thorpej c44b9117f0 Collapse map_entry{,ro,nc}() into a single pmap_map_entry() that
takes a prot and a "cacheable" indicator.
2002-02-20 02:32:56 +00:00