PERFORCE change 88685 for review
Warner Losh
imp at FreeBSD.org
Sat Dec 24 10:52:14 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=88685
Change 88685 by imp at imp_harmony on 2005/12/24 18:51:25
IFC @88682
Affected files ...
.. //depot/projects/arm/src/sys/alpha/alpha/clock.c#5 integrate
.. //depot/projects/arm/src/sys/alpha/alpha/interrupt.c#3 integrate
.. //depot/projects/arm/src/sys/alpha/include/cpu.h#2 integrate
.. //depot/projects/arm/src/sys/alpha/include/cpuconf.h#2 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/db_trace.c#4 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/local_apic.c#7 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/mp_machdep.c#5 integrate
.. //depot/projects/arm/src/sys/amd64/include/apicvar.h#5 integrate
.. //depot/projects/arm/src/sys/amd64/include/clock.h#2 integrate
.. //depot/projects/arm/src/sys/amd64/include/cpu.h#2 integrate
.. //depot/projects/arm/src/sys/amd64/include/frame.h#3 integrate
.. //depot/projects/arm/src/sys/amd64/include/smp.h#5 integrate
.. //depot/projects/arm/src/sys/amd64/isa/clock.c#6 integrate
.. //depot/projects/arm/src/sys/arm/arm/intr.c#8 integrate
.. //depot/projects/arm/src/sys/arm/arm/locore.S#17 integrate
.. //depot/projects/arm/src/sys/arm/include/cpu.h#2 integrate
.. //depot/projects/arm/src/sys/arm/include/frame.h#2 integrate
.. //depot/projects/arm/src/sys/arm/sa11x0/sa11x0_ost.c#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_timer.c#4 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i80321/iq31244_machdep.c#7 integrate
.. //depot/projects/arm/src/sys/boot/i386/libi386/biosmem.c#2 integrate
.. //depot/projects/arm/src/sys/boot/i386/libi386/i386_copy.c#3 integrate
.. //depot/projects/arm/src/sys/boot/i386/libi386/libi386.h#3 integrate
.. //depot/projects/arm/src/sys/boot/i386/loader/main.c#4 integrate
.. //depot/projects/arm/src/sys/boot/pc98/libpc98/biosdisk.c#3 integrate
.. //depot/projects/arm/src/sys/boot/pc98/libpc98/biosmem.c#3 integrate
.. //depot/projects/arm/src/sys/boot/pc98/loader/main.c#3 integrate
.. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_proto.h#5 integrate
.. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscall.h#5 integrate
.. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscalls.c#5 integrate
.. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_sysent.c#5 integrate
.. //depot/projects/arm/src/sys/compat/freebsd32/syscalls.master#5 integrate
.. //depot/projects/arm/src/sys/conf/NOTES#9 integrate
.. //depot/projects/arm/src/sys/conf/files#10 integrate
.. //depot/projects/arm/src/sys/dev/acpica/acpi_video.c#4 integrate
.. //depot/projects/arm/src/sys/dev/bge/if_bge.c#6 integrate
.. //depot/projects/arm/src/sys/dev/bge/if_bgereg.h#6 integrate
.. //depot/projects/arm/src/sys/dev/drm/drm_agpsupport.c#3 integrate
.. //depot/projects/arm/src/sys/dev/drm/drm_drv.c#4 integrate
.. //depot/projects/arm/src/sys/dev/drm/i915_drv.c#4 integrate
.. //depot/projects/arm/src/sys/dev/drm/mach64_drv.c#3 integrate
.. //depot/projects/arm/src/sys/dev/drm/mga_drv.c#4 integrate
.. //depot/projects/arm/src/sys/dev/drm/r128_drv.c#4 integrate
.. //depot/projects/arm/src/sys/dev/drm/radeon_drv.c#4 integrate
.. //depot/projects/arm/src/sys/dev/drm/savage_drv.c#3 integrate
.. //depot/projects/arm/src/sys/dev/drm/sis_drv.c#4 integrate
.. //depot/projects/arm/src/sys/dev/drm/tdfx_drv.c#4 integrate
.. //depot/projects/arm/src/sys/dev/em/if_em.c#9 integrate
.. //depot/projects/arm/src/sys/dev/pci/vga_pci.c#1 branch
.. //depot/projects/arm/src/sys/dev/ppbus/if_plip.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ppbus/immio.c#2 integrate
.. //depot/projects/arm/src/sys/dev/ppbus/lpbb.c#2 integrate
.. //depot/projects/arm/src/sys/dev/ppbus/lpt.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ppbus/ppi.c#2 integrate
.. //depot/projects/arm/src/sys/dev/ppbus/pps.c#6 integrate
.. //depot/projects/arm/src/sys/dev/ppc/ppc.c#4 integrate
.. //depot/projects/arm/src/sys/dev/random/nehemiah.c#3 integrate
.. //depot/projects/arm/src/sys/dev/random/randomdev.c#2 integrate
.. //depot/projects/arm/src/sys/dev/random/randomdev.h#2 integrate
.. //depot/projects/arm/src/sys/dev/random/randomdev_soft.c#3 integrate
.. //depot/projects/arm/src/sys/dev/random/randomdev_soft.h#2 integrate
.. //depot/projects/arm/src/sys/dev/random/yarrow.c#3 integrate
.. //depot/projects/arm/src/sys/dev/smbus/smbus.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/umass.c#5 integrate
.. //depot/projects/arm/src/sys/i386/conf/NOTES#8 integrate
.. //depot/projects/arm/src/sys/i386/i386/db_trace.c#4 integrate
.. //depot/projects/arm/src/sys/i386/i386/local_apic.c#6 integrate
.. //depot/projects/arm/src/sys/i386/i386/mp_machdep.c#5 integrate
.. //depot/projects/arm/src/sys/i386/include/apicvar.h#4 integrate
.. //depot/projects/arm/src/sys/i386/include/clock.h#4 integrate
.. //depot/projects/arm/src/sys/i386/include/cpu.h#2 integrate
.. //depot/projects/arm/src/sys/i386/include/frame.h#3 integrate
.. //depot/projects/arm/src/sys/i386/include/smp.h#5 integrate
.. //depot/projects/arm/src/sys/i386/isa/clock.c#5 integrate
.. //depot/projects/arm/src/sys/ia64/ia64/interrupt.c#3 integrate
.. //depot/projects/arm/src/sys/ia64/include/cpu.h#2 integrate
.. //depot/projects/arm/src/sys/kern/imgact_aout.c#3 integrate
.. //depot/projects/arm/src/sys/kern/imgact_elf.c#4 integrate
.. //depot/projects/arm/src/sys/kern/imgact_gzip.c#3 integrate
.. //depot/projects/arm/src/sys/kern/init_sysent.c#5 integrate
.. //depot/projects/arm/src/sys/kern/kern_clock.c#4 integrate
.. //depot/projects/arm/src/sys/kern/kern_exit.c#5 integrate
.. //depot/projects/arm/src/sys/kern/kern_lock.c#4 integrate
.. //depot/projects/arm/src/sys/kern/kern_sig.c#6 integrate
.. //depot/projects/arm/src/sys/kern/subr_sbuf.c#2 integrate
.. //depot/projects/arm/src/sys/kern/subr_taskqueue.c#3 integrate
.. //depot/projects/arm/src/sys/kern/sys_process.c#3 integrate
.. //depot/projects/arm/src/sys/kern/syscalls.c#5 integrate
.. //depot/projects/arm/src/sys/kern/syscalls.master#6 integrate
.. //depot/projects/arm/src/sys/modules/Makefile#7 integrate
.. //depot/projects/arm/src/sys/modules/i2c/controllers/Makefile#3 integrate
.. //depot/projects/arm/src/sys/modules/i2c/controllers/amdsmb/Makefile#1 branch
.. //depot/projects/arm/src/sys/modules/i2c/controllers/nfsmb/Makefile#1 branch
.. //depot/projects/arm/src/sys/net/if_bridge.c#4 integrate
.. //depot/projects/arm/src/sys/net/if_ethersubr.c#7 integrate
.. //depot/projects/arm/src/sys/net/if_gif.c#3 integrate
.. //depot/projects/arm/src/sys/net/if_gif.h#3 integrate
.. //depot/projects/arm/src/sys/netatm/uni/unisig_encode.c#2 integrate
.. //depot/projects/arm/src/sys/netgraph/ng_source.c#4 integrate
.. //depot/projects/arm/src/sys/netgraph/ng_source.h#4 integrate
.. //depot/projects/arm/src/sys/netinet/in_gif.c#3 integrate
.. //depot/projects/arm/src/sys/netinet/in_proto.c#4 integrate
.. //depot/projects/arm/src/sys/netinet6/in6_gif.c#3 integrate
.. //depot/projects/arm/src/sys/pc98/cbus/clock.c#2 integrate
.. //depot/projects/arm/src/sys/pc98/conf/NOTES#6 integrate
.. //depot/projects/arm/src/sys/pci/agp_ali.c#3 integrate
.. //depot/projects/arm/src/sys/pci/agp_amd.c#3 integrate
.. //depot/projects/arm/src/sys/pci/agp_amd64.c#4 integrate
.. //depot/projects/arm/src/sys/pci/agp_ati.c#2 integrate
.. //depot/projects/arm/src/sys/pci/agp_i810.c#4 integrate
.. //depot/projects/arm/src/sys/pci/agp_intel.c#4 integrate
.. //depot/projects/arm/src/sys/pci/agp_nvidia.c#4 integrate
.. //depot/projects/arm/src/sys/pci/agp_sis.c#3 integrate
.. //depot/projects/arm/src/sys/pci/agp_via.c#4 integrate
.. //depot/projects/arm/src/sys/pci/agpreg.h#4 integrate
.. //depot/projects/arm/src/sys/pci/amdsmb.c#1 branch
.. //depot/projects/arm/src/sys/pci/if_de.c#6 integrate
.. //depot/projects/arm/src/sys/pci/if_devar.h#5 integrate
.. //depot/projects/arm/src/sys/pci/nfsmb.c#1 branch
.. //depot/projects/arm/src/sys/powerpc/conf/Makefile#1 branch
.. //depot/projects/arm/src/sys/powerpc/conf/NOTES#1 branch
.. //depot/projects/arm/src/sys/powerpc/include/clock.h#2 integrate
.. //depot/projects/arm/src/sys/powerpc/include/cpu.h#2 integrate
.. //depot/projects/arm/src/sys/powerpc/include/frame.h#3 integrate
.. //depot/projects/arm/src/sys/powerpc/powerpc/clock.c#2 integrate
.. //depot/projects/arm/src/sys/powerpc/powerpc/db_trace.c#3 integrate
.. //depot/projects/arm/src/sys/powerpc/powerpc/interrupt.c#2 integrate
.. //depot/projects/arm/src/sys/powerpc/powerpc/trap_subr.S#3 integrate
.. //depot/projects/arm/src/sys/sparc64/conf/GENERIC#7 integrate
.. //depot/projects/arm/src/sys/sparc64/include/cpu.h#2 integrate
.. //depot/projects/arm/src/sys/sparc64/include/frame.h#2 integrate
.. //depot/projects/arm/src/sys/sparc64/sparc64/tick.c#3 integrate
.. //depot/projects/arm/src/sys/sys/param.h#7 integrate
.. //depot/projects/arm/src/sys/sys/syscall.h#5 integrate
.. //depot/projects/arm/src/sys/sys/syscall.mk#5 integrate
.. //depot/projects/arm/src/sys/sys/sysproto.h#5 integrate
.. //depot/projects/arm/src/sys/sys/systm.h#6 integrate
.. //depot/projects/arm/src/sys/ufs/ffs/ffs_softdep.c#5 integrate
Differences ...
==== //depot/projects/arm/src/sys/alpha/alpha/clock.c#5 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.41 2005/12/14 21:42:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.42 2005/12/22 22:16:04 jhb Exp $");
#include "opt_clock.h"
@@ -157,7 +157,7 @@
static u_int32_t max_cycles_per_tick;
static u_int32_t last_time;
-static void handleclock(void* arg);
+static void handleclock(int usermode, uintfptr_t pc);
static void calibrate_clocks(u_int32_t firmware_freq, u_int32_t *pcc,
u_int32_t *timer);
static void set_timer_freq(u_int freq, int intr_freq);
@@ -230,8 +230,7 @@
*/
/*
- * Start the real-time and statistics clocks. Leave stathz 0 since there
- * are no other timers available.
+ * Start the real-time and statistics clocks.
*/
void
cpu_initclocks()
@@ -275,7 +274,9 @@
*/
if (hwrpb->rpb_type != ST_DEC_21000) {
tc_init(&i8254_timecounter);
- }
+ platform.clockintr = handleclock;
+ } else
+ platform.clockintr = hardclock;
if (ncpus == 1) {
alpha_timecounter.tc_frequency = freq;
@@ -283,7 +284,7 @@
}
stathz = hz / 8;
- platform.clockintr = (void (*)(void *)) handleclock;
+ profhz = hz;
/*
* Get the clock started.
@@ -424,27 +425,23 @@
}
static void
-handleclock(void *arg)
+handleclock(int usermode, uintfptr_t pc)
{
- /*
- * XXX: TurboLaser doesn't have an i8254 counter.
- * XXX: A replacement is needed, and another method
- * XXX: of determining this would be nice.
- */
- if (hwrpb->rpb_type != ST_DEC_21000) {
- if (timecounter->tc_get_timecount == i8254_get_timecount) {
- mtx_lock_spin(&clock_lock);
- if (i8254_ticked)
- i8254_ticked = 0;
- else {
- i8254_offset += timer0_max_count;
- i8254_lastcount = 0;
- }
- clkintr_pending = 0;
- mtx_unlock_spin(&clock_lock);
+
+ KASSERT(hwrpb->rpb_type != ST_DEC_21000,
+ ("custom clock handler called on TurboLaser"));
+ if (timecounter->tc_get_timecount == i8254_get_timecount) {
+ mtx_lock_spin(&clock_lock);
+ if (i8254_ticked)
+ i8254_ticked = 0;
+ else {
+ i8254_offset += timer0_max_count;
+ i8254_lastcount = 0;
}
+ clkintr_pending = 0;
+ mtx_unlock_spin(&clock_lock);
}
- hardclock(arg);
+ hardclock(usermode, pc);
}
void
==== //depot/projects/arm/src/sys/alpha/alpha/interrupt.c#3 (text+ko) ====
@@ -33,7 +33,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
/* __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $");*/
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.88 2005/10/25 19:48:45 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.89 2005/12/22 22:16:04 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -489,23 +489,21 @@
*/
if (PCPU_GET(cpuid) == 0) {
#endif
- (*platform.clockintr)(framep);
- /* divide hz (1024) by 8 to get stathz (128) */
- if ((++schedclk2 & 0x7) == 0) {
- if (profprocs != 0)
- profclock((struct clockframe *)framep);
- statclock((struct clockframe *)framep);
- }
+ (*platform.clockintr)(TRAPF_USERMODE(framep),
+ TRAPF_PC(framep));
+
+ /* Bump stathz divider. */
+ schedclk2++;
#ifdef SMP
- } else {
- hardclock_process((struct clockframe *)framep);
- if ((schedclk2 & 0x7) == 0) {
- if (profprocs != 0)
- profclock((struct clockframe *)framep);
- statclock((struct clockframe *)framep);
- }
- }
+ } else
+ hardclock_cpu(TRAPF_USERMODE(framep));
#endif
+ if (profprocs != 0)
+ profclock(TRAPF_USERMODE(framep), TRAPF_PC(framep));
+
+ /* divide hz (1024) by 8 to get stathz (128) */
+ if ((schedclk2 & 0x7) == 0)
+ statclock(TRAPF_USERMODE(framep));
critical_exit();
}
}
==== //depot/projects/arm/src/sys/alpha/include/cpu.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.42 2005/01/05 20:05:50 imp Exp $ */
+/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.43 2005/12/22 22:16:04 jhb Exp $ */
/* From: NetBSD: cpu.h,v 1.18 1997/09/23 23:17:49 mjacob Exp */
/*-
@@ -48,21 +48,10 @@
#include <machine/frame.h>
-/*
- * Arguments to hardclock and gatherstats encapsulate the previous
- * machine state in an opaque clockframe. One the Alpha, we use
- * what we push on an interrupt (a trapframe).
- */
-struct clockframe {
- struct trapframe cf_tf;
-};
#define TRAPF_USERMODE(framep) \
(((framep)->tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) != 0)
#define TRAPF_PC(framep) ((framep)->tf_regs[FRAME_PC])
-#define CLKF_USERMODE(framep) TRAPF_USERMODE(&(framep)->cf_tf)
-#define CLKF_PC(framep) TRAPF_PC(&(framep)->cf_tf)
-
/*
* CTL_MACHDEP definitions.
*/
==== //depot/projects/arm/src/sys/alpha/include/cpuconf.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/include/cpuconf.h,v 1.14 2005/01/31 23:07:42 ticso Exp $ */
+/* $FreeBSD: src/sys/alpha/include/cpuconf.h,v 1.15 2005/12/22 22:16:04 jhb Exp $ */
/* $NetBSD: cpuconf.h,v 1.7 1997/11/06 00:42:03 thorpej Exp $ */
#ifndef _ALPHA_CPUCONF_H
#define _ALPHA_CPUCONF_H
@@ -68,7 +68,7 @@
void (*cons_init)(void);
void (*device_register)(struct device *, void *);
void (*iointr)(void *, unsigned long);
- void (*clockintr)(void *);
+ void (*clockintr)(int, uintfptr_t);
void (*mcheck_handler)(unsigned long, struct trapframe *,
unsigned long, unsigned long);
void (*cpu_idle)(void);
==== //depot/projects/arm/src/sys/amd64/amd64/db_trace.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.71 2005/12/08 18:33:29 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.72 2005/12/23 21:33:55 jeff Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -180,7 +180,7 @@
* Stack trace.
*/
#define INKERNEL(va) (((va) >= DMAP_MIN_ADDRESS && (va) < DMAP_MAX_ADDRESS) \
- || (va) >= KERNBASE)
+ || ((va) >= KERNBASE && (va) < VM_MAX_KERNEL_ADDRESS))
struct amd64_frame {
struct amd64_frame *f_frame;
@@ -515,6 +515,10 @@
break;
if (stack_put(st, callpc) == -1)
break;
+ if (frame->f_frame <= frame ||
+ (vm_offset_t)frame->f_frame >=
+ (vm_offset_t)rbp + KSTACK_PAGES * PAGE_SIZE)
+ break;
frame = frame->f_frame;
}
}
==== //depot/projects/arm/src/sys/amd64/amd64/local_apic.c#7 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.22 2005/12/13 18:29:09 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.23 2005/12/22 22:16:05 jhb Exp $");
#include "opt_hwpmc_hooks.h"
@@ -51,6 +51,7 @@
#include <vm/pmap.h>
#include <machine/apicreg.h>
+#include <machine/cpu.h>
#include <machine/cputypes.h>
#include <machine/frame.h>
#include <machine/intr_machdep.h>
@@ -617,7 +618,7 @@
}
void
-lapic_handle_timer(struct clockframe frame)
+lapic_handle_timer(struct trapframe frame)
{
struct lapic *la;
@@ -634,16 +635,16 @@
if (la->la_hard_ticks >= lapic_timer_hz) {
la->la_hard_ticks -= lapic_timer_hz;
if (PCPU_GET(cpuid) == 0)
- hardclock(&frame);
+ hardclock(TRAPF_USERMODE(&frame), TRAPF_PC(&frame));
else
- hardclock_process(&frame);
+ hardclock_cpu(TRAPF_USERMODE(&frame));
}
/* Fire statclock at stathz. */
la->la_stat_ticks += stathz;
if (la->la_stat_ticks >= lapic_timer_hz) {
la->la_stat_ticks -= lapic_timer_hz;
- statclock(&frame);
+ statclock(TRAPF_USERMODE(&frame));
}
/* Fire profclock at profhz, but only when needed. */
@@ -651,7 +652,7 @@
if (la->la_prof_ticks >= lapic_timer_hz) {
la->la_prof_ticks -= lapic_timer_hz;
if (profprocs != 0)
- profclock(&frame);
+ profclock(TRAPF_USERMODE(&frame), TRAPF_PC(&frame));
}
critical_exit();
}
==== //depot/projects/arm/src/sys/amd64/amd64/mp_machdep.c#5 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.266 2005/12/08 18:33:29 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.267 2005/12/22 22:16:05 jhb Exp $");
#include "opt_cpu.h"
#include "opt_kstack_pages.h"
@@ -917,7 +917,7 @@
}
void
-ipi_bitmap_handler(struct clockframe frame)
+ipi_bitmap_handler(struct trapframe frame)
{
int cpu = PCPU_GET(cpuid);
u_int ipi_bitmap;
==== //depot/projects/arm/src/sys/amd64/include/apicvar.h#5 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.15 2005/12/08 18:33:30 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.16 2005/12/22 22:16:05 jhb Exp $
*/
#ifndef _MACHINE_APICVAR_H_
@@ -202,7 +202,7 @@
void lapic_ipi_vectored(u_int vector, int dest);
int lapic_ipi_wait(int delay);
void lapic_handle_intr(int vector, struct trapframe frame);
-void lapic_handle_timer(struct clockframe frame);
+void lapic_handle_timer(struct trapframe frame);
void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id);
int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked);
int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode);
==== //depot/projects/arm/src/sys/amd64/include/clock.h#2 (text+ko) ====
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $FreeBSD: src/sys/amd64/include/clock.h,v 1.50 2005/01/05 20:17:20 imp Exp $
+ * $FreeBSD: src/sys/amd64/include/clock.h,v 1.51 2005/12/22 22:16:05 jhb Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -29,7 +29,6 @@
/*
* Driver to clock driver interface.
*/
-struct clockframe;
int acquire_timer2(int mode);
int release_timer2(void);
==== //depot/projects/arm/src/sys/amd64/include/cpu.h#2 (text+ko) ====
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.74 2004/08/03 18:44:26 mux Exp $
+ * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.75 2005/12/22 22:16:05 jhb Exp $
*/
#ifndef _MACHINE_CPU_H_
@@ -59,10 +59,6 @@
(ISPL((framep)->tf_cs) == SEL_UPL)
#define TRAPF_PC(framep) ((framep)->tf_rip)
-#define CLKF_USERMODE(framep) \
- (ISPL((framep)->cf_cs) == SEL_UPL)
-#define CLKF_PC(framep) ((framep)->cf_rip)
-
/*
* CTL_MACHDEP definitions.
*/
==== //depot/projects/arm/src/sys/amd64/include/frame.h#3 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)frame.h 5.2 (Berkeley) 1/18/91
- * $FreeBSD: src/sys/amd64/include/frame.h,v 1.29 2005/12/08 18:33:30 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/frame.h,v 1.30 2005/12/22 22:16:05 jhb Exp $
*/
#ifndef _MACHINE_FRAME_H_
@@ -76,34 +76,4 @@
register_t tf_ss;
};
-/* frame of clock (same as interrupt frame) */
-
-struct clockframe {
- register_t cf_rdi;
- register_t cf_rsi;
- register_t cf_rdx;
- register_t cf_rcx;
- register_t cf_r8;
- register_t cf_r9;
- register_t cf_rax;
- register_t cf_rbx;
- register_t cf_rbp;
- register_t cf_r10;
- register_t cf_r11;
- register_t cf_r12;
- register_t cf_r13;
- register_t cf_r14;
- register_t cf_r15;
- register_t :64; /* compat with trap frame - trapno */
- register_t :64; /* compat with trap frame - addr */
- register_t :64; /* compat with trap frame - flags */
- register_t :64; /* compat with trap frame - err */
- /* below portion defined in hardware */
- register_t cf_rip;
- register_t cf_cs;
- register_t cf_rflags;
- register_t cf_rsp;
- register_t cf_ss;
-};
-
#endif /* _MACHINE_FRAME_H_ */
==== //depot/projects/arm/src/sys/amd64/include/smp.h#5 (text+ko) ====
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $FreeBSD: src/sys/amd64/include/smp.h,v 1.86 2005/12/08 18:33:30 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/smp.h,v 1.87 2005/12/22 22:16:05 jhb Exp $
*
*/
@@ -52,7 +52,7 @@
void ipi_all(u_int ipi);
void ipi_all_but_self(u_int ipi);
void ipi_self(u_int ipi);
-void ipi_bitmap_handler(struct clockframe frame);
+void ipi_bitmap_handler(struct trapframe frame);
u_int mp_bootaddress(u_int);
int mp_grab_cpu_hlt(void);
void mp_topology(void);
==== //depot/projects/arm/src/sys/amd64/isa/clock.c#6 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.223 2005/12/12 22:27:07 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.224 2005/12/22 22:16:05 jhb Exp $");
/*
* Routines to handle clock hardware.
@@ -67,6 +67,7 @@
#include <sys/power.h>
#include <machine/clock.h>
+#include <machine/cpu.h>
#include <machine/frame.h>
#include <machine/intr_machdep.h>
#include <machine/md_var.h>
@@ -141,7 +142,7 @@
};
static void
-clkintr(struct clockframe *frame)
+clkintr(struct trapframe *frame)
{
if (timecounter->tc_get_timecount == i8254_get_timecount) {
@@ -155,8 +156,8 @@
clkintr_pending = 0;
mtx_unlock_spin(&clock_lock);
}
- if (!using_lapic_timer)
- hardclock(frame);
+ KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer"));
+ hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
}
int
@@ -212,17 +213,17 @@
* in the statistics, but the stat clock will no longer stop.
*/
static void
-rtcintr(struct clockframe *frame)
+rtcintr(struct trapframe *frame)
{
while (rtcin(RTC_INTR) & RTCIR_PERIOD) {
if (profprocs != 0) {
if (--pscnt == 0)
pscnt = psdiv;
- profclock(frame);
+ profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
}
if (pscnt == psdiv)
- statclock(frame);
+ statclock(TRAPF_USERMODE(frame));
}
}
==== //depot/projects/arm/src/sys/arm/arm/intr.c#8 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.11 2005/10/25 19:48:46 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.12 2005/12/22 22:16:06 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/syslog.h>
@@ -55,7 +55,7 @@
static int intrcnt_index = 0;
static int last_printed = 0;
-void arm_handler_execute(void *, int);
+void arm_handler_execute(struct trapframe *, int);
void
arm_setup_irqhandler(const char *name, void (*hand)(void*), void *arg,
@@ -99,7 +99,7 @@
}
void
-arm_handler_execute(void *frame, int irqnb)
+arm_handler_execute(struct trapframe *frame, int irqnb)
{
struct intr_event *event;
struct intr_handler *ih;
==== //depot/projects/arm/src/sys/arm/arm/locore.S#17 (text+ko) ====
@@ -37,7 +37,7 @@
#include <machine/asm.h>
#include <machine/armreg.h>
#include <machine/pte.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.12 2005/12/20 01:29:17 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.13 2005/12/21 15:02:31 cognet Exp $");
/* What size should this really be ? It is only used by init_arm() */
#define INIT_ARM_STACK_SIZE 2048
@@ -140,6 +140,9 @@
Lstart_off: .word start_inram-_C_LABEL(_start)
start_inram:
adr r7, Lunmapped
+ bic r7, r7, #0xff000000
+ orr r7, r7, #PHYSADDR
+
/* Disable MMU for a while */
mrc p15, 0, r2, c1, c0, 0
@@ -160,8 +163,6 @@
/* build page table from scratch */
ldr r0, Lstartup_pagetable
adr r4, mmu_init_table
- bic r4, r4, #0xff000000
- orr r4, r4, #PHYSADDR
b 3f
2:
==== //depot/projects/arm/src/sys/arm/include/cpu.h#2 (text+ko) ====
@@ -1,5 +1,5 @@
/* $NetBSD: cpu.h,v 1.2 2001/02/23 21:23:52 reinoud Exp $ */
-/* $FreeBSD: src/sys/arm/include/cpu.h,v 1.4 2005/02/01 06:36:27 njl Exp $ */
+/* $FreeBSD: src/sys/arm/include/cpu.h,v 1.5 2005/12/22 22:16:06 jhb Exp $ */
#ifndef MACHINE_CPU_H
#define MACHINE_CPU_H
@@ -29,10 +29,7 @@
#define CPU_MAXID 6 /* number of valid machdep ids */
-#define CLKF_USERMODE(frame) ((frame->if_spsr & PSR_MODE) == PSR_USR32_MODE)
-
#define TRAPF_USERMODE(frame) ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE)
-#define CLKF_PC(frame) (frame->if_pc)
#define TRAPF_PC(tfp) ((tfp)->tf_pc)
==== //depot/projects/arm/src/sys/arm/include/frame.h#2 (text+ko) ====
@@ -42,7 +42,7 @@
*
* Created : 30/09/94
*
- * $FreeBSD: src/sys/arm/include/frame.h,v 1.3 2005/01/05 21:58:48 imp Exp $
+ * $FreeBSD: src/sys/arm/include/frame.h,v 1.4 2005/12/22 22:16:06 jhb Exp $
*
*/
@@ -137,28 +137,6 @@
unsigned int if_pc;
} irqframe_t;
-typedef struct clockframe {
- unsigned int if_spsr;
- unsigned int if_r0;
- unsigned int if_r1;
- unsigned int if_r2;
- unsigned int if_r3;
- unsigned int if_r4;
- unsigned int if_r5;
- unsigned int if_r6;
- unsigned int if_r7;
- unsigned int if_r8;
- unsigned int if_r9;
- unsigned int if_r10;
- unsigned int if_r11;
- unsigned int if_r12;
- unsigned int if_usr_sp;
- unsigned int if_usr_lr;
- unsigned int if_svc_sp;
- unsigned int if_svc_lr;
- unsigned int if_pc;
-} clockframe_t;
-
/*
* Switch frame
*/
==== //depot/projects/arm/src/sys/arm/sa11x0/sa11x0_ost.c#2 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.3 2005/01/05 21:58:48 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.4 2005/12/22 22:16:06 jhb Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -54,7 +54,9 @@
#include <machine/resource.h>
#include <machine/intr.h>
+#include <machine/cpu.h>
#include <machine/cpufunc.h>
+#include <machine/frame.h>
#include <machine/katelib.h>
@@ -144,7 +146,7 @@
clockintr(arg)
void *arg;
{
- struct clockframe *frame = arg;
+ struct trapframe *frame = arg;
u_int32_t oscr, nextmatch, oldmatch;
int s;
@@ -179,7 +181,7 @@
saost_sc->sc_clock_count = nextmatch;
bus_space_write_4(saost_sc->sc_iot, saost_sc->sc_ioh, SAOST_MR0,
nextmatch);
- hardclock(frame);
+ hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
#if 0
mtx_unlock_spin(&clock_lock);
#endif
@@ -190,7 +192,7 @@
statintr(arg)
void *arg;
{
- struct clockframe *frame = arg;
+ struct trapframe *frame = arg;
u_int32_t oscr, nextmatch, oldmatch;
int s;
@@ -225,7 +227,7 @@
}
saost_sc->sc_statclock_count = nextmatch;
- statclock(frame);
+ statclock(TRAPF_USERMODE(frame));
}
#endif
==== //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_timer.c#4 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_timer.c,v 1.8 2005/12/09 23:52:51 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_timer.c,v 1.9 2005/12/22 22:16:06 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,7 +53,9 @@
#include <sys/timetc.h>
#include <machine/bus.h>
+#include <machine/cpu.h>
#include <machine/cpufunc.h>
+#include <machine/frame.h>
#include <machine/resource.h>
#include <machine/intr.h>
#include <arm/xscale/i80321/i80321reg.h>
@@ -377,11 +379,11 @@
void
clockhandler(void *arg)
{
- struct clockframe *frame = arg;
+ struct trapframe *frame = arg;
ticked++;
tisr_write(TISR_TMR0);
- hardclock(frame);
+ hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
if (i80321_hardclock_hook != NULL)
(*i80321_hardclock_hook)();
==== //depot/projects/arm/src/sys/arm/xscale/i80321/iq31244_machdep.c#7 (text+ko) ====
@@ -49,7 +49,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.17 2005/12/09 23:54:50 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.18 2005/12/21 15:01:49 cognet Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -94,7 +94,6 @@
#include <machine/bus.h>
#include <sys/reboot.h>
-#undef DDB
#include <arm/xscale/i80321/i80321reg.h>
#include <arm/xscale/i80321/i80321var.h>
#include <arm/xscale/i80321/iq80321reg.h>
==== //depot/projects/arm/src/sys/boot/i386/libi386/biosmem.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosmem.c,v 1.7 2003/08/25 23:28:31 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosmem.c,v 1.8 2005/12/21 02:17:58 sobomax Exp $");
/*
* Obtain memory configuration information from the BIOS
@@ -34,7 +34,7 @@
#include "libi386.h"
#include "btxv86.h"
-vm_offset_t memtop;
+vm_offset_t memtop, memtop_copyin;
u_int32_t bios_basemem, bios_extmem;
#define SMAPSIG 0x534D4150
@@ -101,7 +101,7 @@
}
/* Set memtop to actual top of memory */
- memtop = 0x100000 + bios_extmem;
+ memtop = memtop_copyin = 0x100000 + bios_extmem;
}
==== //depot/projects/arm/src/sys/boot/i386/libi386/i386_copy.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/i386_copy.c,v 1.11 2005/12/19 09:00:11 sobomax Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/i386_copy.c,v 1.12 2005/12/21 02:17:58 sobomax Exp $");
/*
* MD primitives supporting placement of module data
@@ -66,7 +66,7 @@
i386_readin(const int fd, vm_offset_t dest, const size_t len)
{
- if (dest + len >= memtop) {
+ if (dest + len >= memtop_copyin) {
errno = EFBIG;
return(-1);
}
==== //depot/projects/arm/src/sys/boot/i386/libi386/libi386.h#3 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.22 2005/09/22 15:14:12 ru Exp $
+ * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.23 2005/12/21 02:17:58 sobomax Exp $
*/
@@ -91,7 +91,10 @@
void bios_getmem(void);
extern u_int32_t bios_basemem; /* base memory in bytes */
extern u_int32_t bios_extmem; /* extended memory in bytes */
-extern vm_offset_t memtop;
+extern vm_offset_t memtop; /* last address of physical memory + 1 */
+extern vm_offset_t memtop_copyin; /* memtop less heap size for the cases */
+ /* when heap is at the top of extended memory */
+ /* for other cases - just the same as memtop */
int biospci_find_devclass(uint32_t class, int index);
int biospci_write_config(uint32_t locator, int offset, int width, int val);
==== //depot/projects/arm/src/sys/boot/i386/loader/main.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.35 2005/12/19 18:39:01 sobomax Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.36 2005/12/21 02:17:58 sobomax Exp $");
/*
* MD bootstrap main() and assorted miscellaneous
@@ -92,8 +92,9 @@
bios_getmem();
#ifdef LOADER_BZIP2_SUPPORT
- heap_top = PTOV(0x400000);
- heap_bottom = PTOV(0x100000);
+ heap_top = PTOV(memtop_copyin);
+ memtop_copyin -= 0x300000;
+ heap_bottom = PTOV(memtop_copyin);
#else
heap_top = (void *)bios_basemem;
heap_bottom = (void *)end;
==== //depot/projects/arm/src/sys/boot/pc98/libpc98/biosdisk.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/biosdisk.c,v 1.32 2005/05/08 14:17:28 nyan Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/biosdisk.c,v 1.33 2005/12/21 06:09:09 nyan Exp $");
/*
* BIOS disk device handling.
@@ -754,16 +754,18 @@
p = dest;
/* Decide whether we have to bounce */
- if (((VTOP(dest) >> 16) != (VTOP(dest + blks * BIOSDISK_SECSIZE) >> 16))) {
+ if (VTOP(dest) >> 20 != 0 ||
+ ((VTOP(dest) >> 16) != (VTOP(dest + blks * BIOSDISK_SECSIZE) >> 16))) {
/*
- * There is a 64k physical boundary somewhere in the destination buffer, so we have
+ * There is a 64k physical boundary somewhere in the destination buffer, or the
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list