Commit Graph

40054 Commits

Author SHA1 Message Date
bouyer f5abf7cc11 Use DEV_STRATEGY() instead of VOP_STRATEGY(). YAMAMOTO Takashi says it's not
safe to use VOP_STRATEGY() from interrupt context.
2005-03-31 13:35:02 +00:00
jmc 9c8f42a9a5 Add missing $HOST_SH to execution of walnut-mkimg.sh 2005-03-29 17:58:15 +00:00
thorpej 95cc3e3c00 - Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
  thus preventing a "slow leak" from eventually shutting off the interrupt
  vector.  Idea taken from pci_kn300.c (which was changed to use the new
  alpha_shared_intr_reset_strays() function).
2005-03-29 04:06:20 +00:00
bouyer b50ebb2aa2 Merge 1.1.14.3 from yamt-km branch:
We can't write directly to a gdt slot, we need to go though
xen_update_descriptor().

From YAMAMOTO Takashi: this is not a problem in HEAD, because
as the kva for gdt is pageable, when gdt_put_slot1 attempts to modify gdt,
the fault handler allocates and maps a new page for you.
So the kernel doesn't panic, but could leak some memory.
2005-03-28 16:40:41 +00:00
uwe 85589e4fcd Improve spelling in debug printfs. 2005-03-26 22:41:12 +00:00
bouyer 13e1355ec4 Remplace __insn_barrier() with x86_lfence() where appropriate.
While here, replace a panic() with a return of error code in xbdback.c.
2005-03-26 21:22:45 +00:00
bouyer 57d0b7f835 Don't assume we're on a uniprocessor system (the hypervisor may be running SMP)
and add "lock;" barrier to avoid instruction reordering in event handlings.
This fix the last issue with event loss I was getting on SMP systems.
2005-03-26 20:00:49 +00:00
tsutsui 45bd685dbe mips_sdcache_forceinv has been removed.
XXX Should we check MIPS3_CONFIG_SE in mips3_cp0_config_read() and
XXX call r5k_enable_sdcache() accordingly here?
2005-03-26 10:04:29 +00:00
tsutsui a8d2e55834 Add a workaround to handle virtual alias which may cause data corruption
on R5000/Rm52xx machines:
- Add a new global variable mips_cache_virtual_alias in mips/cache.c,
  which indicates that VIPT cache on the CPU could cause virtual alias
  and software support is required to handle it. (i.e. no VCED/VCEI)
- Add several cache flush/invalidate ops around KSEG0 access which
  might cause virtual alias if mips_cache_virtual_alias is true.
  (note checking mips_sdcache_line_size isn't valid for R5000/Rm52xx
   because only R4000/R4400 with L2 cache have VCED/VCEI)
- Remove a global variable mips_sdcache_forceinv, which is now superseded
  by new mips_cache_virtual_alias.

While here, also change some R4000/R4400 cache ops:
- Don't override mips_cache_alias_mask and mips_cache_prefer_mask with
  values based on MIPS3_MAX_PCACHE_SIZE for R4000/R4400 with L2 cache
  because it's still worth to reduce VCED/VCEI.
- Flush dcache in pmap_zero_page(9) unconditionally on all MIPS_HAS_R4K_MMU
  CPUs and remove cache flush code from cpu_lwp_fork() in vm_machdep.c.

Thanks to Markus W Kilbinger for testing patches on port-cobalt/port-mips.


XXX This fix is just a workaround because it doesn't handle all possible
XXX virtual aliases. As discussed on port-mips, maybe the real fix
XXX for virtual alias is to change MI UVM to adapt it to VIPT cache.
XXX (all VA mappings against the same PA must have the same VAC index etc.)
2005-03-26 09:51:02 +00:00
fvdl c487efe4a7 Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.
2005-03-26 05:12:34 +00:00
cube 78f44cbe4f Add attimer(4) configurations everywhere pcppi(4) exists, with the
following rule:
  If a pcppi device is enabled for an attachment, enable an attimer for the
  same attachement, otherwise comment it.
2005-03-25 23:28:43 +00:00
tsutsui 120ecb16f8 Switch cobalt port to use MI pci_configure_bus(9)
with options PCI_NETBSD_CONFIGURE.
Patch from KIYOHARA Takashi on port-cobalt.

