Commit Graph

47794 Commits

Author SHA1 Message Date
ad
f674d9678b Share cpu.h between the x86 ports. 2008-05-11 15:32:20 +00:00
ad
c5fb1571ad Update xen for identcpu changes. 2008-05-11 15:02:34 +00:00
ad
50d8ae9d14 Simplify x86 identcpu code, and share between i386/amd64. 2008-05-11 14:44:53 +00:00
ad
454ba0bbef Don't abuse ci_cpuid - in particular, ci_cpuid != ci_signature. 2008-05-11 14:39:49 +00:00
ad
f9a4f0750a Don't use ci_apicid to identify cpus in debug output. 2008-05-11 14:25:02 +00:00
ad
058b47f572 Re-base the cpu types at 0 so they can be used as an array index. 2008-05-11 13:36:33 +00:00
ad
da5bd37a49 Expose the 'cpu' variable.: 2008-05-11 13:33:54 +00:00
joerg
1ae05b2bbf Don't use the legacy interrupt when deciding how to route IOAPIC pins.
On some modern systems not all devices have the PCI interrupt line
set, typically the cardbus bridge is affected and it would result in
different interrupt vectors used for the same IOAPIC pin.
To allow this, simplify the code by checking for an existing match first
and only allocate a new entry if that doesn't exist. For the IOAPIC case
don't bother with the reserveration on the primary CPU for ISA
interrupts, just use them.
2008-05-11 13:18:25 +00:00
ad
cc7aa65fd4 +END(tsc_get_timecount) 2008-05-11 12:43:35 +00:00
ad
bd06c33f6e Fix a potential hang during skew detection (not observed). 2008-05-11 12:41:13 +00:00
chris
e4ea82cddb Add support to pxeboot to allow the loading of modules. Changes to main.c
are taken from boot/boot2.c.

This allows an install to be started by running:
load tftp:miniroot.kmod
boot tftp:netbsd-GENERIC

Note that the change to dev_net.c to comment out the network shutdown,
suggests we need to hook the network shutdown in the the common exec code.
If the network is shutdown, it fails to reinitialise and so fails to load
the module.
2008-05-11 11:42:02 +00:00
isaki
e33e7d58fd Increase ramdisk size. 2008-05-11 09:35:53 +00:00
cegger
2a9c1861c0 aprint_normal -> aprint_normal_dev
sizeof line -> sizeof(line)
2008-05-11 09:31:49 +00:00
kiyohara
2438bca8bf Split device_t/softc. 2008-05-11 08:23:17 +00:00
wrstuden
97003b024b Oops. These are supposed to come alive on the branch, not the head. 2008-05-11 00:18:09 +00:00
wrstuden
dbbab92bc9 Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
2008-05-10 23:48:44 +00:00
skrll
06decd2786 Add a cdboot prog.
Derived from OpenBSD.
2008-05-10 19:11:58 +00:00
skrll
a4c3fd710b Fix some debug printfs. 2008-05-10 19:05:59 +00:00
ad
bd60b91d0a If the boot processor's lapic has the wrong ID, reset it. 2008-05-10 17:23:54 +00:00
ad
47f99407d1 Assume that TSC is stable on P-II and P-III Xeons, since systems with those
CPUs are likely to have a TSC-friendly configuration.
2008-05-10 16:44:00 +00:00
ad
c328252caf TSC should also be enabled for intel f03. 2008-05-10 16:37:08 +00:00
ad
95a272a377 Make xen build after tsc changes. 2008-05-10 16:27:57 +00:00
ad
feb38f6706 Take skew into account for cpu_counter(). 2008-05-10 16:21:41 +00:00
ad
75ada79f33 Improve x86 tsc handling:
- Ditch the cross-CPU calibration stuff. It didn't work properly, and it's
  near impossible to synchronize the CPUs in a running system, because bus
  traffic will interfere with any calibration attempt, messing up the
  timings.

- Only enable the TSC on CPUs where we are sure it does not drift. If we are
  On a known good CPU, give the TSC high timecounter quality, making it the
  default.

- When booting CPUs, detect TSC skew and account for it. Most Intel MP
  systems have synchronized counters, but that need not be true if the
  system has a complicated bus structure. As far as I know, AMD systems
  do not have synchronized TSCs and so we need to handle skew.

