PERFORCE change 110253 for review
Marcel Moolenaar
marcel at FreeBSD.org
Tue Nov 21 17:23:38 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=110253
Change 110253 by marcel at marcel_nfs on 2006/11/19 20:28:04
IFC @110251
Affected files ...
.. //depot/projects/uart/amd64/amd64/db_trace.c#13 integrate
.. //depot/projects/uart/amd64/amd64/intr_machdep.c#11 integrate
.. //depot/projects/uart/amd64/amd64/io_apic.c#10 integrate
.. //depot/projects/uart/amd64/amd64/machdep.c#24 integrate
.. //depot/projects/uart/amd64/amd64/msi.c#2 integrate
.. //depot/projects/uart/amd64/include/reg.h#3 integrate
.. //depot/projects/uart/arm/arm/nexus.c#7 integrate
.. //depot/projects/uart/arm/xscale/i80321/ep80219_machdep.c#3 integrate
.. //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#16 integrate
.. //depot/projects/uart/boot/arm/at91/boot0/Makefile#4 integrate
.. //depot/projects/uart/boot/arm/at91/boot0/arm_init.s#2 delete
.. //depot/projects/uart/boot/arm/at91/boot0iic/Makefile#3 integrate
.. //depot/projects/uart/boot/arm/at91/boot0iic/main.c#4 integrate
.. //depot/projects/uart/boot/arm/at91/boot0spi/Makefile#3 integrate
.. //depot/projects/uart/boot/arm/at91/boot0spi/main.c#4 integrate
.. //depot/projects/uart/boot/arm/at91/boot2/Makefile#2 integrate
.. //depot/projects/uart/boot/arm/at91/boot2/boot2.c#2 integrate
.. //depot/projects/uart/boot/arm/at91/bootiic/Makefile#5 integrate
.. //depot/projects/uart/boot/arm/at91/bootiic/arm_init.S#3 delete
.. //depot/projects/uart/boot/arm/at91/bootspi/Makefile#4 integrate
.. //depot/projects/uart/boot/arm/at91/bootspi/arm_init.S#3 delete
.. //depot/projects/uart/boot/arm/at91/libat91/arm_init.S#1 branch
.. //depot/projects/uart/boot/arm/at91/libat91/mci_device.c#3 delete
.. //depot/projects/uart/boot/i386/loader/main.c#10 integrate
.. //depot/projects/uart/boot/ia64/common/copy.c#2 integrate
.. //depot/projects/uart/boot/ia64/common/libia64.h#2 integrate
.. //depot/projects/uart/compat/linux/linux_emul.c#3 integrate
.. //depot/projects/uart/compat/linux/linux_getcwd.c#10 integrate
.. //depot/projects/uart/compat/linux/linux_misc.c#20 integrate
.. //depot/projects/uart/conf/NOTES#45 integrate
.. //depot/projects/uart/conf/files#77 integrate
.. //depot/projects/uart/conf/files.sun4v#3 integrate
.. //depot/projects/uart/ddb/db_watch.c#4 integrate
.. //depot/projects/uart/dev/ata/ata-all.c#24 integrate
.. //depot/projects/uart/dev/bce/if_bce.c#6 integrate
.. //depot/projects/uart/dev/bce/if_bcereg.h#7 integrate
.. //depot/projects/uart/dev/em/if_em.c#26 integrate
.. //depot/projects/uart/dev/em/if_em.h#22 integrate
.. //depot/projects/uart/dev/isp/isp.c#17 integrate
.. //depot/projects/uart/dev/isp/isp_library.c#7 integrate
.. //depot/projects/uart/dev/isp/isp_library.h#4 integrate
.. //depot/projects/uart/dev/isp/isp_pci.c#18 integrate
.. //depot/projects/uart/dev/isp/isp_stds.h#2 integrate
.. //depot/projects/uart/dev/isp/ispmbox.h#10 integrate
.. //depot/projects/uart/dev/isp/ispvar.h#15 integrate
.. //depot/projects/uart/dev/mfi/mfi.c#9 integrate
.. //depot/projects/uart/dev/mpt/mpt.c#21 integrate
.. //depot/projects/uart/dev/mpt/mpt.h#19 integrate
.. //depot/projects/uart/dev/mpt/mpt_cam.c#21 integrate
.. //depot/projects/uart/dev/mpt/mpt_pci.c#24 integrate
.. //depot/projects/uart/dev/nfe/if_nfe.c#4 integrate
.. //depot/projects/uart/dev/pci/pci.c#27 integrate
.. //depot/projects/uart/dev/syscons/syscons.c#18 integrate
.. //depot/projects/uart/dev/usb/uark.c#1 branch
.. //depot/projects/uart/dev/usb/usbdevs#28 integrate
.. //depot/projects/uart/fs/procfs/procfs_ioctl.c#6 integrate
.. //depot/projects/uart/gnu/fs/ext2fs/ext2_vfsops.c#7 integrate
.. //depot/projects/uart/i386/i386/db_trace.c#13 integrate
.. //depot/projects/uart/i386/i386/intr_machdep.c#9 integrate
.. //depot/projects/uart/i386/i386/io_apic.c#11 integrate
.. //depot/projects/uart/i386/i386/machdep.c#27 integrate
.. //depot/projects/uart/i386/i386/msi.c#2 integrate
.. //depot/projects/uart/i386/i386/pmap.c#45 integrate
.. //depot/projects/uart/i386/include/reg.h#4 integrate
.. //depot/projects/uart/ia64/ia64/genassym.c#10 integrate
.. //depot/projects/uart/ia64/ia64/interrupt.c#14 integrate
.. //depot/projects/uart/ia64/ia64/machdep.c#28 integrate
.. //depot/projects/uart/ia64/ia64/mp_machdep.c#12 integrate
.. //depot/projects/uart/ia64/include/kdb.h#4 integrate
.. //depot/projects/uart/ia64/include/pcpu.h#4 integrate
.. //depot/projects/uart/kern/kern_condvar.c#7 integrate
.. //depot/projects/uart/kern/kern_synch.c#19 integrate
.. //depot/projects/uart/kern/subr_sleepqueue.c#12 integrate
.. //depot/projects/uart/kern/sysv_msg.c#11 integrate
.. //depot/projects/uart/modules/Makefile#43 integrate
.. //depot/projects/uart/modules/uark/Makefile#1 branch
.. //depot/projects/uart/net/ethernet.h#3 integrate
.. //depot/projects/uart/net/if_ethersubr.c#19 integrate
.. //depot/projects/uart/nfsclient/nfs_node.c#14 integrate
.. //depot/projects/uart/nfsclient/nfs_vnops.c#20 integrate
.. //depot/projects/uart/sparc64/sparc64/autoconf.c#4 integrate
.. //depot/projects/uart/sparc64/sparc64/identcpu.c#6 integrate
.. //depot/projects/uart/sparc64/sparc64/mem.c#5 integrate
.. //depot/projects/uart/sun4v/conf/NOTES#3 integrate
.. //depot/projects/uart/sun4v/include/asmacros.h#2 integrate
.. //depot/projects/uart/sun4v/include/cache.h#2 integrate
.. //depot/projects/uart/sun4v/include/pcpu.h#2 integrate
.. //depot/projects/uart/sun4v/include/tte_hash.h#2 integrate
.. //depot/projects/uart/sun4v/sun4v/autoconf.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/clock.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/counter.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/db_disasm.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/eeprom.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/elf_machdep.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/exception.S#3 integrate
.. //depot/projects/uart/sun4v/sun4v/gdb_machdep.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/identcpu.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/in_cksum.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/interrupt.S#3 integrate
.. //depot/projects/uart/sun4v/sun4v/iommu.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/mem.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/ofw_bus.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/ofw_machdep.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/pmap.c#3 integrate
.. //depot/projects/uart/sun4v/sun4v/prof_machdep.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/rwindow.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/sys_machdep.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/tlb.c#2 delete
.. //depot/projects/uart/sun4v/sun4v/tte_hash.c#2 integrate
.. //depot/projects/uart/sys/sleepqueue.h#4 integrate
Differences ...
==== //depot/projects/uart/amd64/amd64/db_trace.c#13 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.76 2006/10/20 09:44:20 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.80 2006/11/17 20:27:00 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -200,10 +200,10 @@
static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t);
static void decode_syscall(int, struct thread *);
-static char * watchtype_str(int type);
+static const char * watchtype_str(int type);
int amd64_set_watch(int watchnum, unsigned long watchaddr, int size,
- int access, struct dbreg * d);
-int amd64_clr_watch(int watchnum, struct dbreg * d);
+ int access, struct dbreg *d);
+int amd64_clr_watch(int watchnum, struct dbreg *d);
/*
* Figure out how many arguments were passed into the frame at "fp".
@@ -536,21 +536,20 @@
unsigned long watchaddr;
int size;
int access;
- struct dbreg * d;
+ struct dbreg *d;
{
- int i;
- unsigned int mask;
-
+ int i, len;
+
if (watchnum == -1) {
- for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2)
- if ((d->dr[7] & mask) == 0)
+ for (i = 0; i < 4; i++)
+ if (!DBREG_DR7_ENABLED(d->dr[7], i))
break;
if (i < 4)
watchnum = i;
else
return (-1);
}
-
+
switch (access) {
case DBREG_DR7_EXEC:
size = 1; /* size must be 1 for an execution breakpoint */
@@ -558,29 +557,39 @@
case DBREG_DR7_WRONLY:
case DBREG_DR7_RDWR:
break;
- default : return (-1);
+ default:
+ return (-1);
}
-
+
/*
- * we can watch a 1, 2, or 4 byte sized location
+ * we can watch a 1, 2, 4, or 8 byte sized location
*/
switch (size) {
- case 1 : mask = 0x00; break;
- case 2 : mask = 0x01 << 2; break;
- case 4 : mask = 0x03 << 2; break;
- default : return (-1);
+ case 1:
+ len = DBREG_DR7_LEN_1;
+ break;
+ case 2:
+ len = DBREG_DR7_LEN_2;
+ break;
+ case 4:
+ len = DBREG_DR7_LEN_4;
+ break;
+ case 8:
+ len = DBREG_DR7_LEN_8;
+ break;
+ default:
+ return (-1);
}
- mask |= access;
-
/* clear the bits we are about to affect */
- d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
+ d->dr[7] &= ~DBREG_DR7_MASK(watchnum);
/* set drN register to the address, N=watchnum */
- DBREG_DRX(d,watchnum) = watchaddr;
+ DBREG_DRX(d, watchnum) = watchaddr;
/* enable the watchpoint */
- d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16));
+ d->dr[7] |= DBREG_DR7_SET(watchnum, len, access,
+ DBREG_DR7_GLOBAL_ENABLE);
return (watchnum);
}
@@ -589,15 +598,15 @@
int
amd64_clr_watch(watchnum, d)
int watchnum;
- struct dbreg * d;
+ struct dbreg *d;
{
if (watchnum < 0 || watchnum >= 4)
return (-1);
-
- d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
- DBREG_DRX(d,watchnum) = 0;
-
+
+ d->dr[7] &= ~DBREG_DR7_MASK(watchnum);
+ DBREG_DRX(d, watchnum) = 0;
+
return (0);
}
@@ -607,38 +616,38 @@
db_expr_t addr;
db_expr_t size;
{
- int avail, wsize;
- int i;
struct dbreg d;
-
+ int avail, i, wsize;
+
fill_dbregs(NULL, &d);
-
+
avail = 0;
- for(i=0; i<4; i++) {
- if ((d.dr[7] & (3 << (i*2))) == 0)
+ for(i = 0; i < 4; i++) {
+ if (!DBREG_DR7_ENABLED(d.dr[7], i))
avail++;
}
-
- if (avail*4 < size)
+
+ if (avail * 8 < size)
return (-1);
-
- for (i=0; i<4 && (size != 0); i++) {
- if ((d.dr[7] & (3<<(i*2))) == 0) {
- if (size > 4)
+
+ for (i = 0; i < 4 && (size > 0); i++) {
+ if (!DBREG_DR7_ENABLED(d.dr[7], i)) {
+ if (size >= 8 || (avail == 1 && size > 4))
+ wsize = 8;
+ else if (size > 2)
wsize = 4;
else
wsize = size;
- if (wsize == 3)
- wsize++;
- amd64_set_watch(i, addr, wsize,
+ amd64_set_watch(i, addr, wsize,
DBREG_DR7_WRONLY, &d);
addr += wsize;
size -= wsize;
+ avail--;
}
}
-
+
set_dbregs(NULL, &d);
-
+
return(0);
}
@@ -648,28 +657,27 @@
db_expr_t addr;
db_expr_t size;
{
+ struct dbreg d;
int i;
- struct dbreg d;
fill_dbregs(NULL, &d);
- for(i=0; i<4; i++) {
- if (d.dr[7] & (3 << (i*2))) {
- if ((DBREG_DRX((&d), i) >= addr) &&
+ for(i = 0; i < 4; i++) {
+ if (DBREG_DR7_ENABLED(d.dr[7], i)) {
+ if ((DBREG_DRX((&d), i) >= addr) &&
(DBREG_DRX((&d), i) < addr+size))
amd64_clr_watch(i, &d);
-
+
}
}
-
+
set_dbregs(NULL, &d);
-
+
return(0);
}
-static
-char *
+static const char *
watchtype_str(type)
int type;
{
@@ -685,30 +693,33 @@
void
db_md_list_watchpoints()
{
- int i;
struct dbreg d;
+ int i, len, type;
fill_dbregs(NULL, &d);
db_printf("\nhardware watchpoints:\n");
- db_printf(" watch status type len address\n");
- db_printf(" ----- -------- ---------- --- ----------\n");
- for (i=0; i<4; i++) {
- if (d.dr[7] & (0x03 << (i*2))) {
- unsigned type, len;
- type = (d.dr[7] >> (16+(i*4))) & 3;
- len = (d.dr[7] >> (16+(i*4)+2)) & 3;
- db_printf(" %-5d %-8s %10s %3d 0x%016lx\n",
- i, "enabled", watchtype_str(type),
- len + 1, DBREG_DRX((&d), i));
- }
- else {
+ db_printf(" watch status type len address\n");
+ db_printf(" ----- -------- ---------- --- ------------------\n");
+ for (i = 0; i < 4; i++) {
+ if (DBREG_DR7_ENABLED(d.dr[7], i)) {
+ type = DBREG_DR7_ACCESS(d.dr[7], i);
+ len = DBREG_DR7_LEN(d.dr[7], i);
+ if (len == DBREG_DR7_LEN_8)
+ len = 8;
+ else
+ len++;
+ db_printf(" %-5d %-8s %10s %3d ",
+ i, "enabled", watchtype_str(type), len);
+ db_printsym((db_addr_t)DBREG_DRX((&d), i), DB_STGY_ANY);
+ db_printf("\n");
+ } else {
db_printf(" %-5d disabled\n", i);
}
}
-
+
db_printf("\ndebug register values:\n");
- for (i=0; i<8; i++) {
+ for (i = 0; i < 8; i++) {
db_printf(" dr%d 0x%016lx\n", i, DBREG_DRX((&d), i));
}
db_printf("\n");
==== //depot/projects/uart/amd64/amd64/intr_machdep.c#11 (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/amd64/intr_machdep.c,v 1.25 2006/10/16 21:40:46 jhb Exp $
+ * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.26 2006/11/17 16:41:03 jhb Exp $
*/
/*
@@ -446,10 +446,6 @@
current_cpu++;
if (current_cpu >= num_cpus)
current_cpu = 0;
- if (bootverbose) {
- printf("INTR: Assigning IRQ %d", pic->pic_vector(isrc));
- printf(" to local APIC %u\n", apic_id);
- }
pic->pic_assign_cpu(isrc, apic_id);
}
@@ -483,7 +479,7 @@
if (num_cpus <= 1)
return;
- /* Round-robin assign each enabled source a CPU. */
+ /* Round-robin assign a CPU to each enabled source. */
mtx_lock_spin(&intr_table_lock);
assign_cpu = 1;
for (i = 0; i < NUM_IO_INTS; i++) {
==== //depot/projects/uart/amd64/amd64/io_apic.c#10 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.25 2006/10/10 23:23:11 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.26 2006/11/17 16:41:03 jhb Exp $");
#include "opt_isa.h"
@@ -512,13 +512,6 @@
* be routed to other CPUs later after they are enabled.
*/
intpin->io_cpu = PCPU_GET(apic_id);
- if (bootverbose && intpin->io_irq != IRQ_DISABLED) {
- printf("ioapic%u: intpin %d -> ", io->io_id, i);
- ioapic_print_irq(intpin);
- printf(" (%s, %s)\n", intpin->io_edgetrigger ?
- "edge" : "level", intpin->io_activehi ? "high" :
- "low");
- }
value = ioapic_read(apic, IOAPIC_REDTBL_LO(i));
ioapic_write(apic, IOAPIC_REDTBL_LO(i), value | IOART_INTMSET);
}
@@ -583,6 +576,8 @@
return (EINVAL);
if (io->io_pins[pin].io_irq >= NUM_IO_INTS)
return (EINVAL);
+ if (io->io_pins[pin].io_bus == bus_type)
+ return (0);
io->io_pins[pin].io_bus = bus_type;
if (bootverbose)
printf("ioapic%u: intpin %d bus %s\n", io->io_id, pin,
@@ -666,13 +661,17 @@
ioapic_set_polarity(void *cookie, u_int pin, enum intr_polarity pol)
{
struct ioapic *io;
+ int activehi;
io = (struct ioapic *)cookie;
if (pin >= io->io_numintr || pol == INTR_POLARITY_CONFORM)
return (EINVAL);
if (io->io_pins[pin].io_irq >= NUM_IO_INTS)
return (EINVAL);
- io->io_pins[pin].io_activehi = (pol == INTR_POLARITY_HIGH);
+ activehi = (pol == INTR_POLARITY_HIGH);
+ if (io->io_pins[pin].io_activehi == activehi)
+ return (0);
+ io->io_pins[pin].io_activehi = activehi;
if (bootverbose)
printf("ioapic%u: intpin %d polarity: %s\n", io->io_id, pin,
pol == INTR_POLARITY_HIGH ? "high" : "low");
@@ -683,13 +682,17 @@
ioapic_set_triggermode(void *cookie, u_int pin, enum intr_trigger trigger)
{
struct ioapic *io;
+ int edgetrigger;
io = (struct ioapic *)cookie;
if (pin >= io->io_numintr || trigger == INTR_TRIGGER_CONFORM)
return (EINVAL);
if (io->io_pins[pin].io_irq >= NUM_IO_INTS)
- return (EINVAL);
- io->io_pins[pin].io_edgetrigger = (trigger == INTR_TRIGGER_EDGE);
+ return (EINVAL);
+ edgetrigger = (trigger == INTR_TRIGGER_EDGE);
+ if (io->io_pins[pin].io_edgetrigger == edgetrigger)
+ return (0);
+ io->io_pins[pin].io_edgetrigger = edgetrigger;
if (bootverbose)
printf("ioapic%u: intpin %d trigger: %s\n", io->io_id, pin,
trigger == INTR_TRIGGER_EDGE ? "edge" : "level");
==== //depot/projects/uart/amd64/amd64/machdep.c#24 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.660 2006/11/07 21:57:18 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.663 2006/11/17 20:27:01 jhb Exp $");
#include "opt_atalk.h"
#include "opt_atpic.h"
@@ -1692,7 +1692,6 @@
{
struct pcb *pcb;
int i;
- u_int64_t mask1, mask2;
if (td == NULL) {
load_dr0(dbregs->dr[0]);
@@ -1709,10 +1708,13 @@
* TRCTRAP or a general protection fault right here.
* Upper bits of dr6 and dr7 must not be set
*/
- for (i = 0, mask1 = 0x3<<16, mask2 = 0x2<<16; i < 8;
- i++, mask1 <<= 2, mask2 <<= 2)
- if ((dbregs->dr[7] & mask1) == mask2)
+ for (i = 0; i < 4; i++) {
+ if (DBREG_DR7_ACCESS(dbregs->dr[7], i) == 0x02)
+ return (EINVAL);
+ if (td->td_frame->tf_cs == _ucode32sel &&
+ DBREG_DR7_LEN(dbregs->dr[7], i) == DBREG_DR7_LEN_8)
return (EINVAL);
+ }
if ((dbregs->dr[6] & 0xffffffff00000000ul) != 0 ||
(dbregs->dr[7] & 0xffffffff00000000ul) != 0)
return (EINVAL);
@@ -1733,22 +1735,22 @@
* from within kernel mode?
*/
- if (dbregs->dr[7] & 0x3) {
+ if (DBREG_DR7_ENABLED(dbregs->dr[7], 0)) {
/* dr0 is enabled */
if (dbregs->dr[0] >= VM_MAXUSER_ADDRESS)
return (EINVAL);
}
- if (dbregs->dr[7] & 0x3<<2) {
+ if (DBREG_DR7_ENABLED(dbregs->dr[7], 1)) {
/* dr1 is enabled */
if (dbregs->dr[1] >= VM_MAXUSER_ADDRESS)
return (EINVAL);
}
- if (dbregs->dr[7] & 0x3<<4) {
+ if (DBREG_DR7_ENABLED(dbregs->dr[7], 2)) {
/* dr2 is enabled */
if (dbregs->dr[2] >= VM_MAXUSER_ADDRESS)
return (EINVAL);
}
- if (dbregs->dr[7] & 0x3<<6) {
+ if (DBREG_DR7_ENABLED(dbregs->dr[7], 3)) {
/* dr3 is enabled */
if (dbregs->dr[3] >= VM_MAXUSER_ADDRESS)
return (EINVAL);
@@ -1832,9 +1834,8 @@
addr[nbp++] = (caddr_t)rdr3();
}
- for (i=0; i<nbp; i++) {
- if (addr[i] <
- (caddr_t)VM_MAXUSER_ADDRESS) {
+ for (i = 0; i < nbp; i++) {
+ if (addr[i] < (caddr_t)VM_MAXUSER_ADDRESS) {
/*
* addr[i] is in user space
*/
==== //depot/projects/uart/amd64/amd64/msi.c#2 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.1 2006/11/13 22:23:32 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -315,7 +315,7 @@
/* We need count - cnt more sources starting at index 'cnt'. */
*newirq = cnt;
*newcount = count - cnt;
- for (j = 0; j < *newirq; j++) {
+ for (j = 0; j < *newcount; j++) {
/* Create a new MSI source. */
msi = malloc(sizeof(struct msi_intsrc), M_MSI,
==== //depot/projects/uart/amd64/include/reg.h#3 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)reg.h 5.5 (Berkeley) 1/18/91
- * $FreeBSD: src/sys/amd64/include/reg.h,v 1.35 2004/04/05 23:55:14 imp Exp $
+ * $FreeBSD: src/sys/amd64/include/reg.h,v 1.38 2006/11/17 20:27:01 jhb Exp $
*/
#ifndef _MACHINE_REG_H_
@@ -92,11 +92,26 @@
/* Index 8-15: reserved */
};
-#define DBREG_DR7_EXEC 0x00 /* break on execute */
-#define DBREG_DR7_WRONLY 0x01 /* break on write */
-#define DBREG_DR7_RDWR 0x03 /* break on read or write */
-#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by
- register number */
+#define DBREG_DR7_LOCAL_ENABLE 0x01
+#define DBREG_DR7_GLOBAL_ENABLE 0x02
+#define DBREG_DR7_LEN_1 0x00 /* 1 byte length */
+#define DBREG_DR7_LEN_2 0x01
+#define DBREG_DR7_LEN_4 0x03
+#define DBREG_DR7_LEN_8 0x02
+#define DBREG_DR7_EXEC 0x00 /* break on execute */
+#define DBREG_DR7_WRONLY 0x01 /* break on write */
+#define DBREG_DR7_RDWR 0x03 /* break on read or write */
+#define DBREG_DR7_MASK(i) ((u_long)0xf << ((i) * 4 + 16) | 0x3 << (i) * 2)
+#define DBREG_DR7_SET(i, len, access, enable) \
+ ((u_long)((len) << 2 | (access)) << ((i) * 4 + 16) | (enable) << (i) * 2)
+#define DBREG_DR7_GD 0x2000
+#define DBREG_DR7_ENABLED(d, i) (((d) & 0x3 << (i) * 2) != 0)
+#define DBREG_DR7_ACCESS(d, i) ((d) >> ((i) * 4 + 16) & 0x3)
+#define DBREG_DR7_LEN(d, i) ((d) >> ((i) * 4 + 18) & 0x3)
+
+#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by
+ register number */
+
#ifdef _KERNEL
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
==== //depot/projects/uart/arm/arm/nexus.c#7 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.9 2006/10/25 21:11:46 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.10 2006/11/17 11:56:56 cognet Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -142,7 +142,7 @@
int i;
for (i = rman_get_start(r); i <= rman_get_end(r); i++)
- arm_mask_irq(rman_get_start(r));
+ arm_mask_irq(i);
error = arm_remove_irqhandler(ih);
return (error);
}
==== //depot/projects/uart/arm/xscale/i80321/ep80219_machdep.c#3 (text+ko) ====
@@ -49,7 +49,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.3 2006/10/26 21:42:17 jb Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.4 2006/11/17 00:53:39 kevlo Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -474,7 +474,6 @@
/* Do basic tuning, hz etc */
init_param1();
init_param2(physmem);
- avail_end = 0xa0000000 + memsize - 1;
kdb_init();
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
sizeof(struct pcb)));
==== //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#16 (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.24 2006/10/26 21:42:17 jb Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.25 2006/11/17 00:53:39 kevlo Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -477,7 +477,6 @@
/* Do basic tuning, hz etc */
init_param1();
init_param2(physmem);
- avail_end = 0xa0000000 + memsize - 1;
kdb_init();
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
sizeof(struct pcb)));
==== //depot/projects/uart/boot/arm/at91/boot0/Makefile#4 (text) ====
@@ -1,11 +1,14 @@
-# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.4 2006/08/18 20:26:54 imp Exp $
+# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.5 2006/11/16 00:53:27 imp Exp $
+
+.PATH: ${.CURDIR}/../libat91
P=boot0
FILES=${P}
-SRCS=arm_init.s main.c
+SRCS=arm_init.S main.c
NO_MAN=
LDFLAGS=-e 0 -T ${.CURDIR}/linker.cfg
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.include <bsd.prog.mk>
+CFLAGS+=-DBOOT_BOOT0
==== //depot/projects/uart/boot/arm/at91/boot0iic/Makefile#3 (text) ====
@@ -1,12 +1,14 @@
-# $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.2 2006/08/16 23:14:52 imp Exp $
+# $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.3 2006/11/16 00:53:27 imp Exp $
-.PATH: ${.CURDIR}/../boot0
+.PATH: ${.CURDIR}/../libat91
P=boot0iic
FILES=${P}
-SRCS=arm_init.s main.c
+SRCS=arm_init.S main.c
NO_MAN=
LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.include <bsd.prog.mk>
+
+CFLAGS+=-DBOOT_BOOT0
==== //depot/projects/uart/boot/arm/at91/boot0iic/main.c#4 (text) ====
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.3 2006/11/09 19:55:25 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.4 2006/11/16 00:49:50 imp Exp $
*/
#include "at91rm9200.h"
@@ -32,12 +32,19 @@
main(void)
{
char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */
+ int len, sec;
- while (xmodem_rx(addr) == -1)
+ printf("\nSend data to be written into EEPROM\n");
+ while ((len = xmodem_rx(addr)) == -1)
+ continue;
+ sec = GetSeconds() + 1;
+ while (sec >= GetSeconds())
continue;
+ printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr,
+ len);
InitEEPROM();
- printf("Writing EEPROM from 0x%x to addr 0\n", addr);
- WriteEEPROM(0, addr, 8192);
- printf("Write complete. Press reset\n");
+ printf("init done\n");
+ WriteEEPROM(0, addr, len);
+ printf("\nWrote %d bytes. Press reset\n", len);
return (1);
}
==== //depot/projects/uart/boot/arm/at91/boot0spi/Makefile#3 (text) ====
@@ -1,13 +1,14 @@
-# $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.2 2006/08/16 23:18:07 imp Exp $
+# $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.3 2006/11/16 00:53:27 imp Exp $
-.PATH: ${.CURDIR}/../boot0
+.PATH: ${.CURDIR}/../libat91
P=boot0spi
FILES=${P}
-SRCS=arm_init.s main.c
+SRCS=arm_init.S main.c
NO_MAN=
LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.include <bsd.prog.mk>
+CFLAGS+=-DBOOT_BOOT0
==== //depot/projects/uart/boot/arm/at91/boot0spi/main.c#4 (text) ====
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.3 2006/10/21 22:43:07 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.4 2006/11/16 00:48:53 imp Exp $
*/
#include "at91rm9200.h"
@@ -29,21 +29,23 @@
#include "at91rm9200_lowlevel.h"
#include "spi_flash.h"
-#define OFFSET 0
+#define LOADER_OFFSET 0
+#define FPGA_OFFSET (15 * FLASH_PAGE_SIZE)
+#define OFFSET LOADER_OFFSET
int
main(void)
{
int len, i, j, off;
- char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */
- char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* Load to base + 2MB */
- char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* Load to base + 2MB */
+ char *addr = (char *)SDRAM_BASE + (1 << 20); /* download at + 1MB */
+ char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* readback to + 2MB */
+ char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* extra copy at + 3MB */
SPI_InitFlash();
printf("Waiting for data\n");
while ((len = xmodem_rx(addr)) == -1)
continue;
- printf("\nDownloaded %u bytes.\n", len);
+ // Need extra copy at addr3
memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE);
printf("Writing %u bytes to flash at %u\n", len, OFFSET);
for (i = 0; i < len; i+= FLASH_PAGE_SIZE) {
@@ -57,5 +59,6 @@
if (j >= 10)
printf("Bad Readback at %u\n", i);
}
+ printf("Done\n");
return (1);
}
==== //depot/projects/uart/boot/arm/at91/boot2/Makefile#2 (text+ko) ====
@@ -1,19 +1,16 @@
-# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.2 2006/11/09 20:07:26 imp Exp $
+# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.3 2006/11/16 00:48:04 imp Exp $
-.PATH: ${.CURDIR}/../libat91
+.PATH: ${.CURDIR}/../libat91 ${.CURDIR}/../bootspi
P=boot2
FILES=${P}
-SRCS=arm_init.S boot2.c ${BOOT_FLAVOR}_board.c
+SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:L}_board.c
NO_MAN=
LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.include <bsd.prog.mk>
-.if ${BOOT_FLAVOR} == "tsc"
-SRCS+=ee.c
-.endif
.if ${BOOT_FLAVOR} == "kb920x"
CFLAGS+=-DBOOT_IIC
.endif
==== //depot/projects/uart/boot/arm/at91/boot2/boot2.c#2 (text+ko) ====
@@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.2 2006/11/09 20:07:26 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.3 2006/11/16 00:47:31 imp Exp $");
#include <sys/param.h>
#include <sys/disklabel.h>
@@ -29,7 +29,6 @@
#include "emac.h"
#include "lib.h"
#include "sd-card.h"
-#include "ee.h"
#include "board.h"
#define RBX_ASKNAME 0x0 /* -a */
==== //depot/projects/uart/boot/arm/at91/bootiic/Makefile#5 (text) ====
@@ -1,6 +1,6 @@
-# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.4 2006/11/09 20:23:51 imp Exp $
+# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.5 2006/11/16 00:53:27 imp Exp $
-.PATH: ${.CURDIR}/../libat91
+.PATH: ${.CURDIR}/../libat91
P=bootiic
FILES=${P}
@@ -11,4 +11,4 @@
.include <bsd.prog.mk>
-CFLAGS += -DBOOT_IIC
+CFLAGS += -DBOOT_IIC -DBOOT_COMMANDS
==== //depot/projects/uart/boot/arm/at91/bootspi/Makefile#4 (text) ====
@@ -1,6 +1,6 @@
-# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.5 2006/11/09 20:45:22 imp Exp $
+# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.6 2006/11/16 00:53:27 imp Exp $
-.PATH: ${.CURDIR}/../libat91
+.PATH: ${.CURDIR}/../libat91
P=bootspi
FILES=${P}
@@ -14,3 +14,4 @@
.if ${MK_FPGA} == "yes"
CFLAGS += -DTSC_FPGA
.endif
+CFLAGS += -DBOOT_COMMANDS
==== //depot/projects/uart/boot/i386/loader/main.c#10 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.38 2006/11/02 01:23:18 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.39 2006/11/16 13:32:30 ru Exp $");
/*
* MD bootstrap main() and assorted miscellaneous
@@ -191,7 +191,7 @@
extract_currdev(void)
{
struct i386_devdesc new_currdev;
- int major, biosdev = -1;
+ int biosdev = -1;
/* Assume we are booting from a BIOS disk by default */
new_currdev.d_dev = &biosdisk;
@@ -222,7 +222,6 @@
B_CONTROLLER(initial_bootdev) - 1;
new_currdev.d_kind.biosdisk.partition = B_PARTITION(initial_bootdev);
biosdev = initial_bootinfo->bi_bios_dev;
- major = B_TYPE(initial_bootdev);
/*
* If we are booted by an old bootstrap, we have to guess at the BIOS
==== //depot/projects/uart/boot/ia64/common/copy.c#2 (text+ko) ====
@@ -25,18 +25,13 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ia64/common/copy.c,v 1.8 2006/11/05 22:03:03 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ia64/common/copy.c,v 1.9 2006/11/19 20:04:11 marcel Exp $");
#include <stand.h>
#include <ia64/include/vmparam.h>
#include "libia64.h"
-#define LDR_LOG2_PGSZ 20
-
-uint64_t *ia64_pgtbl;
-uint32_t ia64_pgtblsz;
-
static void *
va2pa(vm_offset_t va, size_t *len)
{
==== //depot/projects/uart/boot/ia64/common/libia64.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/boot/ia64/common/libia64.h,v 1.1 2006/11/05 22:03:03 marcel Exp $
+ * $FreeBSD: src/sys/boot/ia64/common/libia64.h,v 1.2 2006/11/19 20:04:11 marcel Exp $
*/
#ifndef _LIBIA64_H_
@@ -45,9 +45,6 @@
* and shared by all loader implementations.
*/
-extern uint64_t *ia64_pgtbl;
-extern uint32_t ia64_pgtblsz;
-
extern int ia64_autoload(void);
extern ssize_t ia64_copyin(const void *, vm_offset_t, size_t);
==== //depot/projects/uart/compat/linux/linux_emul.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list