This change makes siop(4) (and maybe all other PCI devices
using pci mem space) work on cobalt.
2005-03-25 15:01:57 +00:00
yamt 2e2956423c don't bother to allocate gdt slots for tss
as we don't actually use them.
2005-03-25 10:27:03 +00:00
cube 98201da433 pcppi at acpi needs some more work. Leave it commented out for now. 2005-03-21 18:10:15 +00:00
xtraeme f9dbeebf6f Add "pcppi* at acpi?" commented out. 2005-03-21 14:15:27 +00:00
cgd 382487d844 correctly alphabetize bce, skc/sk, inphy relative to their neighbors.
devices.  correct typo in bce comment.
2005-03-21 01:57:54 +00:00
kleink ef43d43dac Add PLATFORM_IBM_6015 to INSTALL, as present in GENERIC. 2005-03-20 20:19:07 +00:00
bouyer 83e1dbf7bb npxintr(): this function does the right thing if we don't try to clear
the interrupt latch (which is probably done by the hypervisor, linux/xen
doesn't do it either). Now the "fputest" configure test from pkgsrc/math/yorick
works as expected.
Thanks to Christian Limpach for the hint.
2005-03-20 13:12:59 +00:00
bouyer d0b115d1b9 Add PCI audio devices from i386/conf/GENERIC. 2005-03-18 16:32:33 +00:00
shige a38e26c70d Add sources for OpenBlockS200 (OpenBlockS S/R) machine. 2005-03-18 15:31:58 +00:00
shige b55107dced Rearrange codes for OpenBlockS266 machine. 2005-03-18 14:12:34 +00:00
shige 1a445aab8a Remove MD codes from arch/powerpc/ibm4xx. 2005-03-18 12:56:59 +00:00
tsutsui a9a45cb796 Fix __KERNEL_RCSID. 2005-03-18 12:34:17 +00:00
bsh 25645b8f42 modify comments for clarity.
Original comments made several people misunderstand that the comment
says kernel's pagetable is at 0xa0004000.  What the comment says is
about RedBoot's pagetable.
2005-03-18 11:22:23 +00:00
cube 08498f7926 In xennet_ioctl, we need a declaration for sc when debugging macros are
active.  Reported on current-users by Teemu Rinta-aho.
2005-03-18 11:15:40 +00:00
bsh d608de2069 include <bsd.obj.mk> to teach make the rules for OBJDIR names.
This is to fix a problem on compiling gzboot with BUILDID defined
(by build.sh -B BUILDID).
2005-03-18 08:50:07 +00:00
bouyer 23b38e8659 Convert to ether_ioctl(), and claim IFF_SIMPLEX | IFF_MULTICAST.
This allows IPv6 on NetBSD domU.
2005-03-17 22:30:17 +00:00
kleink 513c158344 A couple of <sys/select.h>-related changes:
* Factor out struct selinfo and its header dependencies into its own header,
  <sys/selinfo.h>, to avoid namespace pollution.
* Include <sys/selinfo.h> in user-visible headers where necessary.
2005-03-17 20:39:17 +00:00
jmc 9411ed143e Can't depend on shell scripts being executable from CVS. Preface mkimg.sh with
${HOST_SH}
2005-03-17 16:45:50 +00:00
bsh a5d9dab3e0 Switch kernels for Lubbock and TwinTail to use pmap_devmap to map
I/O registers that are used in early start-up stage.  Also stop using
special bootstrap-time-only bus_space_map function in {lubbock,g42xxeb}_machdep.c.

This makes initarm() for them a bit simpler, and gives us smaller diffs
to other evbarm platforms.
2005-03-17 16:22:56 +00:00
bouyer 9af95b6ee2 Protect various IRQ and event allocation/deallocations with splhigh().
Print the IRQ used for debug and misdirect events.
2005-03-17 15:32:38 +00:00
bouyer b3b63c9707 print the IRQ used by the domain controller. 2005-03-17 15:31:17 +00:00
bouyer 3307398997 When handling a defered event, unmasking it isn't enouth, we also need to check
if the corresponding bit needs to be set in evtchn_pending_sel, and eventually
force an upcall (if we got a second event when this one what being handled).
For now to this by calling hypervisor_enable_irq(), this could be rewritten
in inline assembly by someone knowing enouth about i386 assembly :)
2005-03-17 15:30:45 +00:00
bouyer 02e969d512 Avoid loosing upcalls in stipending() by checking evtchn_upcall_pending
with upcalls unmasked.
2005-03-17 15:26:06 +00:00
bouyer a982855f7e Sync with i386/locore.S 1.33:
Check the passed in address as well as determining the maximum length
using VM_MAXUSER_ADDRESS in copyinstr and copyoutstr.