- While an AP is waiting to be set running, try and make the TSC drift by
  entering a reduced power state. If we detect drift, ensure that the TSC
  does not get a high timecounter quality. This should not happen and is
  only for safety.

- Make cpu_counter() stuff LKM safe.
2008-05-10 16:12:32 +00:00
martin
5d1469bd77 Backout previous: the license sweep touched these files in error, so
restore the old license.
2008-05-10 15:31:03 +00:00
chris
fe50151584 Fix 9.5 year old buffer overflow.
It wasn't noticed till now as it wasn't overflowing onto anything
important (or was overwritten by the correct data).  Recent changes
meant irqstr was placed just before footbridge_intrq and so it trashed
the interrupt linked list, and so caused an alignment fault.

Note that cats still doesn't boot even with the change, as it hangs when
starting userland, I suspect an interrupt issue.
2008-05-10 15:29:25 +00:00
ad
9a48c061bc Remove tsc debugging code. 2008-05-10 15:05:01 +00:00
ad
9ab200719c Merge cpu_counter.h. 2008-05-10 14:53:54 +00:00
jmcneill
1c1d16a9e9 Use aprint_naive, cleanup error printing. 2008-05-10 13:38:34 +00:00
jmcneill
a6a2bdb866 Mhz -> MHz in aprint, use aprint_naive. 2008-05-10 13:35:56 +00:00
martin
b46765907d Minor typo in license 2008-05-10 11:49:37 +00:00
isaki
007dbd3e78 Make it retire, because no one refers.
arch/x68k/dev/spc.c includes <dev/ic/mb89352reg.h> instead of
this, since 1999.
2008-05-10 10:37:38 +00:00
cegger
d4e5a8360c Buildfix: Remove duplicate #defines. 2008-05-09 21:53:56 +00:00
joerg
f809e517f2 Only check for hlt on !Xen. This needs to be reviewed when Xen gets SMP
support.
2008-05-09 21:25:43 +00:00
ad
8b6686aea4 LAPIC_ID_MASK is 8 bits these days. 2008-05-09 21:23:48 +00:00
joerg
a790b941e6 Make cpu_idle a macro calling a function pointer on x86.
Select the Xen idle routine for Xen, mwait if supported by the CPU and
it is not AMD and halt otherwise. As reported by Christoph Egger,
AMD Barcelona keeps the CPU in C0 state with MWAIT, contrary to HLT,
which uses C1 and therefore much less power.
2008-05-09 18:11:28 +00:00
tsutsui
f519863871 Split softc/device_t, with misc related changes. 2008-05-09 10:59:55 +00:00
tsutsui
dba35d8b76 CFATTACH_DECL() -> CFATTACH_DECL_NEW(), botched in rev 1.14. 2008-05-09 10:09:27 +00:00
matt
4c3e78343a Add KERNEL_BASE_EXT=0xc0000000 to those plaforms that need it.
Note that armv6 and later systems will use 0x80000000 as the kernel start
so they can use the split TTBs in armv6 and later.
2008-05-09 00:08:37 +00:00
macallan
8f2f09b987 nuke clause 3 & 4 2008-05-08 02:16:27 +00:00
jmcneill
34fba0e3ad Use 2-clause license. 2008-05-08 02:10:59 +00:00
macallan
92b89da10e nuke clause 3 2008-05-08 02:03:22 +00:00
macallan
757fd24b0c nuke license clause 3 2008-05-08 01:37:04 +00:00
macallan
e24aaf48e7 report chip revision 2008-05-08 01:36:03 +00:00
macallan
343b964931 magic number reduction
from Izumi Tsutsui
2008-05-08 01:27:43 +00:00
mlelstv
85de90b807 return the length without padding. 2008-05-07 17:56:09 +00:00
tsutsui
8e98bd4e5e Tweak a structure definition for DMA registers. 2008-05-07 13:02:00 +00:00
joerg
1e127b8726 Remove some prototypes that are not implemented. Make some functions
static that are only used in intr.c.
2008-05-07 07:00:16 +00:00
macallan
5572494305 Make the priority ordering code actually work.
Thanks to Izumi Tsutsui for bugging me repeatedly about the problem.
2008-05-07 00:39:12 +00:00
ad
39e9d8a066 doh 2008-05-06 23:03:03 +00:00
ad
cf45b9bae4 rw_tryenter: there is a few instruction race between reading rw_owner and
doing the cmpxchg, where another thread can successfully get a read hold
on the lock. That shouldn't fail anyone trying trying to get a read
hold. So for read locks, never bail just because the CAS fails, only bail
if we the status bits in the lock word say we can't have it.
2008-05-06 22:57:39 +00:00
jdc
d91c968da7 Treat ledma the same way as sbus and dma when looking for the boot path.
Original Ultra 1's with sbus -> ledma -> le can now network boot again.
(From martin@).
2008-05-06 21:07:57 +00:00
skrll
2932f766a1 Deal with ifconfig lossage.
Looks like I picked the wrong week to quit netbsd.
2008-05-06 15:09:45 +00:00
lukem
dab1996c70 Add a missing semicolon.
(mmm, compile before commit :)
2008-05-06 12:52:34 +00:00
apb
1eeed263ba Change the wording of a message, to make it clear that pressing SPACE
will stop the countdown timer.  The message now reads "Choose an option;
RETURN for default; SPACE to stop countdown."  It no longer says what
the default choice actually is, because the message printed on the
following line will do that.
2008-05-06 09:48:00 +00:00
uwe
39fcc155cc Default COPTS to "-Os -freorder-blocks" which is ~= -O2 but without
-falign-* that is too zealous for low-memory sh3 machines.  I've been
using this for my hpcsh and landisk kernels for a very long time.
(besides, it's not 2001 anymore and pkgsrc/cross/sh is long since gone).
2008-05-06 02:25:19 +00:00
uwe
d7e68261ea Avoid uninitialized variable warning at -O. 2008-05-06 02:12:19 +00:00
uwe
3b59dc3936 Enable re(4) now that bus_dma is fixed to deal with TLB-mapped data in mbufs. 2008-05-06 01:30:22 +00:00
uwe
a0a69502b3 Deal with TLB-mapped data in mbufs. Makes nfs writes work with re(4). 2008-05-06 01:29:00 +00:00
ad
2f3850d422 Export tsc_freq via sysctl. 2008-05-05 17:47:06 +00:00
ad
5a2236b88e The kernel is too large. Reduce size by commenting out eye candy options:
{ACPI,MII,PCI,USB}VERBOSE

Also remove INCLUDE_CONFIG_FILE, because it doesn't make sense in GENERIC.
2008-05-05 14:44:26 +00:00
ad
a09a6bc31d The kernel is too large. Reduce size by commenting out eye candy options:
{ACPI,EISA,MII,PCI,USB,MCA}VERBOSE

Also remove INCLUDE_CONFIG_FILE, because it doesn't make sense in GENERIC.
2008-05-05 14:43:18 +00:00
xtraeme
ed38b7481e device_t/softc split and other related cosmetic changes. 2008-05-05 11:49:40 +00:00
chris
dc970973a2 Increase banner entries from 10 to 12. This allows all 12 lines of the cd
boot.cfg banner to be displayed.
2008-05-05 08:36:55 +00:00
chs
5069fb4d04 pmap_upvo_pool needs to use IPL_VM since it is used from
pmap_kenter_pa(), which can be called from interrupt context.
2008-05-05 04:40:53 +00:00
jmcneill
729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
cegger
46512505a9 Update headers: Welcome Xen 3.2.1
Important note: This does not break backward-compatibility. It is still possible to run on Xen 3.1.4.
Hint for developers: Use the xen_version hypercall to determine at runtime if a new hypercall will work. Also check the hypercall return code.
Tested by me and bouyer. OK bouyer.
2008-05-04 19:56:28 +00:00
martin
637bc2e71d Move TNF licenses to 2 clause form 2008-05-04 19:43:05 +00:00
xtraeme
7f44567d7c device_t/softc split and other related cosmetic changes. 2008-05-04 16:16:56 +00:00
xtraeme
db484efd57 device_t/softc split for spic(4) and other related cosmetic changes. 2008-05-04 16:13:35 +00:00
xtraeme
07c2a78bc8 device_t/softc split for adt7467c(4) and adm1030, and other related
cosmetic changes.
2008-05-04 14:45:01 +00:00
martin
c21f953fcb Remove my personal license, the TNF one is good enough for me. 2008-05-04 11:00:09 +00:00
martin
673523f500 Move to standard TNF 2 clause license 2008-05-04 00:35:37 +00:00
martin
9c63b7e8cc Move to 2 clause TNF license 2008-05-04 00:18:16 +00:00
jklos
b92aa793c1 Fix leds.c to compile. 2008-05-04 00:10:42 +00:00
martin
3b9bf49423 Move to standard TNF 2 clause license 2008-05-04 00:01:08 +00:00
martin
f6c08ca517 Move to 2 clause TNF license 2008-05-03 23:57:21 +00:00
martin
73f89d772c Move to standard 2 clause TNF license 2008-05-03 23:52:19 +00:00
martin
912b8073ae Move to 2 clause TNF license 2008-05-03 23:49:14 +00:00
uwe
83c6d7c82f Prettify to make the code easier to follow.
While here remove the XXX comments I added for lastaddr
initialization, now that I can see what's going on.
2008-05-03 23:45:40 +00:00
martin
7a18a3a01f Move to 2 clause TNF license 2008-05-03 23:17:03 +00:00
martin
2d265edbed Move TNF license to standard 2 clause variant 2008-05-03 23:06:06 +00:00
uwe
4b4321601b Make DPRINTFs depend on busdma_debug variable (off by default).
Move mixed PRE/POST check in _bus_dmamap_sync under DIAGNOSTIC.
Use __func__ to print function name and wrap long DPRINTF lines
to reduce visual clutter.
2008-05-03 22:07:07 +00:00
ad
72c795e7a2 Handle compressed modules. 2008-05-03 18:49:13 +00:00
cegger
86bf5bcac7 ansify 2008-05-03 17:03:45 +00:00
ad
4ae6459449 i386 -> x86 2008-05-03 13:07:31 +00:00
sborrill
dac9aa49ba Add support for multiple commands separated by semi-colons on menu lines
in boot.cfg.
e.g.
menu=Boot with module foo:load=/foo.kmod;boot
2008-05-03 09:46:40 +00:00
plunky
fcf1772a80 after the "struct disk" is finished with, it should be
destroyed with disk_destroy(9) to stave off LOCKDEBUG
panics.
2008-05-03 08:23:41 +00:00
yamt
c0b85df1be sprinkle END/IDTVEC_END. 2008-05-03 05:56:44 +00:00
yamt
5b453874fc add macros to designate the end of asm functions. ok by Andrew Doran. 2008-05-03 05:54:52 +00:00
yamt
02777bca8a db_numargs: bump default number of arguments from 5 to 10.
5 is not enough for eg. getpages.
2008-05-03 05:50:33 +00:00
yamt
dcdeebcd7b db_machine_init: use idt_vec_set. 2008-05-03 05:46:59 +00:00
yamt
2d43e7b87b rename END to ENDLABEL. i'll use END for other purpose. ok by Andrew Doran. 2008-05-03 05:45:01 +00:00
yamt
9093441576 rename END to ENDLABEL. i'll use END for other purpose. ok by Andrew Doran. 2008-05-03 05:40:21 +00:00
ad
2b688dc23b Back out previous which was not thought through properly. 2008-05-03 02:56:13 +00:00
ad
3a991d1e4a Implement pmap_remove_all(). 2008-05-03 00:21:35 +00:00
martin
07c5538d1f Merge multiple TNF licenses into a single one, move to 2 clause 2008-05-02 23:46:12 +00:00
ad
59978d093b Put the GENERIC kernel onto i386 installation CDs and load a kernel module
from the boot loader to provide the miniroot.
2008-05-02 23:13:05 +00:00
ad
f91fac1cb9 We don't do 1.2MB installs any more. 2008-05-02 22:59:58 +00:00
ad
a39076d65c This isn't needed any more. 2008-05-02 22:59:15 +00:00