Problem originally fixed in OpenBSD/i386.
This fix suggested by Charles Hannum (mycroft at netbsd dot org).
2005-03-16 14:52:29 +00:00
bouyer c0c525e11b Fix stack offset to account for an extra register pushl compared to the i386
version.
Thanks to fvdl@ for confirming I was right on this.
2005-03-16 11:25:03 +00:00
bsh 4c5c06097c Switch SMDK2410 and SMDK2800 kernels to use pmap_devmap_bootstrap() to map
I/O registers that are used in early start-up stage.  This replaces the
special bootstrap-time-only bus_space_map function in smdk{2410,2800}_machdep.c.

This makes SMDK{2410,2800}'s initarm() a bit simpler, and gives us smaller diffs
to other evbarm platforms.

An another good thing for SMDK2800 is that now we have all built-in peripheral
registers mapped in 2 segments.  We may expect less TLB miss on I/O access
(very slightly).
2005-03-16 05:02:12 +00:00
bouyer 407770d89d Add more DIAGNOSTIC checks
fix test of xbdback_map_shm() return value.
2005-03-15 23:39:18 +00:00
bouyer c3b1622d19 Add some DIAGNOSTIC checks
Protect more stuff with splvm().
2005-03-15 23:37:58 +00:00
simonb 38c9d4c236 Remove unused header file. 2005-03-15 13:19:41 +00:00
fvdl 486492d83a Check the passed in address as well as determining the maximum length
using VM_MAXUSER_ADDRESS in copyinstr and copyoutstr.

Problem originally fixed in OpenBSD/i386.
This fix suggested by Charles Hannum (mycroft at netbsd dot org).
2005-03-14 21:50:59 +00:00
tsutsui 99e1f5f2d1 Include "ioconf.h" for struct cfdriver *_cd decls. 2005-03-14 12:50:33 +00:00
bsh 2145d5199e change a printf to aprint_normal. 2005-03-13 16:53:08 +00:00
dsl 37840e8766 Fix time calculation when:
p->p_rtime.tv_usec + tv.tv_usec < spc->spc_runtime.tv_usec
2005-03-12 16:33:45 +00:00
dsl 94015fc9d6 Fix convertion of seconds to nanoseconds.
Add the usec to the secs before subtracting the usec offset - otherwise
I suspect the value can do horribly wrong!
Change all T_SVR4_GETHRESTIME to return sec + nanoseconds (I've not sure
this is correct, but I doubt the 32bit emulation in a 64bit kernel should
act differently to a 32bit kernel!)
Untested - I don't even have a sparc compile setup at the moment.
2005-03-12 16:29:59 +00:00
dsl 604ef02ccf You need to multply seconds by 10^9 to get nanoseconds! (not 10^6).
Remove some possible aliasing issues.
I actually suspect this code is returned a word-swapped 64bit value though!
2005-03-12 16:02:02 +00:00
dsl 1c1e4144e2 Use an archive library for libkern if we don't support LKMs.
Enough to get INSTALL_TINY small enough again.
Someone else can fix it next time...
2005-03-12 14:39:12 +00:00
bouyer d8ac66d8b5 Move Xen kernel config files to arch/i386, so that they can be added to
the i386 release process. Make them include archi/i386/conf/GENERIC.local,
like other i386 GENERIC and INSTALL files.
2005-03-11 20:48:24 +00:00
bouyer b3de8f0978 Define xen devices in i386/conf/majors.i386. This makes sure there won't
be conflics with regular i386 kernels.
2005-03-11 20:44:37 +00:00
bouyer 153285b0bd Properly define NISA and NPCI; cleanup use of NISA and NPCI. 2005-03-11 20:39:39 +00:00