From owner-p4-projects@FreeBSD.ORG Sun Nov 21 00:02:51 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 232D216A4D0; Sun, 21 Nov 2004 00:02:51 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF2DC16A4CE for ; Sun, 21 Nov 2004 00:02:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A85BD43D31 for ; Sun, 21 Nov 2004 00:02:50 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAL02oOY006268 for ; Sun, 21 Nov 2004 00:02:50 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAL02oA7006265 for perforce@freebsd.org; Sun, 21 Nov 2004 00:02:50 GMT (envelope-from marcel@freebsd.org) Date: Sun, 21 Nov 2004 00:02:50 GMT Message-Id: <200411210002.iAL02oA7006265@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 65588 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2004 00:02:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=65588 Change 65588 by marcel@marcel_nfs on 2004/11/21 00:01:57 IFC @65587 Affected files ... .. //depot/projects/uart/arm/arm/exception.S#2 integrate .. //depot/projects/uart/arm/arm/undefined.c#2 integrate .. //depot/projects/uart/arm/arm/vm_machdep.c#4 integrate .. //depot/projects/uart/arm/include/cpufunc.h#3 integrate .. //depot/projects/uart/arm/include/db_machdep.h#2 integrate .. //depot/projects/uart/arm/include/param.h#5 integrate .. //depot/projects/uart/arm/sa11x0/assabet_machdep.c#3 integrate .. //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#5 integrate .. //depot/projects/uart/dev/ic/ns16550.h#4 integrate .. //depot/projects/uart/dev/ic/sab82532.h#1 branch .. //depot/projects/uart/dev/ic/z8530.h#1 branch .. //depot/projects/uart/dev/uart/uart_dev_ns8250.c#33 integrate .. //depot/projects/uart/geom/uzip/g_uzip.c#2 integrate .. //depot/projects/uart/kern/kern_fork.c#9 integrate .. //depot/projects/uart/kern/kern_kse.c#2 integrate .. //depot/projects/uart/kern/kern_proc.c#9 integrate .. //depot/projects/uart/kern/kern_switch.c#5 integrate .. //depot/projects/uart/kern/kern_thr.c#5 integrate .. //depot/projects/uart/kern/kern_thread.c#13 integrate .. //depot/projects/uart/modules/sio/Makefile#2 integrate .. //depot/projects/uart/modules/uart/Makefile#12 integrate Differences ... ==== //depot/projects/uart/arm/arm/exception.S#2 (text+ko) ==== @@ -51,7 +51,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/exception.S,v 1.3 2004/09/23 22:05:39 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/exception.S,v 1.4 2004/11/20 16:52:30 cognet Exp $"); .text .align 0 @@ -206,122 +206,6 @@ * look like direct entry from the vector. */ ASENTRY_NP(undefined_entry) -#ifdef IPKDB -/* - * IPKDB must be hooked in at the earliest possible entry point. - * - */ -/* - * Make room for all registers saving real r0-r7 and r15. - * The remaining registers are updated later. - */ - stmfd sp!, {r0,r1} /* psr & spsr */ - stmfd sp!, {lr} /* pc */ - stmfd sp!, {r0-r14} /* r0-r7, r8-r14 */ -/* - * Get previous psr. - */ - mrs r7, cpsr_all - mrs r0, spsr_all - str r0, [sp, #(16*4)] -/* - * Test for user mode. - */ - tst r0, #0xf - bne .Lprenotuser_push - add r1, sp, #(8*4) - stmia r1,{r8-r14}^ /* store user mode r8-r14*/ - b .Lgoipkdb -/* - * Switch to previous mode to get r8-r13. - */ -.Lprenotuser_push: - orr r0, r0, #(I32_bit) /* disable interrupts */ - msr cpsr_all, r0 - mov r1, r8 - mov r2, r9 - mov r3, r10 - mov r4, r11 - mov r5, r12 - mov r6, r13 - msr cpsr_all, r7 /* back to undefined mode */ - add r8, sp, #(8*4) - stmia r8, {r1-r6} /* r8-r13 */ -/* - * Now back to previous mode to get r14 and spsr. - */ - msr cpsr_all, r0 - mov r1, r14 - mrs r2, spsr - msr cpsr_all, r7 /* back to undefined mode */ - str r1, [sp, #(14*4)] /* r14 */ - str r2, [sp, #(17*4)] /* spsr */ -/* - * Now to IPKDB. - */ -.Lgoipkdb: - mov r0, sp - bl _C_LABEL(ipkdb_trap_glue) - ldr r1, .Lipkdb_trap_return - str r0,[r1] - -/* - * Have to load all registers from the stack. - * - * Start with spsr and pc. - */ - ldr r0, [sp, #(16*4)] /* spsr */ - ldr r1, [sp, #(15*4)] /* r15 */ - msr spsr_all, r0 - mov r14, r1 -/* - * Test for user mode. - */ - tst r0, #0xf - bne .Lprenotuser_pull - add r1, sp, #(8*4) - ldmia r1, {r8-r14}^ /* load user mode r8-r14 */ - b .Lpull_r0r7 -.Lprenotuser_pull: -/* - * Now previous mode spsr and r14. - */ - ldr r1, [sp, #(17*4)] /* spsr */ - ldr r2, [sp, #(14*4)] /* r14 */ - orr r0, r0, #(I32_bit) - msr cpsr_all, r0 /* switch to previous mode */ - msr spsr_all, r1 - mov r14, r2 - msr cpsr_all, r7 /* back to undefined mode */ -/* - * Now r8-r13. - */ - add r8, sp, #(8*4) - ldmia r8, {r1-r6} /* r8-r13 */ - msr cpsr_all, r0 - mov r8, r1 - mov r9, r2 - mov r10, r3 - mov r11, r4 - mov r12, r5 - mov r13, r6 - msr cpsr_all, r7 -.Lpull_r0r7: -/* - * Now the rest of the registers. - */ - ldr r1,Lipkdb_trap_return - ldr r0,[r1] - tst r0,r0 - ldmfd sp!, {r0-r7} /* r0-r7 */ - add sp, sp, #(10*4) /* adjust sp */ - -/* - * Did IPKDB handle it? - */ - movnes pc, lr /* return */ - -#endif stmfd sp!, {r0, r1} ldr r0, Lundefined_handler_indirection ldr r1, [sp], #0x0004 @@ -330,10 +214,6 @@ str r1, [r0, #0x0004] ldmia r0, {r0, r1, pc} -#ifdef IPKDB -Lipkdb_trap_return: - .word Lipkdb_trap_return_data -#endif Lundefined_handler_indirection: .word Lundefined_handler_indirection_data ==== //depot/projects/uart/arm/arm/undefined.c#2 (text+ko) ==== @@ -46,7 +46,7 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.1 2004/05/14 11:46:42 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.2 2004/11/20 16:52:10 cognet Exp $"); #include #include @@ -60,6 +60,9 @@ #include #include #include +#ifdef KDB +#include +#endif #ifdef FAST_FPE #include #endif @@ -188,6 +191,7 @@ enable_interrupts(I32_bit); frame->tf_pc -= INSN_SIZE; + atomic_add_int(&cnt.v_trap, 1); fault_pc = frame->tf_pc; @@ -251,13 +255,30 @@ fault_code) == 0) break; - if (uh == NULL) { + if (uh == NULL && (fault_code & FAULT_USER)) { /* Fault has not been handled */ trapsignal(td, SIGILL, 0); } - if ((fault_code & FAULT_USER) == 0) + if ((fault_code & FAULT_USER) == 0) { + if (fault_instruction == KERNEL_BREAKPOINT) { +#ifdef KDB + kdb_trap(0, 0, frame); +#else + printf("No debugger in kernel.\n"); +#endif + frame->tf_pc += 4; return; + } else { +#ifdef KDB + printf("Undefined instruction in kernel.\n"); + kdb_trap(0, 0, frame); +#else + panic("Undefined instruction in kernel.\n"); +#endif + } + + } #ifdef FAST_FPE /* Optimised exit code */ ==== //depot/projects/uart/arm/arm/vm_machdep.c#4 (text+ko) ==== @@ -81,7 +81,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.7 2004/11/20 02:31:23 das Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.8 2004/11/20 16:51:32 cognet Exp $"); #include #include @@ -145,7 +145,6 @@ struct trapframe *tf; struct switchframe *sf; struct mdproc *mdp2; - vm_offset_t uarea = td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE; pcb1 = td1->td_pcb; pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; @@ -156,8 +155,8 @@ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); mdp2 = &p2->p_md; bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); - pcb2->un_32.pcb32_und_sp = uarea + USPACE_UNDEF_STACK_TOP; - pcb2->un_32.pcb32_sp = uarea + + pcb2->un_32.pcb32_und_sp = td2->td_kstack + USPACE_UNDEF_STACK_TOP; + pcb2->un_32.pcb32_sp = td2->td_kstack + USPACE_SVC_STACK_TOP - sizeof(*pcb2); pmap_activate(td2); td2->td_frame = tf = ==== //depot/projects/uart/arm/include/cpufunc.h#3 (text+ko) ==== @@ -38,7 +38,7 @@ * * Prototypes for cpu, mmu and tlb related functions. * - * $FreeBSD: src/sys/arm/include/cpufunc.h,v 1.4 2004/11/04 19:18:50 cognet Exp $ + * $FreeBSD: src/sys/arm/include/cpufunc.h,v 1.5 2004/11/20 16:52:09 cognet Exp $ */ #ifndef _MACHINE_CPUFUNC_H_ @@ -53,6 +53,7 @@ static __inline void breakpoint(void) { + __asm(".word 0xe7ffffff"); } struct cpu_functions { ==== //depot/projects/uart/arm/include/db_machdep.h#2 (text+ko) ==== @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: FreeBSD: src/sys/i386/include/db_machdep.h,v 1.16 1999/10/04 - * $FreeBSD: src/sys/arm/include/db_machdep.h,v 1.2 2004/07/12 21:25:01 cognet Exp $ + * $FreeBSD: src/sys/arm/include/db_machdep.h,v 1.3 2004/11/20 16:52:09 cognet Exp $ */ #ifndef _MACHINE_DB_MACHDEP_H_ @@ -47,7 +47,7 @@ #define BKPT_SET(inst) (BKPT_INST) #define BKPT_SKIP do { \ - kdb_frame->tf_pc -= BKPT_SIZE; \ + kdb_frame->tf_pc += BKPT_SIZE; \ } while (0) #define db_clear_single_step(regs) @@ -56,9 +56,25 @@ #define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT) #define IS_WATCHPOINT_TRAP(type, code) (0) + #define inst_trap_return(ins) (0) -#define inst_return(ins) (0) -#define inst_call(ins) (0) +/* ldmxx reg, {..., pc} + 01800000 stack mode + 000f0000 register + 0000ffff register list */ +/* mov pc, reg + 0000000f register */ +#define inst_return(ins) (((ins) & 0x0e108000) == 0x08108000 || \ + ((ins) & 0x0ff0fff0) == 0x01a0f000) +/* bl ... + 00ffffff offset>>2 */ +#define inst_call(ins) (((ins) & 0x0f000000) == 0x0b000000) +/* b ... + 00ffffff offset>>2 */ +/* ldr pc, [pc, reg, lsl #2] + 0000000f register */ + + #define inst_load(ins) (0) #define inst_store(ins) (0) ==== //depot/projects/uart/arm/include/param.h#5 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)param.h 5.8 (Berkeley) 6/28/91 - * $FreeBSD: src/sys/arm/include/param.h,v 1.8 2004/11/20 02:31:37 das Exp $ + * $FreeBSD: src/sys/arm/include/param.h,v 1.9 2004/11/20 16:51:32 cognet Exp $ */ /* @@ -106,7 +106,7 @@ #define KSTACK_GUARD_PAGES 1 #endif /* !KSTACK_GUARD_PAGES */ -#define USPACE_SVC_STACK_TOP 0 +#define USPACE_SVC_STACK_TOP KSTACK_PAGES * PAGE_SIZE #define USPACE_SVC_STACK_BOTTOM (USPACE_SVC_STACK_TOP - 0x1000) #define USPACE_UNDEF_STACK_TOP (USPACE_SVC_STACK_BOTTOM - 0x10) #define USPACE_UNDEF_STACK_BOTTOM (FPCONTEXTSIZE + 10) ==== //depot/projects/uart/arm/sa11x0/assabet_machdep.c#3 (text+ko) ==== @@ -47,7 +47,7 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.6 2004/11/20 02:29:24 das Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.7 2004/11/20 16:51:32 cognet Exp $"); #include "opt_md.h" @@ -417,5 +417,6 @@ init_param2(physmem); kdb_init(); avail_end = 0xc0000000 + 0x02000000 - 1; - return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP)); + return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - + sizeof(struct pcb))); } ==== //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#5 (text+ko) ==== @@ -48,7 +48,7 @@ #include "opt_msgbuf.h" #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.4 2004/11/20 02:29:24 das Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.5 2004/11/20 16:51:32 cognet Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -432,5 +432,6 @@ init_param2(physmem); avail_end = 0xa0000000 + memsize - 1; kdb_init(); - return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP)); + return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - + sizeof(struct pcb))); } ==== //depot/projects/uart/dev/ic/ns16550.h#4 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)ns16550.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/dev/ic/ns16550.h,v 1.15 2004/04/07 20:45:57 imp Exp $ + * $FreeBSD: src/sys/dev/ic/ns16550.h,v 1.16 2004/11/20 23:19:42 marcel Exp $ */ /* @@ -37,17 +37,17 @@ /* 8250 registers #[0-6]. */ #define com_data 0 /* data register (R/W) */ -#define com_thr com_data /* transmitter holding register (W) */ -#define com_rhr com_data /* receiver holding register (R) */ +#define REG_DATA com_data #define com_ier 1 /* interrupt enable register (W) */ +#define REG_IER com_ier #define IER_ERXRDY 0x1 #define IER_ETXRDY 0x2 #define IER_ERLS 0x4 #define IER_EMSC 0x8 #define com_iir 2 /* interrupt identification register (R) */ -#define com_isr com_iir /* interrupt status register (R) */ +#define REG_IIR com_iir #define IIR_IMASK 0xf #define IIR_RXTOUT 0xc #define IIR_RLS 0x6 @@ -58,36 +58,52 @@ #define IIR_FIFO_MASK 0xc0 /* set if FIFOs are enabled */ #define com_lcr 3 /* line control register (R/W) */ -#define com_lctl com_lcr #define com_cfcr com_lcr /* character format control register (R/W) */ +#define REG_LCR com_lcr #define LCR_DLAB 0x80 #define CFCR_DLAB LCR_DLAB #define LCR_EFR_ENABLE 0xbf /* magic to enable EFR on 16650 up */ #define CFCR_EFR_ENABLE LCR_EFR_ENABLE -#define CFCR_SBREAK 0x40 -#define CFCR_PZERO 0x30 -#define CFCR_PONE 0x20 -#define CFCR_PEVEN 0x10 -#define CFCR_PODD 0x00 -#define CFCR_PENAB 0x08 -#define CFCR_STOPB 0x04 -#define CFCR_8BITS 0x03 -#define CFCR_7BITS 0x02 -#define CFCR_6BITS 0x01 -#define CFCR_5BITS 0x00 +#define LCR_SBREAK 0x40 +#define CFCR_SBREAK LCR_SBREAK +#define LCR_PZERO 0x30 +#define CFCR_PZERO LCR_PZERO +#define LCR_PONE 0x20 +#define CFCR_PONE LCR_PONE +#define LCR_PEVEN 0x10 +#define CFCR_PEVEN LCR_PEVEN +#define LCR_PODD 0x00 +#define CFCR_PODD LCR_PODD +#define LCR_PENAB 0x08 +#define CFCR_PENAB LCR_PENAB +#define LCR_STOPB 0x04 +#define CFCR_STOPB LCR_STOPB +#define LCR_8BITS 0x03 +#define CFCR_8BITS LCR_8BITS +#define LCR_7BITS 0x02 +#define CFCR_7BITS LCR_7BITS +#define LCR_6BITS 0x01 +#define CFCR_6BITS LCR_6BITS +#define LCR_5BITS 0x00 +#define CFCR_5BITS LCR_5BITS #define com_mcr 4 /* modem control register (R/W) */ +#define REG_MCR com_mcr #define MCR_PRESCALE 0x80 /* only available on 16650 up */ #define MCR_LOOPBACK 0x10 -#define MCR_IENABLE 0x08 +#define MCR_IE 0x08 +#define MCR_IENABLE MCR_IE #define MCR_DRS 0x04 #define MCR_RTS 0x02 #define MCR_DTR 0x01 #define com_lsr 5 /* line status register (R/W) */ +#define REG_LSR com_lsr #define LSR_RCV_FIFO 0x80 -#define LSR_TSRE 0x40 -#define LSR_TXRDY 0x20 +#define LSR_TEMT 0x40 +#define LSR_TSRE LSR_TEMT +#define LSR_THRE 0x20 +#define LSR_TXRDY LSR_THRE #define LSR_BI 0x10 #define LSR_FE 0x08 #define LSR_PE 0x04 @@ -96,6 +112,7 @@ #define LSR_RCV_MASK 0x1f #define com_msr 6 /* modem status register (R/W) */ +#define REG_MSR com_msr #define MSR_DCD 0x80 #define MSR_RI 0x40 #define MSR_DSR 0x20 @@ -110,6 +127,7 @@ #define com_dlbl com_dll #define com_dlm 1 /* divisor latch high (R/W) */ #define com_dlbh com_dlm +#define REG_DL com_dll /* 16450 register #7. Not multiplexed. */ #define com_scr 7 /* scratch register (R/W) */ @@ -117,20 +135,32 @@ /* 16550 register #2. Not multiplexed. */ #define com_fcr 2 /* FIFO control register (W) */ #define com_fifo com_fcr -#define FIFO_ENABLE 0x01 -#define FIFO_RCV_RST 0x02 -#define FIFO_XMT_RST 0x04 -#define FIFO_DMA_MODE 0x08 -#define FIFO_RX_LOW 0x00 -#define FIFO_RX_MEDL 0x40 -#define FIFO_RX_MEDH 0x80 -#define FIFO_RX_HIGH 0xc0 +#define REG_FCR com_fcr +#define FCR_ENABLE 0x01 +#define FIFO_ENABLE FCR_ENABLE +#define FCR_RCV_RST 0x02 +#define FIFO_RCV_RST FCR_RCV_RST +#define FCR_XMT_RST 0x04 +#define FIFO_XMT_RST FCR_XMT_RST +#define FCR_DMA 0x08 +#define FIFO_DMA_MODE FCR_DMA +#define FCR_RX_LOW 0x00 +#define FIFO_RX_LOW FCR_RX_LOW +#define FCR_RX_MEDL 0x40 +#define FIFO_RX_MEDL FCR_RX_MEDL +#define FCR_RX_MEDH 0x80 +#define FIFO_RX_MEDH FCR_RX_MEDH +#define FCR_RX_HIGH 0xc0 +#define FIFO_RX_HIGH FCR_RX_HIGH /* 16650 registers #2,[4-7]. Access enabled by LCR_EFR_ENABLE. */ #define com_efr 2 /* enhanced features register (R/W) */ -#define EFR_AUTOCTS 0x80 -#define EFR_AUTORTS 0x40 +#define REG_EFR com_efr +#define EFR_CTS 0x80 +#define EFR_AUTOCTS EFR_CTS +#define EFR_RTS 0x40 +#define EFR_AUTORTS EFR_RTS #define EFR_EFE 0x10 /* enhanced functions enable */ #define com_xon1 4 /* XON 1 character (R/W) */ @@ -162,6 +192,7 @@ * index into the Indexed Control register set. */ #define com_spr com_scr /* scratch pad (and index) register (R/W) */ +#define REG_SPR com_scr /* * 16950 indexed control registers #[0-0x13]. Access is via index in SPR, ==== //depot/projects/uart/dev/uart/uart_dev_ns8250.c#33 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_ns8250.c,v 1.12 2004/11/15 00:00:24 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_ns8250.c,v 1.13 2004/11/20 23:22:04 marcel Exp $"); #include #include @@ -36,7 +36,8 @@ #include #include #include -#include + +#include #include "uart_if.h" ==== //depot/projects/uart/geom/uzip/g_uzip.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/uzip/g_uzip.c,v 1.3 2004/09/19 10:27:46 fjoe Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/uzip/g_uzip.c,v 1.4 2004/11/20 13:10:04 fjoe Exp $"); #include #include @@ -393,7 +393,7 @@ /* * Initialize softc and read offsets. */ - sc = malloc(sizeof(*sc), M_GEOM_UZIP, M_WAITOK); + sc = malloc(sizeof(*sc), M_GEOM_UZIP, M_WAITOK | M_ZERO); gp->softc = sc; sc->blksz = ntohl(header->blksz); sc->nblocks = ntohl(header->nblocks); ==== //depot/projects/uart/kern/kern_fork.c#9 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.245 2004/11/20 02:28:48 das Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.246 2004/11/20 23:00:59 das Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -467,22 +467,19 @@ PROC_LOCK(p2); PROC_LOCK(p1); -#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) - bzero(&p2->p_startzero, - (unsigned) RANGEOF(struct proc, p_startzero, p_endzero)); + __rangeof(struct proc, p_startzero, p_endzero)); bzero(&td2->td_startzero, - (unsigned) RANGEOF(struct thread, td_startzero, td_endzero)); + __rangeof(struct thread, td_startzero, td_endzero)); bzero(&kg2->kg_startzero, - (unsigned) RANGEOF(struct ksegrp, kg_startzero, kg_endzero)); + __rangeof(struct ksegrp, kg_startzero, kg_endzero)); bcopy(&p1->p_startcopy, &p2->p_startcopy, - (unsigned) RANGEOF(struct proc, p_startcopy, p_endcopy)); + __rangeof(struct proc, p_startcopy, p_endcopy)); bcopy(&td->td_startcopy, &td2->td_startcopy, - (unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy)); + __rangeof(struct thread, td_startcopy, td_endcopy)); bcopy(&td->td_ksegrp->kg_startcopy, &kg2->kg_startcopy, - (unsigned) RANGEOF(struct ksegrp, kg_startcopy, kg_endcopy)); -#undef RANGEOF + __rangeof(struct ksegrp, kg_startcopy, kg_endcopy)); td2->td_sigstk = td->td_sigstk; ==== //depot/projects/uart/kern/kern_kse.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_kse.c,v 1.206 2004/10/07 13:50:10 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_kse.c,v 1.207 2004/11/20 23:00:59 das Exp $"); #include #include @@ -61,8 +61,6 @@ extern struct mtx kse_zombie_lock; -#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) - TAILQ_HEAD(, kse_upcall) zombie_upcalls = TAILQ_HEAD_INITIALIZER(zombie_upcalls); @@ -600,10 +598,10 @@ if (uap->newgroup) { newkg = ksegrp_alloc(); - bzero(&newkg->kg_startzero, RANGEOF(struct ksegrp, - kg_startzero, kg_endzero)); + bzero(&newkg->kg_startzero, + __rangeof(struct ksegrp, kg_startzero, kg_endzero)); bcopy(&kg->kg_startcopy, &newkg->kg_startcopy, - RANGEOF(struct ksegrp, kg_startcopy, kg_endcopy)); + __rangeof(struct ksegrp, kg_startcopy, kg_endcopy)); sched_init_concurrency(newkg); PROC_LOCK(p); if (p->p_numksegrps >= max_groups_per_proc) { @@ -1033,7 +1031,7 @@ spare = thread_alloc(); td->td_standin = spare; bzero(&spare->td_startzero, - (unsigned) RANGEOF(struct thread, td_startzero, td_endzero)); + __rangeof(struct thread, td_startzero, td_endzero)); spare->td_proc = td->td_proc; spare->td_ucred = crhold(td->td_ucred); } @@ -1068,7 +1066,7 @@ * do the crhold here because we are in schedlock already. */ bcopy(&td->td_startcopy, &td2->td_startcopy, - (unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy)); + __rangeof(struct thread, td_startcopy, td_endcopy)); thread_link(td2, ku->ku_ksegrp); /* inherit parts of blocked thread's context as a good template */ cpu_set_upcall(td2, td); ==== //depot/projects/uart/kern/kern_proc.c#9 (text+ko) ==== @@ -27,11 +27,11 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 - * $FreeBSD: src/sys/kern/kern_proc.c,v 1.220 2004/11/20 02:28:48 das Exp $ + * $FreeBSD: src/sys/kern/kern_proc.c,v 1.221 2004/11/20 23:00:59 das Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.220 2004/11/20 02:28:48 das Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.221 2004/11/20 23:00:59 das Exp $"); #include "opt_ktrace.h" #include "opt_kstack_pages.h" @@ -827,13 +827,10 @@ pstats_fork(struct pstats *src, struct pstats *dst) { -#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) - bzero(&dst->pstat_startzero, - (unsigned)RANGEOF(struct pstats, pstat_startzero, pstat_endzero)); + __rangeof(struct pstats, pstat_startzero, pstat_endzero)); bcopy(&src->pstat_startcopy, &dst->pstat_startcopy, - (unsigned)RANGEOF(struct pstats, pstat_startcopy, pstat_endcopy)); -#undef RANGEOF + __rangeof(struct pstats, pstat_startcopy, pstat_endcopy)); } void ==== //depot/projects/uart/kern/kern_switch.c#5 (text+ko) ==== @@ -86,7 +86,7 @@ ***/ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.103 2004/11/07 23:11:32 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.104 2004/11/20 23:00:59 das Exp $"); #include "opt_sched.h" @@ -910,7 +910,6 @@ /****** functions that are temporarily here ***********/ #include -#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) extern struct mtx kse_zombie_lock; /* @@ -929,7 +928,6 @@ sched_init_concurrency(kg); } -#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) /* * thread is being either created or recycled. * Fix up the per-scheduler resources associated with it. ==== //depot/projects/uart/kern/kern_thr.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.29 2004/10/06 14:20:57 mtm Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.30 2004/11/20 23:00:59 das Exp $"); #include #include @@ -58,12 +58,6 @@ &thr_concurrency, 0, "a concurrency value if not default"); /* - * Back end support functions. - */ - -#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) - -/* * System call interface. */ int @@ -109,15 +103,15 @@ } bzero(&newtd->td_startzero, - (unsigned) RANGEOF(struct thread, td_startzero, td_endzero)); + __rangeof(struct thread, td_startzero, td_endzero)); bcopy(&td->td_startcopy, &newtd->td_startcopy, - (unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy)); + __rangeof(struct thread, td_startcopy, td_endcopy)); if (scope_sys) { bzero(&newkg->kg_startzero, - (unsigned)RANGEOF(struct ksegrp, kg_startzero, kg_endzero)); + __rangeof(struct ksegrp, kg_startzero, kg_endzero)); bcopy(&kg->kg_startcopy, &newkg->kg_startcopy, - (unsigned)RANGEOF(struct ksegrp, kg_startcopy, kg_endcopy)); + __rangeof(struct ksegrp, kg_startcopy, kg_endcopy)); } newtd->td_proc = td->td_proc; ==== //depot/projects/uart/kern/kern_thread.c#13 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.207 2004/11/05 22:40:33 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.208 2004/11/20 23:00:59 das Exp $"); #include #include @@ -72,8 +72,6 @@ int virtual_cpu; -#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) - TAILQ_HEAD(, thread) zombie_threads = TAILQ_HEAD_INITIALIZER(zombie_threads); TAILQ_HEAD(, ksegrp) zombie_ksegrps = TAILQ_HEAD_INITIALIZER(zombie_ksegrps); struct mtx kse_zombie_lock; ==== //depot/projects/uart/modules/sio/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/sio/Makefile,v 1.6 2004/05/26 00:53:08 imp Exp $ +# $FreeBSD: src/sys/modules/sio/Makefile,v 1.7 2004/11/20 23:04:32 marcel Exp $ .if ${MACHINE} == "pc98" .PATH: ${.CURDIR}/../../pc98/pc98 @@ -7,7 +7,7 @@ KMOD= sio SRCS= bus_if.h card_if.h device_if.h isa_if.h pci_if.h \ - opt_comconsole.h opt_compat.h opt_ddb.h opt_sio.h \ + opt_comconsole.h opt_compat.h opt_gdb.h opt_kdb.h opt_sio.h \ sio.c sio_pccard.c sio_pci.c sio_puc.c pccarddevs.h .if ${MACHINE} == "pc98" SRCS+= sio_cbus.c ==== //depot/projects/uart/modules/uart/Makefile#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/uart/Makefile,v 1.12 2004/11/17 14:44:10 marius Exp $ +# $FreeBSD: src/sys/modules/uart/Makefile,v 1.13 2004/11/20 23:38:48 marcel Exp $ .PATH: ${.CURDIR}/../../dev/uart @@ -10,8 +10,8 @@ KMOD= uart SRCS= uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \ uart_bus_pci.c uart_bus_puc.c uart_core.c uart_cpu_${MACHINE}.c \ - uart_dbg.c uart_dev_i8251.c uart_dev_ns8250.c uart_dev_sab82532.c \ - uart_dev_z8530.c uart_if.c uart_subr.c uart_tty.c + uart_dbg.c uart_dev_ns8250.c uart_dev_sab82532.c uart_dev_z8530.c \ + uart_if.c uart_subr.c uart_tty.c SRCS+= bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \ power_if.h uart_if.h pccarddevs.h From owner-p4-projects@FreeBSD.ORG Sun Nov 21 00:07:58 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF3CD16A4D0; Sun, 21 Nov 2004 00:07:57 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8630516A4CE for ; Sun, 21 Nov 2004 00:07:57 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6093843D45 for ; Sun, 21 Nov 2004 00:07:57 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAL07viQ006414 for ; Sun, 21 Nov 2004 00:07:57 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAL07v8Y006411 for perforce@freebsd.org; Sun, 21 Nov 2004 00:07:57 GMT (envelope-from marcel@freebsd.org) Date: Sun, 21 Nov 2004 00:07:57 GMT Message-Id: <200411210007.iAL07v8Y006411@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 65589 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2004 00:07:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=65589 Change 65589 by marcel@marcel_nfs on 2004/11/21 00:07:20 Add scc_if.m to the build. Piggyback various other unrelated changes. Affected files ... .. //depot/projects/uart/conf/files#38 edit .. //depot/projects/uart/conf/kmod.mk#10 edit .. //depot/projects/uart/dev/scc/scc_if.m#1 add Differences ... ==== //depot/projects/uart/conf/files#38 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.971 2004/11/17 17:33:59 rwatson Exp $ +# $FreeBSD: src/sys/conf/files,v 1.972 2004/11/20 23:38:48 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -377,10 +377,10 @@ dev/bktr/bktr_os.c optional bktr pci dev/bktr/bktr_tuner.c optional bktr pci dev/bktr/msp34xx.c optional bktr pci -dev/bsc/bsc_bus_scc.c optional bsc scc -dev/bsc/bsc_core.c optional bsc -dev/bsc/bsc_dev_sab82532.c optional bsc -dev/bsc/bsc_dev_z8530.c optional bsc +dev/bsc/bsc_bus_scc.c optional bsc scc +dev/bsc/bsc_core.c optional bsc +dev/bsc/bsc_dev_sab82532.c optional bsc +dev/bsc/bsc_dev_z8530.c optional bsc dev/buslogic/bt.c optional bt dev/buslogic/bt_eisa.c optional bt eisa dev/buslogic/bt_isa.c optional bt isa @@ -482,10 +482,10 @@ dev/hatm/if_hatm_ioctl.c optional hatm pci dev/hatm/if_hatm_rx.c optional hatm pci dev/hatm/if_hatm_tx.c optional hatm pci -dev/hdlc/hdlc_bus_scc.c optional hdlc scc -dev/hdlc/hdlc_core.c optional hdlc -dev/hdlc/hdlc_dev_sab82532.c optional hdlc -dev/hdlc/hdlc_dev_z8530.c optional hdlc +dev/hdlc/hdlc_bus_scc.c optional hdlc scc +dev/hdlc/hdlc_core.c optional hdlc +dev/hdlc/hdlc_dev_sab82532.c optional hdlc +dev/hdlc/hdlc_dev_z8530.c optional hdlc dev/hfa/fore_buffer.c optional hfa dev/hfa/fore_command.c optional hfa dev/hfa/fore_globals.c optional hfa @@ -674,11 +674,12 @@ dev/sab/sab.c optional sab ebus dev/safe/safe.c optional safe dev/sbsh/if_sbsh.c optional sbsh -dev/scc/scc_bfe_ebus.c optional scc ebus -dev/scc/scc_bfe_sbus.c optional scc sbus -dev/scc/scc_core.c optional scc -dev/scc/scc_dev_sab82532.c optional scc -dev/scc/scc_dev_z8530.c optional scc +dev/scc/scc_if.m optional scc +dev/scc/scc_bfe_ebus.c optional scc ebus +dev/scc/scc_bfe_sbus.c optional scc sbus +dev/scc/scc_core.c optional scc +dev/scc/scc_dev_sab82532.c optional scc +dev/scc/scc_dev_z8530.c optional scc dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa dev/si/si.c optional si @@ -797,7 +798,6 @@ dev/uart/uart_bus_scc.c optional uart scc dev/uart/uart_core.c optional uart dev/uart/uart_dbg.c optional uart gdb -dev/uart/uart_dev_i8251.c optional uart dev/uart/uart_dev_ns8250.c optional uart dev/uart/uart_dev_sab82532.c optional uart dev/uart/uart_dev_z8530.c optional uart ==== //depot/projects/uart/conf/kmod.mk#10 (text+ko) ==== @@ -291,10 +291,11 @@ MFILES?= dev/acpica/acpi_if.m dev/eisa/eisa_if.m dev/iicbus/iicbb_if.m \ dev/iicbus/iicbus_if.m dev/mii/miibus_if.m dev/ofw/ofw_bus_if.m \ dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \ - dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \ - dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \ - dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m dev/uart/uart_if.m \ - dev/usb/usb_if.m isa/isa_if.m kern/bus_if.m kern/device_if.m \ + dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/scc/scc_if.m \ + dev/smbus/smbus_if.m dev/sound/pcm/ac97_if.m \ + dev/sound/pcm/channel_if.m dev/sound/pcm/feeder_if.m \ + dev/sound/pcm/mixer_if.m dev/uart/uart_if.m dev/usb/usb_if.m \ + isa/isa_if.m kern/bus_if.m kern/device_if.m \ libkern/iconv_converter_if.m opencrypto/crypto_if.m \ pc98/pc98/canbus_if.m pci/agp_if.m sparc64/pci/ofw_pci_if.m From owner-p4-projects@FreeBSD.ORG Mon Nov 22 00:01:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5BAAB16A4D0; Mon, 22 Nov 2004 00:01:56 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 352F716A4CE for ; Mon, 22 Nov 2004 00:01:56 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAA3C43D48 for ; Mon, 22 Nov 2004 00:01:55 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAM01tdB092935 for ; Mon, 22 Nov 2004 00:01:55 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAM01twa092932 for perforce@freebsd.org; Mon, 22 Nov 2004 00:01:55 GMT (envelope-from marcel@freebsd.org) Date: Mon, 22 Nov 2004 00:01:55 GMT Message-Id: <200411220001.iAM01twa092932@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 65632 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 00:01:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=65632 Change 65632 by marcel@marcel_nfs on 2004/11/22 00:01:39 IFC @65631 Affected files ... .. //depot/projects/uart/amd64/amd64/busdma_machdep.c#9 integrate .. //depot/projects/uart/arm/arm/db_interface.c#2 integrate .. //depot/projects/uart/arm/arm/db_trace.c#3 integrate .. //depot/projects/uart/arm/arm/swtch.S#3 integrate .. //depot/projects/uart/arm/arm/undefined.c#3 integrate .. //depot/projects/uart/arm/include/db_machdep.h#3 integrate .. //depot/projects/uart/arm/include/kdb.h#2 integrate .. //depot/projects/uart/boot/efi/loader/main.c#4 integrate .. //depot/projects/uart/ddb/db_run.c#3 integrate .. //depot/projects/uart/dev/aac/aac.c#11 integrate .. //depot/projects/uart/dev/bge/if_bge.c#14 integrate .. //depot/projects/uart/dev/ed/if_ed.c#6 integrate .. //depot/projects/uart/dev/fdc/fdc.c#5 integrate .. //depot/projects/uart/dev/ic/sab82532.h#2 integrate .. //depot/projects/uart/dev/ic/z8530.h#2 integrate .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#10 integrate .. //depot/projects/uart/dev/uart/uart_dev_i8251.c#5 delete .. //depot/projects/uart/dev/uart/uart_dev_i8251.h#2 delete .. //depot/projects/uart/dev/uart/uart_dev_ns8250.h#5 delete .. //depot/projects/uart/dev/uart/uart_dev_sab82532.c#34 integrate .. //depot/projects/uart/dev/uart/uart_dev_sab82532.h#4 delete .. //depot/projects/uart/dev/uart/uart_dev_z8530.c#20 integrate .. //depot/projects/uart/dev/uart/uart_dev_z8530.h#8 delete .. //depot/projects/uart/i386/i386/busdma_machdep.c#12 integrate .. //depot/projects/uart/ia64/ia64/pmap.c#15 integrate .. //depot/projects/uart/ia64/include/pte.h#3 integrate .. //depot/projects/uart/kern/kern_descrip.c#12 integrate .. //depot/projects/uart/netinet/tcp_fsm.h#3 integrate Differences ... ==== //depot/projects/uart/amd64/amd64/busdma_machdep.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.61 2004/11/19 17:51:29 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.63 2004/11/21 06:28:09 scottl Exp $"); #include #include @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -87,6 +86,7 @@ struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; + int total_bpages; int free_bpages; int reserved_bpages; int active_bpages; @@ -128,7 +128,7 @@ static struct bus_dmamap nobounce_dmamap; static void init_bounce_pages(void *dummy); -static struct bounce_zone * alloc_bounce_zone(bus_dma_tag_t dmat); +static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); @@ -200,7 +200,8 @@ panic("driver error: busdma dflt_lock called"); } -#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 +#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 /* * Allocate a device specific dma_tag. */ @@ -274,11 +275,21 @@ if (newtag->parent != NULL) atomic_add_int(&parent->ref_count, 1); } - - if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) && + + if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) + || newtag->alignment > 1 || newtag->boundary > 0) + newtag->flags |= BUS_DMA_COULD_BOUNCE; + + if (((newtag->flags & BUS_DMA_COULD_BOUNCE) != 0) && (flags & BUS_DMA_ALLOCNOW) != 0) { + struct bounce_zone *bz; + /* Must bounce */ + if ((error = alloc_bounce_zone(newtag)) != 0) + return (error); + bz = newtag->bounce_zone; + if (lowaddr > bounce_lowaddr) { /* * Go through the pool and kill any pages @@ -287,10 +298,10 @@ panic("bus_dma_tag_create: page reallocation " "not implemented"); } - if (ptoa(total_bpages) < maxsize) { + if (ptoa(bz->total_bpages) < maxsize) { int pages; - pages = atop(maxsize) - total_bpages; + pages = atop(maxsize) - bz->total_bpages; /* Add pages to our bounce pool */ if (alloc_bounce_pages(newtag, pages) < pages) @@ -378,12 +389,16 @@ * exclusion region, a data alignment that is stricter than 1, and/or * an active address boundary. */ - if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) - || dmat->alignment > 1 || dmat->boundary > 0) { + if (dmat->flags & BUS_DMA_COULD_BOUNCE) { /* Must bounce */ int maxpages; + if (dmat->bounce_zone == NULL) { + if ((error = alloc_bounce_zone(dmat)) != 0) + return (error); + } + *mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF, M_NOWAIT | M_ZERO); if (*mapp == NULL) { @@ -564,8 +579,7 @@ map = &nobounce_dmamap; if ((map != &nobounce_dmamap && map->pagesneeded == 0) - && (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) - || dmat->boundary > 0 || dmat->alignment > 1)) { + && ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0)) { vm_offset_t vendaddr; CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " @@ -898,14 +912,24 @@ return (bz->sysctl_tree_top); } -static struct bounce_zone * +static int alloc_bounce_zone(bus_dma_tag_t dmat) { struct bounce_zone *bz; + /* Check to see if we already have a suitable zone */ + STAILQ_FOREACH(bz, &bounce_zone_list, links) { + if ((dmat->alignment <= bz->alignment) + && (dmat->boundary <= bz->boundary) + && (dmat->lowaddr >= bz->lowaddr)) { + dmat->bounce_zone = bz; + return (0); + } + } + if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) - return (NULL); + return (ENOMEM); STAILQ_INIT(&bz->bounce_page_list); bz->free_bpages = 0; @@ -918,6 +942,7 @@ busdma_zonecount++; snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); STAILQ_INSERT_TAIL(&bounce_zone_list, bz, links); + dmat->bounce_zone = bz; sysctl_ctx_init(&bz->sysctl_tree); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, @@ -925,11 +950,15 @@ CTLFLAG_RD, 0, ""); if (bz->sysctl_tree_top == NULL) { sysctl_ctx_free(&bz->sysctl_tree); - return (bz); + return (0); /* XXX error code? */ } SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "total_bpages", CTLFLAG_RD, &bz->total_bpages, 0, + "Totoal bounce pages"); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "free_bpages", CTLFLAG_RD, &bz->free_bpages, 0, "Free bounce pages"); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), @@ -958,7 +987,7 @@ SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "boundary", CTLFLAG_RD, &bz->boundary, 0, ""); - return (bz); + return (0); } static int @@ -968,21 +997,6 @@ int count; bz = dmat->bounce_zone; - if (bz == NULL) { - STAILQ_FOREACH(bz, &bounce_zone_list, links) { - if ((dmat->alignment <= bz->alignment) - && (dmat->boundary <= bz->boundary) - && (dmat->lowaddr >= bz->lowaddr)) - break; - } - - if (bz == NULL) { - if ((bz = alloc_bounce_zone(dmat)) == NULL) - return (ENOMEM); - } - dmat->bounce_zone = bz; - } - count = 0; while (numpages > 0) { struct bounce_page *bpage; @@ -1005,6 +1019,7 @@ mtx_lock(&bounce_lock); STAILQ_INSERT_TAIL(&bz->bounce_page_list, bpage, links); total_bpages++; + bz->total_bpages++; bz->free_bpages++; mtx_unlock(&bounce_lock); count++; ==== //depot/projects/uart/arm/arm/db_interface.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.2 2004/07/12 21:25:01 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.3 2004/11/21 18:11:39 cognet Exp $"); #include "opt_ddb.h" #include @@ -43,6 +43,9 @@ #include #include /* just for boothowto */ #include +#ifdef KDB +#include +#endif #include #include @@ -192,11 +195,6 @@ char *dst; size_t loop; - /* If any part is in kernel text, use db_write_text() */ - if (addr >= (vm_offset_t) btext && addr < (vm_offset_t) etext) { - return (-1); - } - dst = (char *)addr; if (db_validate_address((u_int)dst)) { db_printf("address %p is invalid\n", dst); @@ -229,4 +227,93 @@ } +static u_int +db_fetch_reg(int reg) +{ + + switch (reg) { + case 0: + return (kdb_frame->tf_r0); + case 1: + return (kdb_frame->tf_r1); + case 2: + return (kdb_frame->tf_r2); + case 3: + return (kdb_frame->tf_r3); + case 4: + return (kdb_frame->tf_r4); + case 5: + return (kdb_frame->tf_r5); + case 6: + return (kdb_frame->tf_r6); + case 7: + return (kdb_frame->tf_r7); + case 8: + return (kdb_frame->tf_r8); + case 9: + return (kdb_frame->tf_r9); + case 10: + return (kdb_frame->tf_r10); + case 11: + return (kdb_frame->tf_r11); + case 12: + return (kdb_frame->tf_r12); + case 13: + return (kdb_frame->tf_svc_sp); + case 14: + return (kdb_frame->tf_svc_lr); + case 15: + return (kdb_frame->tf_pc); + default: + panic("db_fetch_reg: botch"); + } +} + +u_int +branch_taken(u_int insn, db_addr_t pc) +{ + u_int addr, nregs; + + switch ((insn >> 24) & 0xf) { + case 0xa: /* b ... */ + case 0xb: /* bl ... */ + addr = ((insn << 2) & 0x03ffffff); + if (addr & 0x02000000) + addr |= 0xfc000000; + return (pc + 8 + addr); + case 0x7: /* ldr pc, [pc, reg, lsl #2] */ + addr = db_fetch_reg(insn & 0xf); + addr = pc + 8 + (addr << 2); + db_read_bytes(addr, 4, (char *)&addr); + return (addr); + case 0x1: /* mov pc, reg */ + addr = db_fetch_reg(insn & 0xf); + return (addr); + case 0x8: /* ldmxx reg, {..., pc} */ + case 0x9: + addr = db_fetch_reg((insn >> 16) & 0xf); + nregs = (insn & 0x5555) + ((insn >> 1) & 0x5555); + nregs = (nregs & 0x3333) + ((nregs >> 2) & 0x3333); + nregs = (nregs + (nregs >> 4)) & 0x0f0f; + nregs = (nregs + (nregs >> 8)) & 0x001f; + switch ((insn >> 23) & 0x3) { + case 0x0: /* ldmda */ + addr = addr - 0; + break; + case 0x1: /* ldmia */ + addr = addr + 0 + ((nregs - 1) << 2); + break; + case 0x2: /* ldmdb */ + addr = addr - 4; + break; + case 0x3: /* ldmib */ + addr = addr + 4 + ((nregs - 1) << 2); + break; + } + db_read_bytes(addr, 4, (char *)&addr); + return (addr); + default: + panic("branch_taken: botch"); + } +} ==== //depot/projects/uart/arm/arm/db_trace.c#3 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.7 2004/11/01 22:15:13 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.8 2004/11/21 19:41:27 cognet Exp $"); #include #include @@ -87,53 +87,17 @@ #define FR_RFP (-3) static void -db_stack_trace_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) +db_stack_trace_cmd(db_expr_t addr, db_expr_t count) { u_int32_t *frame, *lastframe; c_db_sym_t sym; - char c, *cp = modif; const char *name; db_expr_t value; db_expr_t offset; boolean_t kernel_only = TRUE; - boolean_t trace_thread = FALSE; int scp_offset, quit; - if (kdb_frame == NULL && !have_addr) - return; - while (modif && ((c = *cp++) != 0)) { - if (c == 'u') - kernel_only = FALSE; - if (c == 't') - trace_thread = TRUE; - } - - if (!have_addr) - frame = (u_int32_t *)(kdb_frame->tf_r11); - else { - if (trace_thread) { - struct proc *p; - struct thread *td; - pid_t pid = (pid_t)addr; - LIST_FOREACH(p, &allproc, p_list) { - if (p->p_pid == pid) - break; - } - - if (p == NULL) { - db_printf("not found\n"); - return; - } - if (!(p->p_sflag & PS_INMEM)) { - db_printf("swapped out\n"); - return; - } - td = FIRST_THREAD_IN_PROC(p); - frame = (u_int32_t *)(td->td_pcb->un_32.pcb32_r11); - db_printf("at %p\n", frame); - } else - frame = (u_int32_t *)(addr); - } + frame = (u_int32_t *)addr; lastframe = NULL; scp_offset = -(get_pc_str_offset() >> 2); @@ -152,8 +116,6 @@ */ scp = frame[FR_SCP]; - db_printsym(scp, DB_STGY_PROC); - db_printf("\n\t"); sym = db_search_symbol(scp, DB_STGY_ANY, &offset); if (sym == C_DB_SYM_NULL) { value = 0; @@ -248,7 +210,7 @@ addr = (uint32_t)__builtin_frame_address(0); else addr = thr->td_pcb->un_32.pcb32_r11; - db_stack_trace_cmd(addr, 1, -1, NULL); + db_stack_trace_cmd(addr, -1); return (0); } ==== //depot/projects/uart/arm/arm/swtch.S#3 (text+ko) ==== @@ -83,7 +83,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.6 2004/11/09 16:47:47 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.7 2004/11/21 19:33:47 cognet Exp $"); /* @@ -468,6 +468,7 @@ mov r1, r5 mov r2, sp mov r0, r4 + mov fp, #0 bl _C_LABEL(fork_exit) /* Kill irq"s */ mrs r0, cpsr ==== //depot/projects/uart/arm/arm/undefined.c#3 (text+ko) ==== @@ -45,8 +45,10 @@ */ +#include "opt_ddb.h" + #include -__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.2 2004/11/20 16:52:10 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.3 2004/11/21 18:11:39 cognet Exp $"); #include #include @@ -263,21 +265,13 @@ if ((fault_code & FAULT_USER) == 0) { if (fault_instruction == KERNEL_BREAKPOINT) { #ifdef KDB - kdb_trap(0, 0, frame); + kdb_trap(T_BREAKPOINT, 0, frame); #else printf("No debugger in kernel.\n"); #endif - frame->tf_pc += 4; return; - } else { -#ifdef KDB - printf("Undefined instruction in kernel.\n"); - kdb_trap(0, 0, frame); -#else + } else panic("Undefined instruction in kernel.\n"); -#endif - } - } #ifdef FAST_FPE ==== //depot/projects/uart/arm/include/db_machdep.h#3 (text+ko) ==== @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: FreeBSD: src/sys/i386/include/db_machdep.h,v 1.16 1999/10/04 - * $FreeBSD: src/sys/arm/include/db_machdep.h,v 1.3 2004/11/20 16:52:09 cognet Exp $ + * $FreeBSD: src/sys/arm/include/db_machdep.h,v 1.4 2004/11/21 18:11:38 cognet Exp $ */ #ifndef _MACHINE_DB_MACHDEP_H_ @@ -34,8 +34,6 @@ #include #include -#define BYTE_MSF (1) - #define T_BREAKPOINT (1) typedef vm_offset_t db_addr_t; typedef int db_expr_t; @@ -50,8 +48,7 @@ kdb_frame->tf_pc += BKPT_SIZE; \ } while (0) -#define db_clear_single_step(regs) -#define db_set_single_step(regs) +#define SOFTWARE_SSTEP 1 #define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT) #define IS_WATCHPOINT_TRAP(type, code) (0) @@ -65,7 +62,8 @@ /* mov pc, reg 0000000f register */ #define inst_return(ins) (((ins) & 0x0e108000) == 0x08108000 || \ - ((ins) & 0x0ff0fff0) == 0x01a0f000) + ((ins) & 0x0ff0fff0) == 0x01a0f000 || \ + ((ins) & 0x0ffffff0) == 0x012fff10) /* bx */ /* bl ... 00ffffff offset>>2 */ #define inst_call(ins) (((ins) & 0x0f000000) == 0x0b000000) @@ -74,14 +72,21 @@ /* ldr pc, [pc, reg, lsl #2] 0000000f register */ +#define inst_branch(ins) (((ins) & 0x0f000000) == 0x0a000000 || \ + ((ins) & 0x0fdffff0) == 0x079ff100) #define inst_load(ins) (0) #define inst_store(ins) (0) +#define next_instr_address(pc, bd) ((bd) ? (pc) : ((pc) + INSN_SIZE)) + #define DB_SMALL_VALUE_MAX (0x7fffffff) #define DB_SMALL_VALUE_MIN (-0x40001) -#define DB_ELFSIZE 64 +#define DB_ELFSIZE 32 int db_validate_address(vm_offset_t); + +u_int branch_taken (u_int insn, u_int pc); + #endif /* !_MACHINE_DB_MACHDEP_H_ */ ==== //depot/projects/uart/arm/include/kdb.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/arm/include/kdb.h,v 1.1 2004/07/12 21:17:51 cognet Exp $ + * $FreeBSD: src/sys/arm/include/kdb.h,v 1.2 2004/11/21 18:11:38 cognet Exp $ */ #ifndef _MACHINE_KDB_H_ @@ -31,6 +31,7 @@ #include #include +#include static __inline void kdb_cpu_clear_singlestep(void) @@ -45,6 +46,7 @@ static __inline void kdb_cpu_trap(int type, int code) { + cpu_idcache_wbinv_all(); } #endif /* _MACHINE_KDB_H_ */ ==== //depot/projects/uart/boot/efi/loader/main.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/efi/loader/main.c,v 1.22 2004/09/23 18:37:36 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/efi/loader/main.c,v 1.23 2004/11/21 21:40:08 marcel Exp $"); #include #include @@ -388,7 +388,7 @@ int i, maxtr; struct { pt_entry_t pte; - struct ia64_itir itir; + uint64_t itir; uint64_t ifa; struct ia64_rr rr; } buf; @@ -445,7 +445,8 @@ buf.pte &= ~PTE_MA_MASK; sprintf(lbuf, "%03d %06x %013lx %013lx %4s %d %d %d %d %d " "%-3s %d %06x\n", i, buf.rr.rr_rid, buf.ifa >> 12, - (buf.pte & PTE_PPN_MASK) >> 12, psnames[buf.itir.ps], + (buf.pte & PTE_PPN_MASK) >> 12, + psnames[(buf.itir & ITIR_PS_MASK) >> 2], (buf.pte & PTE_ED) ? 1 : 0, (int)(buf.pte & PTE_AR_MASK) >> 9, (int)(buf.pte & PTE_PL_MASK) >> 7, @@ -453,7 +454,7 @@ (buf.pte & PTE_ACCESSED) ? 1 : 0, manames[(buf.pte & PTE_MA_MASK) >> 2], (buf.pte & PTE_PRESENT) ? 1 : 0, - buf.itir.key); + (int)((buf.itir & ITIR_KEY_MASK) >> 8)); pager_output(lbuf); } pager_close(); ==== //depot/projects/uart/ddb/db_run.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_run.c,v 1.24 2004/07/10 23:47:19 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_run.c,v 1.25 2004/11/21 18:11:02 cognet Exp $"); #include #include @@ -71,6 +71,11 @@ void db_clear_single_step(void); #endif +#ifdef SOFTWARE_SSTEP +db_breakpoint_t db_not_taken_bkpt = 0; +db_breakpoint_t db_taken_bkpt = 0; +#endif + boolean_t db_stop_at_pc(is_breakpoint) boolean_t *is_breakpoint; @@ -78,10 +83,16 @@ register db_addr_t pc; register db_breakpoint_t bkpt; + pc = PC_REGS(); +#ifdef SOFTWARE_SSTEP + if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address) + || (db_taken_bkpt != 0 && pc == db_taken_bkpt->address)) + *is_breakpoint = FALSE; +#endif + db_clear_single_step(); db_clear_breakpoints(); db_clear_watchpoints(); - pc = PC_REGS(); #ifdef FIXUP_PC_AFTER_BREAK if (*is_breakpoint) { @@ -245,8 +256,6 @@ * we allocate a breakpoint and save it here. * These breakpoints are deleted on return. */ -db_breakpoint_t db_not_taken_bkpt = 0; -db_breakpoint_t db_taken_bkpt = 0; void db_set_single_step(void) ==== //depot/projects/uart/dev/aac/aac.c#11 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.103 2004/09/16 02:37:40 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.104 2004/11/21 04:03:29 scottl Exp $"); /* * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters. @@ -1485,7 +1485,7 @@ 1, /* nsegments */ AAC_FIB_COUNT * sizeof(struct aac_fib), /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ + 0, /* flags */ NULL, NULL, /* No locking needed */ &sc->aac_fib_dmat)) { device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n");; @@ -1505,7 +1505,7 @@ 8192 + sizeof(struct aac_common), /* maxsize */ 1, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ + 0, /* flags */ NULL, NULL, /* No locking needed */ &sc->aac_common_dmat)) { device_printf(sc->aac_dev, ==== //depot/projects/uart/dev/bge/if_bge.c#14 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.80 2004/11/08 19:27:00 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.81 2004/11/21 04:02:36 scottl Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -1927,7 +1927,7 @@ NULL, NULL, /* filter, filterarg */ MAXBSIZE, BGE_NSEG_NEW, /* maxsize, nsegments */ BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ + 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->bge_cdata.bge_parent_tag); @@ -1937,7 +1937,7 @@ nseg = 32; error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, - NULL, MCLBYTES * nseg, nseg, MCLBYTES, 0, NULL, NULL, + NULL, MCLBYTES * nseg, nseg, MCLBYTES, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->bge_cdata.bge_mtag); if (error) { ==== //depot/projects/uart/dev/ed/if_ed.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.235 2004/11/10 13:16:12 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.236 2004/11/21 02:42:09 mlaier Exp $"); /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -1720,7 +1720,9 @@ ifp->if_ioctl = ed_ioctl; ifp->if_watchdog = ed_watchdog; ifp->if_init = ed_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof sc->mibdata; /* @@ -2122,7 +2124,7 @@ ifp->if_flags |= IFF_OACTIVE; return; } - IF_DEQUEUE(&ifp->if_snd, m); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == 0) { /* ==== //depot/projects/uart/dev/fdc/fdc.c#5 (text+ko) ==== @@ -51,7 +51,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.302 2004/11/08 18:53:52 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.303 2004/11/21 16:25:21 imp Exp $"); #include "opt_fdc.h" @@ -1957,6 +1957,11 @@ struct fd_data *fd; fd = device_get_softc(dev); + g_topology_lock(); + g_wither_geom(fd->fd_geom, ENXIO); + g_topology_unlock(); + while (device_get_state(dev) == DS_BUSY) + tsleep(fd, PZERO, "fdd", hz/10); callout_drain(&fd->toffhandle); return (0); ==== //depot/projects/uart/dev/ic/sab82532.h#2 (text+ko) ==== @@ -34,9 +34,12 @@ * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F30602-01-2-0537. * - * $FreeBSD: src/sys/dev/ic/sab82532.h,v 1.1 2003/09/06 23:13:47 marcel Exp $ + * $FreeBSD: src/sys/dev/ic/sab82532.h,v 1.2 2004/11/21 01:33:39 marcel Exp $ */ +#ifndef _DEV_IC_SAB82532_H_ +#define _DEV_IC_SAB82532_H_ + /* * Register definitions for SAB82532 based on "Enhanced Serial Communication * Controller ESCC2 Version 3.2 User's Manual 07.96" from: @@ -318,3 +321,5 @@ #define SAB_RSTAT_PE 0x80 /* parity error */ #define SAB_RSTAT_FE 0x40 /* framing error */ #define SAB_RSTAT_PAR 0x01 /* parity bit */ + +#endif /* _DEV_IC_SAB82532_H_ */ ==== //depot/projects/uart/dev/ic/z8530.h#2 (text+ko) ==== @@ -23,11 +23,11 @@ * (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/dev/ic/z8530.h,v 1.1 2003/09/06 23:13:47 marcel Exp $ + * $FreeBSD: src/sys/dev/ic/z8530.h,v 1.2 2004/11/21 01:34:15 marcel Exp $ */ -#ifndef _DEV_UART_DEV_Z8530_H_ -#define _DEV_UART_DEV_Z8530_H_ +#ifndef _DEV_IC_Z8530_H_ +#define _DEV_IC_Z8530_H_ /* * Channel B control: 0 @@ -249,4 +249,4 @@ #define TPC_RTS 0x02 /* RTS. */ #define TPC_CRC 0x01 /* CRC Enable. */ -#endif /* _DEV_UART_DEV_Z8530_H_ */ +#endif /* _DEV_IC_Z8530_H_ */ ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#10 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_pc98.c,v 1.13 2004/11/17 20:01:43 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_pc98.c,v 1.14 2004/11/21 15:18:35 nyan Exp $"); #include #include @@ -79,14 +79,8 @@ if (resource_int_value("uart", i, "port", &ivar) != 0 || ivar == 0) continue; - /* - * Got it. Fill in the instance and return it. We have - * both i8251 an ns8250 and successors on pc98. - */ - if (flags & 0x100) - di->ops = uart_ns8250_ops; - else - di->ops = uart_i8251_ops; + + di->ops = uart_ns8250_ops; di->bas.chan = 0; di->bas.bst = uart_bus_space_io; if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) ==== //depot/projects/uart/dev/uart/uart_dev_sab82532.c#34 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_sab82532.c,v 1.7 2004/06/24 10:07:28 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_sab82532.c,v 1.8 2004/11/21 01:43:27 marcel Exp $"); #include #include @@ -36,7 +36,8 @@ #include #include #include -#include + +#include #include "uart_if.h" ==== //depot/projects/uart/dev/uart/uart_dev_z8530.c#20 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_z8530.c,v 1.8 2004/06/24 10:07:28 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_z8530.c,v 1.9 2004/11/21 01:43:27 marcel Exp $"); #include #include @@ -36,7 +36,8 @@ #include #include #include -#include + +#include #include "uart_if.h" ==== //depot/projects/uart/i386/i386/busdma_machdep.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.65 2004/11/19 17:56:22 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.67 2004/11/21 06:28:35 scottl Exp $"); #include #include @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -87,6 +86,7 @@ struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; + int total_bpages; int free_bpages; int reserved_bpages; int active_bpages; @@ -128,7 +128,7 @@ static struct bus_dmamap nobounce_dmamap; static void init_bounce_pages(void *dummy); -static struct bounce_zone * alloc_bounce_zone(bus_dma_tag_t dmat); +static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); @@ -200,7 +200,8 @@ panic("driver error: busdma dflt_lock called"); } -#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 +#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 /* * Allocate a device specific dma_tag. */ @@ -274,11 +275,21 @@ if (newtag->parent != NULL) atomic_add_int(&parent->ref_count, 1); } - - if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) && + + if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) + || newtag->alignment > 1 || newtag->boundary > 0) + newtag->flags |= BUS_DMA_COULD_BOUNCE; + + if (((newtag->flags & BUS_DMA_COULD_BOUNCE) != 0) && (flags & BUS_DMA_ALLOCNOW) != 0) { + struct bounce_zone *bz; + /* Must bounce */ + if ((error = alloc_bounce_zone(newtag)) != 0) + return (error); + bz = newtag->bounce_zone; + >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Nov 22 02:52:20 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3F21116A4D0; Mon, 22 Nov 2004 02:52:20 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0876516A4CE for ; Mon, 22 Nov 2004 02:52:20 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA19F43D45 for ; Mon, 22 Nov 2004 02:52:19 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAM2qJD0004460 for ; Mon, 22 Nov 2004 02:52:19 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAM2qJ0O004457 for perforce@freebsd.org; Mon, 22 Nov 2004 02:52:19 GMT (envelope-from marcel@freebsd.org) Date: Mon, 22 Nov 2004 02:52:19 GMT Message-Id: <200411220252.iAM2qJ0O004457@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 65633 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 02:52:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=65633 Change 65633 by marcel@marcel_nfs on 2004/11/22 02:52:13 Add channel offsets. While here, fix a typo in a comment. Affected files ... .. //depot/projects/uart/dev/ic/z8530.h#3 edit Differences ... ==== //depot/projects/uart/dev/ic/z8530.h#3 (text+ko) ==== @@ -34,9 +34,12 @@ * Channel B data: 1 * Channel A control: 2 * Channel A data: 3 - * - * We expect a seperate subregion for each channel. */ + +/* The following apply when using a device-scoped bus handle */ +#define CHAN_A 2 +#define CHAN_B 0 + #define REG_CTRL 0 #define REG_DATA 1 @@ -69,7 +72,7 @@ #define RR_BCL 6 /* Byte Count Low. */ #define RR_BCH 7 /* Byte Count High. */ #define RR_RB 8 /* Receive Buffer. */ -#define RR_RPC 9 /* Receive Parameters and Contro. */ +#define RR_RPC 9 /* Receive Parameters and Control. */ #define RR_MSB 10 /* Miscellaneous Status Bits. */ #define RR_MCB1 11 /* Miscellaneous Control Bits (part 1). */ #define RR_TCL 12 /* BRG Time Constant Low. */ From owner-p4-projects@FreeBSD.ORG Mon Nov 22 20:02:12 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F7C916A4D0; Mon, 22 Nov 2004 20:02:12 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38A4E16A4CE for ; Mon, 22 Nov 2004 20:02:12 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAFC343D1D for ; Mon, 22 Nov 2004 20:02:11 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAMK2BtN069259 for ; Mon, 22 Nov 2004 20:02:11 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAMK2BwX069256 for perforce@freebsd.org; Mon, 22 Nov 2004 20:02:11 GMT (envelope-from jhb@freebsd.org) Date: Mon, 22 Nov 2004 20:02:11 GMT Message-Id: <200411222002.iAMK2BwX069256@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 65658 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 20:02:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=65658 Change 65658 by jhb@jhb_slimer on 2004/11/22 20:01:11 IFC @65655. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/genassym.c#18 integrate .. //depot/projects/smpng/sys/alpha/alpha/machdep.c#73 integrate .. //depot/projects/smpng/sys/alpha/alpha/mp_machdep.c#31 integrate .. //depot/projects/smpng/sys/alpha/include/param.h#12 integrate .. //depot/projects/smpng/sys/amd64/amd64/busdma_machdep.c#14 integrate .. //depot/projects/smpng/sys/amd64/amd64/genassym.c#13 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#32 integrate .. //depot/projects/smpng/sys/amd64/include/param.h#12 integrate .. //depot/projects/smpng/sys/arm/arm/db_interface.c#3 integrate .. //depot/projects/smpng/sys/arm/arm/db_trace.c#9 integrate .. //depot/projects/smpng/sys/arm/arm/exception.S#4 integrate .. //depot/projects/smpng/sys/arm/arm/genassym.c#4 integrate .. //depot/projects/smpng/sys/arm/arm/swtch.S#5 integrate .. //depot/projects/smpng/sys/arm/arm/trap.c#4 integrate .. //depot/projects/smpng/sys/arm/arm/undefined.c#2 integrate .. //depot/projects/smpng/sys/arm/arm/vm_machdep.c#7 integrate .. //depot/projects/smpng/sys/arm/include/cpufunc.h#5 integrate .. //depot/projects/smpng/sys/arm/include/db_machdep.h#3 integrate .. //depot/projects/smpng/sys/arm/include/kdb.h#2 integrate .. //depot/projects/smpng/sys/arm/include/param.h#7 integrate .. //depot/projects/smpng/sys/arm/sa11x0/assabet_machdep.c#6 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq31244_machdep.c#4 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/std.i80321#2 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/std.iq31244#2 integrate .. //depot/projects/smpng/sys/boot/efi/loader/main.c#14 integrate .. //depot/projects/smpng/sys/cam/cam_xpt.c#23 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_proto.h#13 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscall.h#13 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscalls.c#13 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_sysent.c#13 integrate .. //depot/projects/smpng/sys/compat/freebsd32/syscalls.master#13 integrate .. //depot/projects/smpng/sys/compat/pecoff/imgact_pecoff.c#21 integrate .. //depot/projects/smpng/sys/conf/NOTES#86 integrate .. //depot/projects/smpng/sys/conf/files#128 integrate .. //depot/projects/smpng/sys/conf/files.sparc64#46 integrate .. //depot/projects/smpng/sys/conf/kmod.mk#37 integrate .. //depot/projects/smpng/sys/ddb/db_ps.c#30 integrate .. //depot/projects/smpng/sys/ddb/db_run.c#8 integrate .. //depot/projects/smpng/sys/dev/aac/aac.c#45 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic79xx.c#22 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic79xx.h#19 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic7xxx.c#22 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic_osm_lib.h#4 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#50 integrate .. //depot/projects/smpng/sys/dev/ed/if_ed.c#26 integrate .. //depot/projects/smpng/sys/dev/fdc/fdc.c#15 integrate .. //depot/projects/smpng/sys/dev/hme/if_hme.c#19 integrate .. //depot/projects/smpng/sys/dev/hme/if_hme_pci.c#13 integrate .. //depot/projects/smpng/sys/dev/hme/if_hme_sbus.c#11 integrate .. //depot/projects/smpng/sys/dev/hme/if_hmevar.h#7 integrate .. //depot/projects/smpng/sys/dev/ic/ns16550.h#5 integrate .. //depot/projects/smpng/sys/dev/ic/sab82532.h#1 branch .. //depot/projects/smpng/sys/dev/ic/z8530.h#1 branch .. //depot/projects/smpng/sys/dev/mc146818/mc146818.c#1 branch .. //depot/projects/smpng/sys/dev/mc146818/mc146818reg.h#3 integrate .. //depot/projects/smpng/sys/dev/mc146818/mc146818var.h#1 branch .. //depot/projects/smpng/sys/dev/uart/uart_bus_isa.c#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_cpu.h#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_cpu_alpha.c#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_cpu_amd64.c#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_cpu_i386.c#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_cpu_ia64.c#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_cpu_pc98.c#6 integrate .. //depot/projects/smpng/sys/dev/uart/uart_cpu_sparc64.c#8 integrate .. //depot/projects/smpng/sys/dev/uart/uart_dev_i8251.c#3 delete .. //depot/projects/smpng/sys/dev/uart/uart_dev_i8251.h#2 delete .. //depot/projects/smpng/sys/dev/uart/uart_dev_ns8250.c#8 integrate .. //depot/projects/smpng/sys/dev/uart/uart_dev_ns8250.h#2 delete .. //depot/projects/smpng/sys/dev/uart/uart_dev_sab82532.c#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_dev_sab82532.h#2 delete .. //depot/projects/smpng/sys/dev/uart/uart_dev_z8530.c#5 integrate .. //depot/projects/smpng/sys/dev/uart/uart_dev_z8530.h#2 delete .. //depot/projects/smpng/sys/fs/fifofs/fifo_vnops.c#30 integrate .. //depot/projects/smpng/sys/geom/uzip/g_uzip.c#4 integrate .. //depot/projects/smpng/sys/i386/i386/busdma_machdep.c#32 integrate .. //depot/projects/smpng/sys/i386/i386/genassym.c#30 integrate .. //depot/projects/smpng/sys/i386/i386/locore.s#24 integrate .. //depot/projects/smpng/sys/i386/i386/machdep.c#83 integrate .. //depot/projects/smpng/sys/i386/include/param.h#15 integrate .. //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#40 integrate .. //depot/projects/smpng/sys/ia64/ia64/genassym.c#26 integrate .. //depot/projects/smpng/sys/ia64/ia64/machdep.c#88 integrate .. //depot/projects/smpng/sys/ia64/ia64/pmap.c#65 integrate .. //depot/projects/smpng/sys/ia64/include/param.h#14 integrate .. //depot/projects/smpng/sys/ia64/include/pte.h#5 integrate .. //depot/projects/smpng/sys/kern/imgact_aout.c#23 integrate .. //depot/projects/smpng/sys/kern/init_main.c#51 integrate .. //depot/projects/smpng/sys/kern/init_sysent.c#48 integrate .. //depot/projects/smpng/sys/kern/kern_descrip.c#72 integrate .. //depot/projects/smpng/sys/kern/kern_fork.c#88 integrate .. //depot/projects/smpng/sys/kern/kern_kse.c#13 integrate .. //depot/projects/smpng/sys/kern/kern_ntptime.c#15 integrate .. //depot/projects/smpng/sys/kern/kern_proc.c#69 integrate .. //depot/projects/smpng/sys/kern/kern_switch.c#51 integrate .. //depot/projects/smpng/sys/kern/kern_thr.c#22 integrate .. //depot/projects/smpng/sys/kern/kern_thread.c#74 integrate .. //depot/projects/smpng/sys/kern/syscalls.c#48 integrate .. //depot/projects/smpng/sys/kern/syscalls.master#49 integrate .. //depot/projects/smpng/sys/kern/vfs_bio.c#71 integrate .. //depot/projects/smpng/sys/kern/vfs_default.c#31 integrate .. //depot/projects/smpng/sys/kern/vfs_mount.c#38 integrate .. //depot/projects/smpng/sys/kern/vfs_vnops.c#54 integrate .. //depot/projects/smpng/sys/modules/acpi/acpi_snc/Makefile#2 delete .. //depot/projects/smpng/sys/modules/sio/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/uart/Makefile#7 integrate .. //depot/projects/smpng/sys/net/if.h#22 integrate .. //depot/projects/smpng/sys/netgraph/atm/sscop/ng_sscop_cust.h#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#7 integrate .. //depot/projects/smpng/sys/netgraph/ng_one2many.c#10 integrate .. //depot/projects/smpng/sys/netinet/in.c#23 integrate .. //depot/projects/smpng/sys/netinet/ip_divert.c#42 integrate .. //depot/projects/smpng/sys/netinet/tcp_fsm.h#4 integrate .. //depot/projects/smpng/sys/netinet/tcp_input.c#62 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_bio.c#34 integrate .. //depot/projects/smpng/sys/pc98/i386/machdep.c#74 integrate .. //depot/projects/smpng/sys/pci/if_sf.c#32 integrate .. //depot/projects/smpng/sys/pci/if_sfreg.h#5 integrate .. //depot/projects/smpng/sys/pci/if_sk.c#38 integrate .. //depot/projects/smpng/sys/powerpc/include/param.h#12 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/genassym.c#24 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/machdep.c#55 integrate .. //depot/projects/smpng/sys/sparc64/conf/GENERIC#50 integrate .. //depot/projects/smpng/sys/sparc64/conf/NOTES#12 integrate .. //depot/projects/smpng/sys/sparc64/include/param.h#15 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/genassym.c#34 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/machdep.c#68 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/rtc.c#1 branch .. //depot/projects/smpng/sys/sys/buf.h#33 integrate .. //depot/projects/smpng/sys/sys/proc.h#134 integrate .. //depot/projects/smpng/sys/sys/syscall.h#48 integrate .. //depot/projects/smpng/sys/sys/syscall.mk#48 integrate .. //depot/projects/smpng/sys/sys/sysproto.h#50 integrate .. //depot/projects/smpng/sys/sys/systm.h#58 integrate .. //depot/projects/smpng/sys/sys/user.h#21 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_vnops.c#36 integrate .. //depot/projects/smpng/sys/vm/swap_pager.c#53 integrate .. //depot/projects/smpng/sys/vm/vm_extern.h#26 integrate .. //depot/projects/smpng/sys/vm/vm_glue.c#51 integrate .. //depot/projects/smpng/sys/vm/vm_pageout.h#14 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/genassym.c#18 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/genassym.c,v 1.44 2004/04/05 21:00:49 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/genassym.c,v 1.45 2004/11/20 02:28:14 das Exp $"); #include #include @@ -52,12 +52,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include ==== //depot/projects/smpng/sys/alpha/alpha/machdep.c#73 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.224 2004/11/05 19:16:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.225 2004/11/20 02:29:36 das Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -160,7 +160,6 @@ struct mtx icu_lock; -struct user *proc0uarea; vm_offset_t proc0kstack; char machine[] = "alpha"; @@ -848,11 +847,9 @@ proc_linkup(&proc0, &ksegrp0, &thread0); /* - * Init mapping for u page(s) for proc 0 + * Init mapping for kernel stack for proc 0 */ - proc0uarea = (struct user *)pmap_steal_memory(UAREA_PAGES * PAGE_SIZE); proc0kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE); - proc0.p_uarea = proc0uarea; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; @@ -861,7 +858,6 @@ * Setup the per-CPU data for the bootstrap cpu. */ { - /* This is not a 'struct user' */ size_t sz = round_page(KSTACK_PAGES * PAGE_SIZE); pcpup = (struct pcpu *) pmap_steal_memory(sz); pcpu_init(pcpup, 0, sz); ==== //depot/projects/smpng/sys/alpha/alpha/mp_machdep.c#31 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.53 2004/11/05 19:16:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.54 2004/11/20 02:29:36 das Exp $"); #include "opt_kstack_pages.h" @@ -233,7 +233,7 @@ if (bootverbose) printf("smp_start_secondary: starting cpu %d\n", pal_id); - sz = round_page((UAREA_PAGES + KSTACK_PAGES) * PAGE_SIZE); + sz = KSTACK_PAGES * PAGE_SIZE; pcpu = malloc(sz, M_TEMP, M_NOWAIT); if (!pcpu) { printf("smp_start_secondary: can't allocate memory\n"); ==== //depot/projects/smpng/sys/alpha/include/param.h#12 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/param.h,v 1.36 2004/09/02 18:59:14 scottl Exp $ */ +/* $FreeBSD: src/sys/alpha/include/param.h,v 1.37 2004/11/20 02:29:49 das Exp $ */ /* From: NetBSD: param.h,v 1.20 1997/09/19 13:52:53 leo Exp */ /* @@ -117,7 +117,6 @@ #define KSTACK_PAGES 2 /* pages of kstack (with pcb) */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ -#define UAREA_PAGES 1 /* pages of u-area */ /* ==== //depot/projects/smpng/sys/amd64/amd64/busdma_machdep.c#14 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.60 2004/11/10 03:49:24 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.63 2004/11/21 06:28:09 scottl Exp $"); #include #include @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -87,6 +86,7 @@ struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; + int total_bpages; int free_bpages; int reserved_bpages; int active_bpages; @@ -128,15 +128,14 @@ static struct bus_dmamap nobounce_dmamap; static void init_bounce_pages(void *dummy); -static struct bounce_zone * alloc_bounce_zone(bus_dma_tag_t dmat); +static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); -static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, - bus_size_t len); +static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); /* * Return true if a match is made. @@ -147,18 +146,15 @@ * to check for a match, if there is no filter callback then assume a match. */ static __inline int -run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t len) +run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) { - bus_size_t bndy; int retval; retval = 0; - bndy = dmat->boundary; do { if (((paddr > dmat->lowaddr && paddr <= dmat->highaddr) - || ((paddr & (dmat->alignment - 1)) != 0) - || ((paddr & bndy) != ((paddr + len) & bndy))) + || ((paddr & (dmat->alignment - 1)) != 0)) && (dmat->filter == NULL || (*dmat->filter)(dmat->filterarg, paddr) != 0)) retval = 1; @@ -204,7 +200,8 @@ panic("driver error: busdma dflt_lock called"); } -#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 +#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 /* * Allocate a device specific dma_tag. */ @@ -278,11 +275,21 @@ if (newtag->parent != NULL) atomic_add_int(&parent->ref_count, 1); } - - if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) && + + if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) + || newtag->alignment > 1 || newtag->boundary > 0) + newtag->flags |= BUS_DMA_COULD_BOUNCE; + + if (((newtag->flags & BUS_DMA_COULD_BOUNCE) != 0) && (flags & BUS_DMA_ALLOCNOW) != 0) { + struct bounce_zone *bz; + /* Must bounce */ + if ((error = alloc_bounce_zone(newtag)) != 0) + return (error); + bz = newtag->bounce_zone; + if (lowaddr > bounce_lowaddr) { /* * Go through the pool and kill any pages @@ -291,10 +298,10 @@ panic("bus_dma_tag_create: page reallocation " "not implemented"); } - if (ptoa(total_bpages) < maxsize) { + if (ptoa(bz->total_bpages) < maxsize) { int pages; - pages = atop(maxsize) - total_bpages; + pages = atop(maxsize) - bz->total_bpages; /* Add pages to our bounce pool */ if (alloc_bounce_pages(newtag, pages) < pages) @@ -382,12 +389,16 @@ * exclusion region, a data alignment that is stricter than 1, and/or * an active address boundary. */ - if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) - || dmat->alignment > 1 || dmat->boundary > 0) { + if (dmat->flags & BUS_DMA_COULD_BOUNCE) { /* Must bounce */ int maxpages; + if (dmat->bounce_zone == NULL) { + if ((error = alloc_bounce_zone(dmat)) != 0) + return (error); + } + *mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF, M_NOWAIT | M_ZERO); if (*mapp == NULL) { @@ -568,8 +579,7 @@ map = &nobounce_dmamap; if ((map != &nobounce_dmamap && map->pagesneeded == 0) - && (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) - || dmat->boundary > 0 || dmat->alignment > 1)) { + && ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0)) { vm_offset_t vendaddr; CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " @@ -586,7 +596,7 @@ while (vaddr < vendaddr) { paddr = pmap_kextract(vaddr); - if (run_filter(dmat, paddr, 0) != 0) { + if (run_filter(dmat, paddr) != 0) { needbounce = 1; map->pagesneeded++; } @@ -647,7 +657,7 @@ sgsize = (baddr - curaddr); } - if (map->pagesneeded != 0 && run_filter(dmat, curaddr, sgsize)) + if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) curaddr = add_bounce_page(dmat, map, vaddr, sgsize); /* @@ -902,14 +912,24 @@ return (bz->sysctl_tree_top); } -static struct bounce_zone * +static int alloc_bounce_zone(bus_dma_tag_t dmat) { struct bounce_zone *bz; + /* Check to see if we already have a suitable zone */ + STAILQ_FOREACH(bz, &bounce_zone_list, links) { + if ((dmat->alignment <= bz->alignment) + && (dmat->boundary <= bz->boundary) + && (dmat->lowaddr >= bz->lowaddr)) { + dmat->bounce_zone = bz; + return (0); + } + } + if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) - return (NULL); + return (ENOMEM); STAILQ_INIT(&bz->bounce_page_list); bz->free_bpages = 0; @@ -922,6 +942,7 @@ busdma_zonecount++; snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); STAILQ_INSERT_TAIL(&bounce_zone_list, bz, links); + dmat->bounce_zone = bz; sysctl_ctx_init(&bz->sysctl_tree); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, @@ -929,11 +950,15 @@ CTLFLAG_RD, 0, ""); if (bz->sysctl_tree_top == NULL) { sysctl_ctx_free(&bz->sysctl_tree); - return (bz); + return (0); /* XXX error code? */ } SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "total_bpages", CTLFLAG_RD, &bz->total_bpages, 0, + "Totoal bounce pages"); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "free_bpages", CTLFLAG_RD, &bz->free_bpages, 0, "Free bounce pages"); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), @@ -962,7 +987,7 @@ SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "boundary", CTLFLAG_RD, &bz->boundary, 0, ""); - return (bz); + return (0); } static int @@ -972,21 +997,6 @@ int count; bz = dmat->bounce_zone; - if (bz == NULL) { - STAILQ_FOREACH(bz, &bounce_zone_list, links) { - if ((dmat->alignment <= bz->alignment) - && (dmat->boundary <= bz->boundary) - && (dmat->lowaddr >= bz->lowaddr)) - break; - } - - if (bz == NULL) { - if ((bz = alloc_bounce_zone(dmat)) == NULL) - return (ENOMEM); - } - dmat->bounce_zone = bz; - } - count = 0; while (numpages > 0) { struct bounce_page *bpage; @@ -1009,6 +1019,7 @@ mtx_lock(&bounce_lock); STAILQ_INSERT_TAIL(&bz->bounce_page_list, bpage, links); total_bpages++; + bz->total_bpages++; bz->free_bpages++; mtx_unlock(&bounce_lock); count++; ==== //depot/projects/smpng/sys/amd64/amd64/genassym.c#13 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.154 2004/05/16 22:43:57 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.155 2004/11/20 02:30:59 das Exp $"); #include "opt_compat.h" #include "opt_kstack_pages.h" @@ -50,14 +50,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -67,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -76,7 +75,6 @@ ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); ASSYM(P_SFLAG, offsetof(struct proc, p_sflag)); -ASSYM(P_UAREA, offsetof(struct proc, p_uarea)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); @@ -88,7 +86,6 @@ ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); -ASSYM(UAREA_PAGES, UAREA_PAGES); ASSYM(KSTACK_PAGES, KSTACK_PAGES); ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(NPTEPG, NPTEPG); ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#32 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.622 2004/10/28 12:16:03 simokawa Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.623 2004/11/20 02:29:23 das Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1114,9 +1114,6 @@ #error "have you forgotten the isa device?"; #endif - proc0.p_uarea = (struct user *)(physfree + KERNBASE); - bzero(proc0.p_uarea, UAREA_PAGES * PAGE_SIZE); - physfree += UAREA_PAGES * PAGE_SIZE; thread0.td_kstack = physfree + KERNBASE; bzero((void *)thread0.td_kstack, KSTACK_PAGES * PAGE_SIZE); physfree += KSTACK_PAGES * PAGE_SIZE; ==== //depot/projects/smpng/sys/amd64/include/param.h#12 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/amd64/include/param.h,v 1.14 2004/09/02 18:59:14 scottl Exp $ + * $FreeBSD: src/sys/amd64/include/param.h,v 1.15 2004/11/20 02:29:49 das Exp $ */ /* @@ -125,7 +125,6 @@ #define KSTACK_PAGES 4 /* pages of kstack (with pcb) */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ -#define UAREA_PAGES 1 /* holds struct user WITHOUT PCB (see def.) */ /* ==== //depot/projects/smpng/sys/arm/arm/db_interface.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.2 2004/07/12 21:25:01 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.3 2004/11/21 18:11:39 cognet Exp $"); #include "opt_ddb.h" #include @@ -43,6 +43,9 @@ #include #include /* just for boothowto */ #include +#ifdef KDB +#include +#endif #include #include @@ -192,11 +195,6 @@ char *dst; size_t loop; - /* If any part is in kernel text, use db_write_text() */ - if (addr >= (vm_offset_t) btext && addr < (vm_offset_t) etext) { - return (-1); - } - dst = (char *)addr; if (db_validate_address((u_int)dst)) { db_printf("address %p is invalid\n", dst); @@ -229,4 +227,93 @@ } +static u_int +db_fetch_reg(int reg) +{ + + switch (reg) { + case 0: + return (kdb_frame->tf_r0); + case 1: + return (kdb_frame->tf_r1); + case 2: + return (kdb_frame->tf_r2); + case 3: + return (kdb_frame->tf_r3); + case 4: + return (kdb_frame->tf_r4); + case 5: + return (kdb_frame->tf_r5); + case 6: + return (kdb_frame->tf_r6); + case 7: + return (kdb_frame->tf_r7); + case 8: + return (kdb_frame->tf_r8); + case 9: + return (kdb_frame->tf_r9); + case 10: + return (kdb_frame->tf_r10); + case 11: + return (kdb_frame->tf_r11); + case 12: + return (kdb_frame->tf_r12); + case 13: + return (kdb_frame->tf_svc_sp); + case 14: + return (kdb_frame->tf_svc_lr); + case 15: + return (kdb_frame->tf_pc); + default: + panic("db_fetch_reg: botch"); + } +} + +u_int +branch_taken(u_int insn, db_addr_t pc) +{ + u_int addr, nregs; + + switch ((insn >> 24) & 0xf) { + case 0xa: /* b ... */ + case 0xb: /* bl ... */ + addr = ((insn << 2) & 0x03ffffff); + if (addr & 0x02000000) + addr |= 0xfc000000; + return (pc + 8 + addr); + case 0x7: /* ldr pc, [pc, reg, lsl #2] */ + addr = db_fetch_reg(insn & 0xf); + addr = pc + 8 + (addr << 2); + db_read_bytes(addr, 4, (char *)&addr); + return (addr); + case 0x1: /* mov pc, reg */ + addr = db_fetch_reg(insn & 0xf); + return (addr); + case 0x8: /* ldmxx reg, {..., pc} */ + case 0x9: + addr = db_fetch_reg((insn >> 16) & 0xf); + nregs = (insn & 0x5555) + ((insn >> 1) & 0x5555); + nregs = (nregs & 0x3333) + ((nregs >> 2) & 0x3333); + nregs = (nregs + (nregs >> 4)) & 0x0f0f; + nregs = (nregs + (nregs >> 8)) & 0x001f; + switch ((insn >> 23) & 0x3) { + case 0x0: /* ldmda */ + addr = addr - 0; + break; + case 0x1: /* ldmia */ + addr = addr + 0 + ((nregs - 1) << 2); + break; + case 0x2: /* ldmdb */ + addr = addr - 4; + break; + case 0x3: /* ldmib */ + addr = addr + 4 + ((nregs - 1) << 2); + break; + } + db_read_bytes(addr, 4, (char *)&addr); + return (addr); + default: + panic("branch_taken: botch"); + } +} ==== //depot/projects/smpng/sys/arm/arm/db_trace.c#9 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.7 2004/11/01 22:15:13 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.8 2004/11/21 19:41:27 cognet Exp $"); #include #include @@ -87,53 +87,17 @@ #define FR_RFP (-3) static void -db_stack_trace_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) +db_stack_trace_cmd(db_expr_t addr, db_expr_t count) { u_int32_t *frame, *lastframe; c_db_sym_t sym; - char c, *cp = modif; const char *name; db_expr_t value; db_expr_t offset; boolean_t kernel_only = TRUE; - boolean_t trace_thread = FALSE; int scp_offset, quit; - if (kdb_frame == NULL && !have_addr) - return; - while (modif && ((c = *cp++) != 0)) { - if (c == 'u') - kernel_only = FALSE; - if (c == 't') - trace_thread = TRUE; - } - - if (!have_addr) - frame = (u_int32_t *)(kdb_frame->tf_r11); - else { - if (trace_thread) { - struct proc *p; - struct thread *td; - pid_t pid = (pid_t)addr; - LIST_FOREACH(p, &allproc, p_list) { - if (p->p_pid == pid) - break; - } - - if (p == NULL) { - db_printf("not found\n"); - return; - } - if (!(p->p_sflag & PS_INMEM)) { - db_printf("swapped out\n"); - return; - } - td = FIRST_THREAD_IN_PROC(p); - frame = (u_int32_t *)(td->td_pcb->un_32.pcb32_r11); - db_printf("at %p\n", frame); - } else - frame = (u_int32_t *)(addr); - } + frame = (u_int32_t *)addr; lastframe = NULL; scp_offset = -(get_pc_str_offset() >> 2); @@ -152,8 +116,6 @@ */ scp = frame[FR_SCP]; - db_printsym(scp, DB_STGY_PROC); - db_printf("\n\t"); sym = db_search_symbol(scp, DB_STGY_ANY, &offset); if (sym == C_DB_SYM_NULL) { value = 0; @@ -248,7 +210,7 @@ addr = (uint32_t)__builtin_frame_address(0); else addr = thr->td_pcb->un_32.pcb32_r11; - db_stack_trace_cmd(addr, 1, -1, NULL); + db_stack_trace_cmd(addr, -1); return (0); } ==== //depot/projects/smpng/sys/arm/arm/exception.S#4 (text+ko) ==== @@ -51,7 +51,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/exception.S,v 1.3 2004/09/23 22:05:39 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/exception.S,v 1.4 2004/11/20 16:52:30 cognet Exp $"); .text .align 0 @@ -206,122 +206,6 @@ * look like direct entry from the vector. */ ASENTRY_NP(undefined_entry) -#ifdef IPKDB -/* - * IPKDB must be hooked in at the earliest possible entry point. - * - */ -/* - * Make room for all registers saving real r0-r7 and r15. - * The remaining registers are updated later. - */ - stmfd sp!, {r0,r1} /* psr & spsr */ - stmfd sp!, {lr} /* pc */ - stmfd sp!, {r0-r14} /* r0-r7, r8-r14 */ -/* - * Get previous psr. - */ - mrs r7, cpsr_all - mrs r0, spsr_all - str r0, [sp, #(16*4)] -/* - * Test for user mode. - */ - tst r0, #0xf - bne .Lprenotuser_push - add r1, sp, #(8*4) - stmia r1,{r8-r14}^ /* store user mode r8-r14*/ - b .Lgoipkdb -/* - * Switch to previous mode to get r8-r13. - */ -.Lprenotuser_push: - orr r0, r0, #(I32_bit) /* disable interrupts */ - msr cpsr_all, r0 - mov r1, r8 - mov r2, r9 - mov r3, r10 - mov r4, r11 - mov r5, r12 - mov r6, r13 - msr cpsr_all, r7 /* back to undefined mode */ - add r8, sp, #(8*4) - stmia r8, {r1-r6} /* r8-r13 */ -/* - * Now back to previous mode to get r14 and spsr. - */ - msr cpsr_all, r0 - mov r1, r14 - mrs r2, spsr - msr cpsr_all, r7 /* back to undefined mode */ - str r1, [sp, #(14*4)] /* r14 */ - str r2, [sp, #(17*4)] /* spsr */ -/* - * Now to IPKDB. - */ -.Lgoipkdb: - mov r0, sp - bl _C_LABEL(ipkdb_trap_glue) - ldr r1, .Lipkdb_trap_return - str r0,[r1] - -/* - * Have to load all registers from the stack. - * - * Start with spsr and pc. - */ - ldr r0, [sp, #(16*4)] /* spsr */ - ldr r1, [sp, #(15*4)] /* r15 */ - msr spsr_all, r0 - mov r14, r1 -/* - * Test for user mode. - */ - tst r0, #0xf - bne .Lprenotuser_pull - add r1, sp, #(8*4) - ldmia r1, {r8-r14}^ /* load user mode r8-r14 */ - b .Lpull_r0r7 -.Lprenotuser_pull: -/* - * Now previous mode spsr and r14. - */ - ldr r1, [sp, #(17*4)] /* spsr */ - ldr r2, [sp, #(14*4)] /* r14 */ - orr r0, r0, #(I32_bit) - msr cpsr_all, r0 /* switch to previous mode */ - msr spsr_all, r1 - mov r14, r2 - msr cpsr_all, r7 /* back to undefined mode */ -/* - * Now r8-r13. - */ - add r8, sp, #(8*4) - ldmia r8, {r1-r6} /* r8-r13 */ - msr cpsr_all, r0 - mov r8, r1 - mov r9, r2 - mov r10, r3 - mov r11, r4 - mov r12, r5 - mov r13, r6 - msr cpsr_all, r7 -.Lpull_r0r7: -/* - * Now the rest of the registers. - */ - ldr r1,Lipkdb_trap_return - ldr r0,[r1] - tst r0,r0 - ldmfd sp!, {r0-r7} /* r0-r7 */ - add sp, sp, #(10*4) /* adjust sp */ - -/* - * Did IPKDB handle it? - */ - movnes pc, lr /* return */ - -#endif stmfd sp!, {r0, r1} ldr r0, Lundefined_handler_indirection ldr r1, [sp], #0x0004 @@ -330,10 +214,6 @@ str r1, [r0, #0x0004] ldmia r0, {r0, r1, pc} -#ifdef IPKDB -Lipkdb_trap_return: - .word Lipkdb_trap_return_data -#endif Lundefined_handler_indirection: .word Lundefined_handler_indirection_data ==== //depot/projects/smpng/sys/arm/arm/genassym.c#4 (text+ko) ==== @@ -26,12 +26,11 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.3 2004/11/12 21:49:05 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.4 2004/11/20 02:30:59 das Exp $"); #include #include #include #include -#include #include #include #include @@ -42,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -94,7 +94,6 @@ ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); ASSYM(TF_R1, offsetof(struct trapframe, tf_r1)); ASSYM(TF_PC, offsetof(struct trapframe, tf_pc)); -ASSYM(P_UAREA, offsetof(struct proc, p_uarea)); ASSYM(P_PID, offsetof(struct proc, p_pid)); ASSYM(P_FLAG, offsetof(struct proc, p_flag)); @@ -105,7 +104,6 @@ #endif ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); -ASSYM(USER_SIZE, sizeof(struct user)); ASSYM(P_TRACED, P_TRACED); ASSYM(P_SIGEVENT, P_SIGEVENT); ASSYM(P_PROFIL, P_PROFIL); ==== //depot/projects/smpng/sys/arm/arm/swtch.S#5 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:42:36 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9082B16A4D0; Tue, 23 Nov 2004 03:42:36 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69F6E16A4CE for ; Tue, 23 Nov 2004 03:42:36 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5515243D5E for ; Tue, 23 Nov 2004 03:42:36 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3gaeE001985 for ; Tue, 23 Nov 2004 03:42:36 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3galS001982 for perforce@freebsd.org; Tue, 23 Nov 2004 03:42:36 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:42:36 GMT Message-Id: <200411230342.iAN3galS001982@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65680 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:42:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=65680 Change 65680 by sam@sam_ebb on 2004/11/23 03:41:59 track forthcoming hal reorg Affected files ... .. //depot/projects/wifi/sys/conf/files.i386#4 edit Differences ... ==== //depot/projects/wifi/sys/conf/files.i386#4 (text+ko) ==== @@ -52,9 +52,14 @@ no-implicit-rule # hal.o optional ath_hal \ - dependency "$S/contrib/dev/ath/freebsd/i386-elf.hal.o.uu" \ - compile-with "uudecode < $S/contrib/dev/ath/freebsd/i386-elf.hal.o.uu" \ + dependency "$S/contrib/dev/ath/public/i386-elf.hal.o.uu" \ + compile-with "uudecode < $S/contrib/dev/ath/public/i386-elf.hal.o.uu" \ no-implicit-rule +opt_ah.h optional ath_hal \ + dependency "$S/contrib/dev/ath/public/i386-elf.opt_ah.h" \ + compile-with "cp $S/contrib/dev/ath/public/i386-elf.opt_ah.h opt_ah.h" \ + no-obj no-implicit-rule before-depend \ + clean "opt_ah.h" # hptmvraid.o optional hptmv \ dependency "$S/contrib/dev/hptmv/i386-elf.raid.o.uu" \ From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:42:37 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4369116A4DB; Tue, 23 Nov 2004 03:42:37 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1F6116A4F4 for ; Tue, 23 Nov 2004 03:42:36 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A607C43D5E for ; Tue, 23 Nov 2004 03:42:36 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3gaUA001992 for ; Tue, 23 Nov 2004 03:42:36 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3gauw001988 for perforce@freebsd.org; Tue, 23 Nov 2004 03:42:36 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:42:36 GMT Message-Id: <200411230342.iAN3gauw001988@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65681 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:42:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=65681 Change 65681 by sam@sam_ebb on 2004/11/23 03:42:23 define new hal options to suppress warnings from config Affected files ... .. //depot/projects/wifi/sys/conf/options#4 edit Differences ... ==== //depot/projects/wifi/sys/conf/options#4 (text+ko) ==== @@ -670,6 +670,9 @@ AH_SUPPORT_AR5210 opt_ah.h AH_SUPPORT_AR5211 opt_ah.h AH_SUPPORT_AR5212 opt_ah.h +AH_SUPPORT_AR5111 opt_ah.h +AH_SUPPORT_AR5112 opt_ah.h +AH_SUPPORT_AR2413 opt_ah.h AH_DEBUG opt_ah.h AH_DEBUG_ALQ opt_ah.h AH_ASSERT opt_ah.h From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:44:40 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F076616A4D0; Tue, 23 Nov 2004 03:44:39 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B197F16A4CE for ; Tue, 23 Nov 2004 03:44:39 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E30B43D60 for ; Tue, 23 Nov 2004 03:44:39 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3idH2002078 for ; Tue, 23 Nov 2004 03:44:39 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3idPC002075 for perforce@freebsd.org; Tue, 23 Nov 2004 03:44:39 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:44:39 GMT Message-Id: <200411230344.iAN3idPC002075@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65682 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:44:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=65682 Change 65682 by sam@sam_ebb on 2004/11/23 03:44:16 correct packet length calculation for the case where data padding is done Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#25 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#25 (text+ko) ==== @@ -2716,7 +2716,11 @@ iswep = wh->i_fc[1] & IEEE80211_FC1_WEP; ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); hdrlen = ieee80211_anyhdrsize(wh); - pktlen = m0->m_pkthdr.len; + /* + * Packet length must not include by any + * pad bytes; deduct it here. + */ + pktlen = m0->m_pkthdr.len - (hdrlen & 3); if (iswep) { const struct ieee80211_cipher *cip; From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:46:43 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E75B716A4D0; Tue, 23 Nov 2004 03:46:42 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A993516A4CE for ; Tue, 23 Nov 2004 03:46:42 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9437E43D49 for ; Tue, 23 Nov 2004 03:46:42 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3kgq0002165 for ; Tue, 23 Nov 2004 03:46:42 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3kgFA002162 for perforce@freebsd.org; Tue, 23 Nov 2004 03:46:42 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:46:42 GMT Message-Id: <200411230346.iAN3kgFA002162@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65683 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:46:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=65683 Change 65683 by sam@sam_ebb on 2004/11/23 03:46:00 check for ic_bss being null when handling ioctl to set promiscuous mode; this corrects a race that ocurrs when the bridge is loaded as a module Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#26 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#26 (text+ko) ==== @@ -4010,15 +4010,15 @@ ath_mode_init(sc); } else if (ifp->if_flags & IFF_UP) { /* - * Beware of being called during detach to - * reset promiscuous mode. In that case we + * Beware of being called during attach/detach + * to reset promiscuous mode. In that case we * will still be marked UP but not RUNNING. * However trying to re-init the interface * is the wrong thing to do as we've already * torn down much of our state. There's * probably a better way to deal with this. */ - if (!sc->sc_invalid) + if (!sc->sc_invalid && ic->ic_bss != NULL) ath_init(ifp); /* XXX lose error */ } else ath_stop_locked(ifp); From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:48:46 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D920916A4D0; Tue, 23 Nov 2004 03:48:45 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4C0616A4CE for ; Tue, 23 Nov 2004 03:48:45 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87A0A43D5C for ; Tue, 23 Nov 2004 03:48:45 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3mjkn002196 for ; Tue, 23 Nov 2004 03:48:45 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3mjZh002193 for perforce@freebsd.org; Tue, 23 Nov 2004 03:48:45 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:48:45 GMT Message-Id: <200411230348.iAN3mjZh002193@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65684 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:48:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=65684 Change 65684 by sam@sam_ebb on 2004/11/23 03:48:38 pack allocated vap identifiers Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211.c#10 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211.c#10 (text+ko) ==== @@ -65,10 +65,44 @@ SLIST_HEAD(ieee80211_list, ieee80211com); static struct ieee80211_list ieee80211_list = SLIST_HEAD_INITIALIZER(ieee80211_list); -static int ieee80211_vap = 0; /* next avail vap number */ +static u_int8_t ieee80211_vapmap[32]; /* enough for 256 */ static struct mtx ieee80211_vap_mtx; MTX_SYSINIT(ieee80211, &ieee80211_vap_mtx, "net80211 instances", MTX_DEF); +static void +ieee80211_add_vap(struct ieee80211com *ic) +{ +#define N(a) (sizeof(a)/sizeof(a[0])) + int i; + u_int8_t b; + + mtx_lock(&ieee80211_vap_mtx); + ic->ic_vap = 0; + for (i = 0; i < N(ieee80211_vapmap) && ieee80211_vapmap[i] == 0xff; i++) + ic->ic_vap += NBBY; + if (i == N(ieee80211_vapmap)) + panic("vap table full"); + for (b = ieee80211_vapmap[i]; b & 1; b >>= 1) + ic->ic_vap++; + setbit(ieee80211_vapmap, ic->ic_vap); + SLIST_INSERT_HEAD(&ieee80211_list, ic, ic_next); + mtx_unlock(&ieee80211_vap_mtx); +#undef N +} + +static void +ieee80211_remove_vap(struct ieee80211com *ic) +{ + mtx_lock(&ieee80211_vap_mtx); + SLIST_REMOVE(&ieee80211_list, ic, ieee80211com, ic_next); + KASSERT(ic->ic_vap < sizeof(ieee80211_vapmap)*NBBY, + ("invalid vap id %d", ic->ic_vap)); + KASSERT(isset(ieee80211_vapmap, ic->ic_vap), + ("vap id %d not allocated", ic->ic_vap)); + clrbit(ieee80211_vapmap, ic->ic_vap); + mtx_unlock(&ieee80211_vap_mtx); +} + void ieee80211_ifattach(struct ieee80211com *ic) { @@ -135,10 +169,7 @@ ieee80211_node_attach(ic); ieee80211_proto_attach(ic); - mtx_lock(&ieee80211_vap_mtx); - ic->ic_vap = ieee80211_vap++; /* XXX use bitmap */ - SLIST_INSERT_HEAD(&ieee80211_list, ic, ic_next); - mtx_unlock(&ieee80211_vap_mtx); + ieee80211_add_vap(ic); ieee80211_sysctl_attach(ic); /* NB: requires ic_vap */ } @@ -148,9 +179,7 @@ { struct ifnet *ifp = ic->ic_ifp; - mtx_lock(&ieee80211_vap_mtx); - SLIST_REMOVE(&ieee80211_list, ic, ieee80211com, ic_next); - mtx_unlock(&ieee80211_vap_mtx); + ieee80211_remove_vap(ic); ieee80211_sysctl_detach(ic); ieee80211_proto_detach(ic); From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:51:50 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EFB5F16A4D0; Tue, 23 Nov 2004 03:51:49 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5B9716A4CE for ; Tue, 23 Nov 2004 03:51:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B14BA43D55 for ; Tue, 23 Nov 2004 03:51:49 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3pn3k002314 for ; Tue, 23 Nov 2004 03:51:49 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3pnNQ002311 for perforce@freebsd.org; Tue, 23 Nov 2004 03:51:49 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:51:49 GMT Message-Id: <200411230351.iAN3pnNQ002311@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65685 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:51:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=65685 Change 65685 by sam@sam_ebb on 2004/11/23 03:51:02 add a %parent mib variable for finding the associated device (we'll want this for wds and multi-*ssid support) Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#4 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#4 (text+ko) ==== @@ -68,6 +68,15 @@ return 0; } +static int +ieee80211_sysctl_parent(SYSCTL_HANDLER_ARGS) +{ + struct ieee80211com *ic = arg1; + const char *name = ic->ic_ifp->if_xname; + + return SYSCTL_OUT(req, name, strlen(name)); +} + void ieee80211_sysctl_attach(struct ieee80211com *ic) { @@ -84,9 +93,11 @@ } sysctl_ctx_init(ctx); snprintf(num, sizeof(num), "%u", ic->ic_vap); - /* XXX wlan.%d with vap support */ oid = SYSCTL_ADD_NODE(ctx, &SYSCTL_NODE_CHILDREN(_net, wlan), OID_AUTO, num, CTLFLAG_RD, NULL, ""); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "%parent", CTLFLAG_RD, ic, 0, ieee80211_sysctl_parent, "A", + "parent device"); #ifdef IEEE80211_DEBUG ic->ic_debug = ieee80211_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:54:54 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4BD9216A4D0; Tue, 23 Nov 2004 03:54:54 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26EDE16A4CE for ; Tue, 23 Nov 2004 03:54:54 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2EAF43D48 for ; Tue, 23 Nov 2004 03:54:53 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3srqg002387 for ; Tue, 23 Nov 2004 03:54:53 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3srGl002384 for perforce@freebsd.org; Tue, 23 Nov 2004 03:54:53 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:54:53 GMT Message-Id: <200411230354.iAN3srGl002384@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65686 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:54:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=65686 Change 65686 by sam@sam_ebb on 2004/11/23 03:54:00 o checkpoint wme support (basic operation works for sta+ap) o cleanup power-save queue code for portability o synchronize beacon frame updates Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211.c#11 edit .. //depot/projects/wifi/sys/net80211/ieee80211.h#4 edit .. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.h#6 edit .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#16 edit .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#17 edit .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#11 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#18 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.h#11 edit .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#10 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#8 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#7 edit .. //depot/projects/wifi/sys/net80211/ieee80211_var.h#13 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211.c#11 (text+ko) ==== @@ -159,11 +159,19 @@ ic->ic_curmode = IEEE80211_MODE_AUTO; ic->ic_des_chan = IEEE80211_CHAN_ANYC; /* any channel is ok */ + /* + * Enable WME by default if we're capable. + */ + if (ic->ic_caps & IEEE80211_C_WME) + ic->ic_flags |= IEEE80211_F_WME; + (void) ieee80211_setmode(ic, ic->ic_curmode); if (ic->ic_lintval == 0) ic->ic_lintval = 100; /* default sleep */ ic->ic_bmisstimeout = 7*ic->ic_lintval; /* default 7 beacons */ + IEEE80211_BEACON_LOCK_INIT(ic, "beacon"); + ic->ic_txpowlimit = IEEE80211_TXPOWER_MAX; ieee80211_node_attach(ic); @@ -187,6 +195,8 @@ ieee80211_node_detach(ic); ifmedia_removeall(&ic->ic_media); + IEEE80211_BEACON_LOCK_DESTROY(ic); + bpfdetach(ifp); ether_ifdetach(ifp); } @@ -603,6 +613,7 @@ * is setup appropriately. */ ieee80211_reset_erp(ic); + ieee80211_wme_initparams(ic); /* after opmode change */ error = ENETRESET; } #ifdef notdef @@ -834,6 +845,7 @@ ic->ic_curmode = mode; ieee80211_reset_erp(ic); /* reset ERP state */ + ieee80211_wme_initparams(ic); /* reset WME stat */ return 0; #undef N ==== //depot/projects/wifi/sys/net80211/ieee80211.h#4 (text+ko) ==== @@ -171,9 +171,11 @@ #define IEEE80211_QOS_TXOP 0x00ff /* bit 8 is reserved */ -#define IEEE80211_QOS_ACKPOLICY 0x0600 -#define IEEE80211_QOS_ESOP 0x0800 -#define IEEE80211_QOS_TID 0xf000 +#define IEEE80211_QOS_ACKPOLICY 0x60 +#define IEEE80211_QOS_ACKPOLICY_S 5 +#define IEEE80211_QOS_ESOP 0x10 +#define IEEE80211_QOS_ESOP_S 4 +#define IEEE80211_QOS_TID 0x0f /* does frame have QoS sequence control data */ #define IEEE80211_QOS_HAS_SEQ(wh) \ @@ -184,14 +186,14 @@ /* * WME/802.11e information element. */ -struct ieee80211_ie_wme { +struct ieee80211_wme_info { u_int8_t wme_id; /* IEEE80211_ELEMID_VENDOR */ u_int8_t wme_len; /* length in bytes */ u_int8_t wme_oui[3]; /* 0x00, 0x50, 0xf2 */ u_int8_t wme_type; /* OUI type */ u_int8_t wme_subtype; /* OUI subtype */ u_int8_t wme_version; /* spec revision */ - u_int8_t wme_info; /* AC info */ + u_int8_t wme_info; /* QoS info */ } __packed; /* @@ -223,6 +225,56 @@ } __packed; /* + * WME AC parameter field + */ +struct ieee80211_wme_acparams { + u_int8_t acp_aci_aifsn; + u_int8_t acp_logcwminmax; + u_int16_t acp_txop; +} __packed; + +#define WME_NUM_AC 4 /* 4 AC categories */ + +#define WME_PARAM_ACI 0x60 /* Mask for ACI field */ +#define WME_PARAM_ACI_S 5 /* Shift for ACI field */ +#define WME_PARAM_ACM 0x10 /* Mask for ACM bit */ +#define WME_PARAM_ACM_S 4 /* Shift for ACM bit */ +#define WME_PARAM_AIFSN 0x0f /* Mask for aifsn field */ +#define WME_PARAM_AIFSN_S 0 /* Shift for aifsn field */ +#define WME_PARAM_LOGCWMIN 0x0f /* Mask for CwMin field (in log) */ +#define WME_PARAM_LOGCWMIN_S 0 /* Shift for CwMin field */ +#define WME_PARAM_LOGCWMAX 0xf0 /* Mask for CwMax field (in log) */ +#define WME_PARAM_LOGCWMAX_S 4 /* Shift for CwMax field */ + +#define WME_AC_TO_TID(_ac) ( \ + ((_ac) == WME_AC_VO) ? 6 : \ + ((_ac) == WME_AC_VI) ? 5 : \ + ((_ac) == WME_AC_BK) ? 1 : \ + 0) + +#define TID_TO_WME_AC(_tid) ( \ + ((_tid) < 1) ? WME_AC_BE : \ + ((_tid) < 3) ? WME_AC_BK : \ + ((_tid) < 6) ? WME_AC_VI : \ + WME_AC_VO) + +/* + * WME Parameter Element + */ +struct ieee80211_wme_param { + u_int8_t param_id; + u_int8_t param_len; + u_int8_t param_oui[3]; + u_int8_t param_oui_type; + u_int8_t param_oui_sybtype; + u_int8_t param_version; + u_int8_t param_qosInfo; +#define WME_QOSINFO_COUNT 0x0f /* Mask for param count field */ + u_int8_t param_reserved; + struct ieee80211_wme_acparams params_acParams[WME_NUM_AC]; +} __packed; + +/* * Management Notification Frame */ struct ieee80211_mnf { @@ -461,6 +513,8 @@ #define WME_OUI 0xf25000 #define WME_OUI_TYPE 0x02 +#define WME_INFO_OUI_SUBTYPE 0x00 +#define WME_PARAM_OUI_SUBTYPE 0x01 #define WME_VERSION 1 /* WME stream classes */ ==== //depot/projects/wifi/sys/net80211/ieee80211_freebsd.h#6 (text+ko) ==== @@ -30,6 +30,18 @@ #define _NET80211_IEEE80211_FREEBSD_H_ /* + * Beacon locking definitions. + */ +typedef struct mtx ieee80211_beacon_lock_t; +#define IEEE80211_BEACON_LOCK_INIT(_ic, _name) \ + mtx_init(&(_ic)->ic_beaconlock, _name, "802.11 beacon lock", MTX_DEF) +#define IEEE80211_BEACON_LOCK_DESTROY(_ic) mtx_destroy(&(_ic)->ic_beaconlock) +#define IEEE80211_BEACON_LOCK(_ic) mtx_lock(&(_ic)->ic_beaconlock) +#define IEEE80211_BEACON_UNLOCK(_ic) mtx_unlock(&(_ic)->ic_beaconlock) +#define IEEE80211_BEACON_LOCK_ASSERT(_ic) \ + mtx_assert(&(_ic)->ic_beaconlock, MA_OWNED) + +/* * Node locking definitions. */ typedef struct mtx ieee80211_node_lock_t; @@ -42,6 +54,30 @@ mtx_assert(&(_nt)->nt_nodelock, MA_OWNED) /* + * Per-node power-save queue definitions. + */ +#define IEEE80211_NODE_SAVEQ_INIT(_ni, _name) do { \ + mtx_init(&(_ni)->ni_savedq.ifq_mtx, _name, "802.11 ps queue", MTX_DEF);\ + (_ni)->ni_savedq.ifq_maxlen = IEEE80211_PS_MAX_QUEUE; \ +} while (0) +#define IEEE80211_NODE_SAVEQ_DESTROY(_ni) \ + mtx_destroy(&(_ni)->ni_savedq.ifq_mtx) +#define IEEE80211_NODE_SAVEQ_QLEN(_ni) \ + _IF_QLEN(&(_ni)->ni_savedq) +#define IEEE80211_NODE_SAVEQ_DEQUEUE(_ni, _m, _qlen) do { \ + IF_LOCK(&(_ni)->ni_savedq); \ + _IF_DEQUEUE(&(_ni)->ni_savedq, _m); \ + (_qlen) = _IF_QLEN(&(_ni)->ni_savedq); \ + IF_UNLOCK(&(_ni)->ni_savedq); \ +} while (0) +#define IEEE80211_NODE_SAVEQ_DRAIN(_ni, _qlen) do { \ + IF_LOCK(&(_ni)->ni_savedq); \ + (_qlen) = _IF_QLEN(&(_ni)->ni_savedq); \ + _IF_DRAIN(&(_ni)->ni_savedq); \ + IF_UNLOCK(&(_ni)->ni_savedq); \ +} while (0) + +/* * 802.1x MAC ACL database locking definitions. */ typedef struct mtx acl_lock_t; ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#16 (text+ko) ==== @@ -230,26 +230,36 @@ ni->ni_rssi = rssi; ni->ni_rstamp = rstamp; if (HAS_SEQ(type)) { + u_int8_t tid; + if (IEEE80211_QOS_HAS_SEQ(wh)) { + tid = ((struct ieee80211_qosframe *)wh)-> + i_qos[0] & IEEE80211_QOS_TID; + if (tid >= WME_AC_VI) + ic->ic_wme.wme_hipri_traffic++; + tid++; + } else + tid = 0; rxseq = le16toh(*(u_int16_t *)wh->i_seq); - /* NB: QoS frames are handled separately below */ if ((wh->i_fc[1] & IEEE80211_FC1_RETRY) && - (type != IEEE80211_FC0_TYPE_DATA || - (subtype & IEEE80211_FC0_SUBTYPE_QOS) == 0) && - SEQ_LEQ(rxseq, ni->ni_rxseq)) { + SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { /* duplicate, discard */ IEEE80211_DPRINTF(ic, IEEE80211_MSG_INPUT, - "[%s] discard duplicate frame, " - "seqno <%u,%u> fragno <%u,%u>\n", - ether_sprintf(bssid), - rxseq >> IEEE80211_SEQ_SEQ_SHIFT, - ni->ni_rxseq >> IEEE80211_SEQ_SEQ_SHIFT, - rxseq & IEEE80211_SEQ_FRAG_MASK, - ni->ni_rxseq & IEEE80211_SEQ_FRAG_MASK); + "[%s] discard duplicate frame, " + "seqno <%u,%u> fragno <%u,%u> tid %u\n" + , ether_sprintf(bssid) + , rxseq >> IEEE80211_SEQ_SEQ_SHIFT + , ni->ni_rxseqs[tid] >> + IEEE80211_SEQ_SEQ_SHIFT + , rxseq & IEEE80211_SEQ_FRAG_MASK + , ni->ni_rxseqs[tid] & + IEEE80211_SEQ_FRAG_MASK + , tid + ); ic->ic_stats.is_rx_dup++; IEEE80211_NODE_STAT(ni, rx_dup); goto out; } - ni->ni_rxseq = rxseq; + ni->ni_rxseqs[tid] = rxseq; } } @@ -258,7 +268,8 @@ hdrsize = ieee80211_hdrsize(wh); if (ic->ic_flags & IEEE80211_F_DATAPAD) hdrsize = roundup(hdrsize, sizeof(u_int32_t)); - if (m->m_pkthdr.len < hdrsize) { + if (m->m_len < hdrsize && + (m = m_pullup(m, hdrsize)) == NULL) { IEEE80211_DPRINTF(ic, IEEE80211_MSG_ANY, "[%s] data frame too short, len %u, expecting %u\n", ether_sprintf(ieee80211_getbssid(ic, wh)), @@ -267,38 +278,15 @@ goto out; /* XXX */ } if (subtype & IEEE80211_FC0_SUBTYPE_QOS) { - u_int8_t tid; - /* XXX discard if node w/o IEEE80211_NODE_QOS? */ /* - * Check per-tid rx sequence counter for retries. - */ - tid = ((struct ieee80211_qosframe *)wh)->i_qos[0] & 0xf; - rxseq = le16toh(*(u_int16_t *)wh->i_seq); - if ((wh->i_fc[1] & IEEE80211_FC1_RETRY) && - SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { - /* duplicate, discard */ - IEEE80211_DPRINTF(ic, IEEE80211_MSG_INPUT, - "[%s] discard duplicate QoS frame," - " seqno <%u,%u> fragno <%u,%u>\n", - ether_sprintf(ieee80211_getbssid(ic, wh)), - rxseq >> IEEE80211_SEQ_SEQ_SHIFT, - ni->ni_rxseqs[tid] >> IEEE80211_SEQ_SEQ_SHIFT, - rxseq & IEEE80211_SEQ_FRAG_MASK, - ni->ni_rxseqs[tid] & IEEE80211_SEQ_FRAG_MASK); - ic->ic_stats.is_rx_dup++; - IEEE80211_NODE_STAT(ni, rx_dup); - goto out; - } - ni->ni_rxseqs[tid] = rxseq; - /* - * Strip QoS header and any padding so only a + * Strip QoS control and any padding so only a * stock 802.11 header is at the front. */ /* XXX 4-address QoS frame */ off = hdrsize - sizeof(struct ieee80211_frame); ovbcopy(mtod(m, u_int8_t *), mtod(m, u_int8_t *) + off, - sizeof(struct ieee80211_frame)); + hdrsize - off); m_adj(m, off); wh = mtod(m, struct ieee80211_frame *); wh->i_fc[0] &= ~IEEE80211_FC0_SUBTYPE_QOS; @@ -715,8 +703,8 @@ static struct mbuf * ieee80211_decap(struct ieee80211com *ic, struct mbuf *m) { + struct ieee80211_frame wh; /* NB: QoS stripped above */ struct ether_header *eh; - struct ieee80211_frame wh; struct llc *llc; if (m->m_len < sizeof(wh) + sizeof(*llc) && @@ -1228,6 +1216,20 @@ } static int __inline +iswmeparam(const u_int8_t *frm) +{ + return frm[1] > 5 && LE_READ_4(frm+2) == ((WME_OUI_TYPE<<24)|WME_OUI) && + frm[6] == WME_PARAM_OUI_SUBTYPE; +} + +static int __inline +iswmeinfo(const u_int8_t *frm) +{ + return frm[1] > 5 && LE_READ_4(frm+2) == ((WME_OUI_TYPE<<24)|WME_OUI) && + frm[6] == WME_INFO_OUI_SUBTYPE; +} + +static int __inline isatherosoui(const u_int8_t *frm) { return frm[1] > 3 && LE_READ_4(frm+2) == ((ATH_OUI_TYPE<<24)|ATH_OUI); @@ -1541,6 +1543,41 @@ return 0; } +static int +ieee80211_parse_wmeparams(struct ieee80211com *ic, u_int8_t *frm) +{ +#define MS(_v, _f) (((_v) & _f) >> _f##_S) + struct ieee80211_wme_state *wme = &ic->ic_wme; + u_int len = frm[1], qosinfo; + int i; + + if (len < sizeof(struct ieee80211_wme_param)) { + IEEE80211_DPRINTF(ic, IEEE80211_MSG_ELEMID | IEEE80211_MSG_WME, + "%s: length %u too short\n", __func__, len); + return 0; + } + qosinfo = frm[__offsetof(struct ieee80211_wme_param, param_qosInfo)]; + if ((qosinfo & WME_QOSINFO_COUNT) < wme->wme_wmeChanParams.cap_info) { + IEEE80211_DPRINTF(ic, IEEE80211_MSG_ELEMID | IEEE80211_MSG_WME, + "%s: count mismatch, qosinfo 0x%x expected 0x%x\n", + __func__, qosinfo, wme->wme_wmeChanParams.cap_info); + return 0; + } + frm += __offsetof(struct ieee80211_wme_param, params_acParams); + for (i = 0; i < WME_NUM_AC; i++) { + struct wmeParams *wmep = &wme->wme_chanParams.cap_wmeParams[i]; + /* NB: ACI not used */ + wmep->wmep_acm = MS(frm[0], WME_PARAM_ACM); + wmep->wmep_aifsn = MS(frm[0], WME_PARAM_AIFSN); + wmep->wmep_logcwmin = MS(frm[1], WME_PARAM_LOGCWMIN); + wmep->wmep_logcwmax = MS(frm[1], WME_PARAM_LOGCWMAX); + wmep->wmep_txopLimit = LE_READ_2(frm+2); + frm += 4; + } + return 1; +#undef MS +} + static void ieee80211_saveie(u_int8_t **iep, const u_int8_t *ie) { @@ -1713,7 +1750,7 @@ case IEEE80211_ELEMID_VENDOR: if (iswpaoui(frm)) wpa = frm; - else if (iswmeoui(frm)) + else if (iswmeparam(frm) || iswmeinfo(frm)) wme = frm; /* XXX Atheros OUI support */ break; @@ -1764,8 +1801,7 @@ /* * When operating in station mode, check for state updates. * Be careful to ignore beacons received while doing a - * background scan. We consider only 11g stuff right now - * (XXX WME to come). + * background scan. We consider only 11g/WMM stuff right now. */ if (ni->ni_associd != 0 && ((ic->ic_flags & IEEE80211_F_SCAN) == 0 || @@ -1800,6 +1836,8 @@ ni->ni_capinfo = capinfo; /* XXX statistic */ } + if (wme != NULL && ieee80211_parse_wmeparams(ic, wme)) + ieee80211_wme_updateparams(ic); ni->ni_inact = ic->ic_inact_run; /* NB: don't need the rest of this */ return; @@ -2081,7 +2119,7 @@ if (iswpaoui(frm)) { if (ic->ic_flags & IEEE80211_F_WPA1) wpa = frm; - } else if (iswmeoui(frm)) + } else if (iswmeinfo(frm)) wme = frm; /* XXX Atheros OUI support */ break; @@ -2205,7 +2243,7 @@ * as capable of QoS and record information * element for applications that require it. */ - ieee80211_saveie(&ni->ni_wpa_ie, wpa); + ieee80211_saveie(&ni->ni_wme_ie, wme); ni->ni_flags |= IEEE80211_NODE_QOS; } else if (ni->ni_wme_ie != NULL) { /* @@ -2294,9 +2332,10 @@ ni->ni_capinfo = capinfo; ni->ni_associd = associd; - if (wme != NULL) + if (wme != NULL && ieee80211_parse_wmeparams(ic, wme)) { ni->ni_flags |= IEEE80211_NODE_QOS; - else + ieee80211_wme_updateparams(ic); + } else ni->ni_flags &= ~IEEE80211_NODE_QOS; /* * Configure state now that we are associated. @@ -2455,15 +2494,17 @@ /* * Flush queued unicast frames. */ - if (_IF_QLEN(&ni->ni_savedq) == 0) { + if (IEEE80211_NODE_SAVEQ_QLEN(ni) == 0) { ic->ic_set_tim(ic, ni, 0); /* just in case */ return; } IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER, "[%s] flush ps queue, %u packets queued\n", - ether_sprintf(ni->ni_macaddr), _IF_QLEN(&ni->ni_savedq)); + ether_sprintf(ni->ni_macaddr), IEEE80211_NODE_SAVEQ_QLEN(ni)); for (;;) { - _IF_DEQUEUE(&ni->ni_savedq, m); + int qlen; + + IEEE80211_NODE_SAVEQ_DEQUEUE(ni, m, qlen); if (m == NULL) break; /* @@ -2471,12 +2512,13 @@ * If there are more packets, set the more packets bit * in the packet dispatched to the station. */ - if (_IF_QLEN(&ni->ni_savedq) != 0) { + if (qlen != 0) { struct ieee80211_frame_min *wh = mtod(m, struct ieee80211_frame_min *); wh->i_fc[1] |= IEEE80211_FC1_MORE_DATA; } /* XXX need different driver interface */ + /* XXX bypasses q max */ IF_ENQUEUE(&ic->ic_ifp->if_snd, m); } } @@ -2491,6 +2533,7 @@ struct ieee80211_frame_min *wh; struct mbuf *m; u_int16_t aid; + int qlen; wh = mtod(m0, struct ieee80211_frame_min *); if (ni->ni_associd == 0) { @@ -2516,7 +2559,7 @@ ni->ni_inact = ic->ic_inact_run; /* Okay, take the first queued packet and put it out... */ - _IF_DEQUEUE(&ni->ni_savedq, m); + IEEE80211_NODE_SAVEQ_DEQUEUE(ni, m, qlen); if (m == NULL) { IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER, "[%s] got ps-poll, but queue empty\n", @@ -2533,8 +2576,8 @@ */ IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER, "[%s] got ps-poll, send packet, %u still queued\n", - ether_sprintf(ni->ni_macaddr), _IF_QLEN(&ni->ni_savedq)); - if (_IF_QLEN(&ni->ni_savedq) != 0) { + ether_sprintf(ni->ni_macaddr), qlen); + if (qlen != 0) { wh = mtod(m, struct ieee80211_frame_min *); wh->i_fc[1] |= IEEE80211_FC1_MORE_DATA; } else ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#17 (text+ko) ==== @@ -1056,9 +1056,13 @@ si->isi_associd = ni->ni_associd; si->isi_txpower = ni->ni_txpower; si->isi_vlan = ni->ni_vlan; - si->isi_txseq = ni->ni_txseq; - si->isi_rxseq = ni->ni_rxseq; - memcpy(si->isi_rxseqs, ni->ni_rxseqs, sizeof(ni->ni_rxseqs)); + if (ni->ni_flags & IEEE80211_NODE_QOS) { + memcpy(si->isi_txseqs, ni->ni_txseqs, sizeof(ni->ni_txseqs)); + memcpy(si->isi_rxseqs, ni->ni_rxseqs, sizeof(ni->ni_rxseqs)); + } else { + si->isi_txseqs[0] = ni->ni_txseqs[0]; + si->isi_rxseqs[0] = ni->ni_rxseqs[0]; + } if (ic->ic_opmode == IEEE80211_M_IBSS || ni->ni_associd != 0) si->isi_inact = ic->ic_inact_run; else if (ieee80211_node_is_authorized(ni)) @@ -1137,6 +1141,46 @@ } static int +ieee80211_ioctl_getwmeparam(struct ieee80211com *ic, struct ieee80211req *ireq) +{ + struct ieee80211_wme_state *wme = &ic->ic_wme; + struct wmeParams *wmep; + int ac; + + if ((ic->ic_caps & IEEE80211_C_WME) == 0) + return EINVAL; + + ac = (ireq->i_len & IEEE80211_WMEPARAM_VAL); + if (ac >= WME_NUM_AC) + ac = WME_AC_BE; + if (ireq->i_len & IEEE80211_WMEPARAM_BSS) + wmep = &wme->wme_bssChanParams.cap_wmeParams[ac]; + else + wmep = &wme->wme_wmeBssChanParams.cap_wmeParams[ac]; + switch (ireq->i_type) { + case IEEE80211_IOC_WME_CWMIN: /* WME: CWmin */ + ireq->i_val = wmep->wmep_logcwmin; + break; + case IEEE80211_IOC_WME_CWMAX: /* WME: CWmax */ + ireq->i_val = wmep->wmep_logcwmax; + break; + case IEEE80211_IOC_WME_AIFS: /* WME: AIFS */ + ireq->i_val = wmep->wmep_aifsn; + break; + case IEEE80211_IOC_WME_TXOPLIMIT: /* WME: txops limit */ + ireq->i_val = wmep->wmep_txopLimit; + break; + case IEEE80211_IOC_WME_ACM: /* WME: ACM (bss only) */ + ireq->i_val = wmep->wmep_acm; + break; + case IEEE80211_IOC_WME_ACKPOLICY: /* WME: ACK policy (!bss only)*/ + ireq->i_val = wmep->wmep_noackPolicy; + break; + } + return 0; +} + +static int ieee80211_ioctl_get80211(struct ieee80211com *ic, u_long cmd, struct ieee80211req *ireq) { const struct ieee80211_rsnparms *rsn = &ic->ic_bss->ni_rsn; @@ -1326,6 +1370,14 @@ case IEEE80211_IOC_STA_INFO: error = ieee80211_ioctl_getstainfo(ic, ireq); break; + case IEEE80211_IOC_WME_CWMIN: /* WME: CWmin */ + case IEEE80211_IOC_WME_CWMAX: /* WME: CWmax */ + case IEEE80211_IOC_WME_AIFS: /* WME: AIFS */ + case IEEE80211_IOC_WME_TXOPLIMIT: /* WME: txops limit */ + case IEEE80211_IOC_WME_ACM: /* WME: ACM (bss only) */ + case IEEE80211_IOC_WME_ACKPOLICY: /* WME: ACK policy (bss only) */ + error = ieee80211_ioctl_getwmeparam(ic, ireq); + break; default: error = EINVAL; break; @@ -1650,6 +1702,81 @@ } static int +ieee80211_ioctl_setwmeparam(struct ieee80211com *ic, struct ieee80211req *ireq) +{ + struct ieee80211_wme_state *wme = &ic->ic_wme; + struct wmeParams *wmep, *chanp; + int isbss, ac; + + if ((ic->ic_caps & IEEE80211_C_WME) == 0) + return EINVAL; + + isbss = (ireq->i_len & IEEE80211_WMEPARAM_BSS); + ac = (ireq->i_len & IEEE80211_WMEPARAM_VAL); + if (ac >= WME_NUM_AC) + ac = WME_AC_BE; + if (isbss) { + chanp = &wme->wme_bssChanParams.cap_wmeParams[ac]; + wmep = &wme->wme_wmeBssChanParams.cap_wmeParams[ac]; + } else { + chanp = &wme->wme_chanParams.cap_wmeParams[ac]; + wmep = &wme->wme_wmeChanParams.cap_wmeParams[ac]; + } + switch (ireq->i_type) { + case IEEE80211_IOC_WME_CWMIN: /* WME: CWmin */ + if (isbss) { + wmep->wmep_logcwmin = ireq->i_val; + if ((wme->wme_flags & WME_F_AGGRMODE) == 0) + chanp->wmep_logcwmin = ireq->i_val; + } else { + wmep->wmep_logcwmin = chanp->wmep_logcwmin = + ireq->i_val; + } + break; + case IEEE80211_IOC_WME_CWMAX: /* WME: CWmax */ + if (isbss) { + wmep->wmep_logcwmax = ireq->i_val; + if ((wme->wme_flags & WME_F_AGGRMODE) == 0) + chanp->wmep_logcwmax = ireq->i_val; + } else { + wmep->wmep_logcwmax = chanp->wmep_logcwmax = + ireq->i_val; + } + break; + case IEEE80211_IOC_WME_AIFS: /* WME: AIFS */ + if (isbss) { + wmep->wmep_aifsn = ireq->i_val; + if ((wme->wme_flags & WME_F_AGGRMODE) == 0) + chanp->wmep_aifsn = ireq->i_val; + } else { + wmep->wmep_aifsn = chanp->wmep_aifsn = ireq->i_val; + } + break; + case IEEE80211_IOC_WME_TXOPLIMIT: /* WME: txops limit */ + if (isbss) { + wmep->wmep_txopLimit = ireq->i_val; + if ((wme->wme_flags & WME_F_AGGRMODE) == 0) + chanp->wmep_txopLimit = ireq->i_val; + } else { + wmep->wmep_txopLimit = chanp->wmep_txopLimit = + ireq->i_val; + } + break; + case IEEE80211_IOC_WME_ACM: /* WME: ACM (bss only) */ + wmep->wmep_acm = ireq->i_val; + if ((wme->wme_flags & WME_F_AGGRMODE) == 0) + chanp->wmep_acm = ireq->i_val; + break; + case IEEE80211_IOC_WME_ACKPOLICY: /* WME: ACK policy (!bss only)*/ + wmep->wmep_noackPolicy = chanp->wmep_noackPolicy = + (ireq->i_val) != 0; + break; + } + ieee80211_wme_updateparams(ic); + return 0; +} + +static int cipher2cap(int cipher) { switch (cipher) { @@ -1923,12 +2050,13 @@ error = ENETRESET; /* XXX? */ break; case IEEE80211_IOC_WME: - if (ic->ic_opmode != IEEE80211_M_STA) - return EINVAL; - if (ireq->i_val) + if (ireq->i_val) { + if ((ic->ic_caps & IEEE80211_C_WME) == 0) + return EINVAL; ic->ic_flags |= IEEE80211_F_WME; - else + } else ic->ic_flags &= ~IEEE80211_F_WME; + error = ENETRESET; /* XXX maybe not for station? */ break; case IEEE80211_IOC_HIDESSID: if (ireq->i_val) @@ -2033,6 +2161,14 @@ case IEEE80211_IOC_STA_TXPOW: error = ieee80211_ioctl_setstatxpow(ic, ireq); break; + case IEEE80211_IOC_WME_CWMIN: /* WME: CWmin */ + case IEEE80211_IOC_WME_CWMAX: /* WME: CWmax */ + case IEEE80211_IOC_WME_AIFS: /* WME: AIFS */ + case IEEE80211_IOC_WME_TXOPLIMIT: /* WME: txops limit */ + case IEEE80211_IOC_WME_ACM: /* WME: ACM (bss only) */ + case IEEE80211_IOC_WME_ACKPOLICY: /* WME: ACK policy (bss only) */ + error = ieee80211_ioctl_setwmeparam(ic, ireq); + break; default: error = EINVAL; break; ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#11 (text+ko) ==== @@ -296,13 +296,12 @@ /* negotiated rates */ u_int8_t isi_rates[IEEE80211_RATE_MAXSIZE]; u_int8_t isi_txrate; /* index to isi_rates[] */ - u_int8_t isi_ie_len; /* IE length */ + u_int16_t isi_ie_len; /* IE length */ u_int16_t isi_associd; /* assoc response */ u_int16_t isi_txpower; /* current tx power */ u_int16_t isi_vlan; /* vlan tag */ - u_int16_t isi_txseq; /* seq to be transmitted */ - u_int16_t isi_rxseq; /* seq previous received */ - u_int16_t isi_rxseqs[16]; /* seq previous for qos frames*/ + u_int16_t isi_txseqs[17]; /* seq to be transmitted */ + u_int16_t isi_rxseqs[17]; /* seq previous for qos frames*/ u_int16_t isi_inact; /* inactivity timer */ /* XXX frag state? */ /* variable length IE data */ @@ -329,6 +328,16 @@ u_int8_t it_txpow; }; +/* + * WME parameters are set and return using i_val and i_len. + * i_val holds the value itself. i_len specifies the AC + * and, as appropriate, then high bit specifies whether the + * operation is to be applied to the BSS or ourself. + */ +#define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */ +#define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */ +#define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */ + #ifdef __FreeBSD__ /* * FreeBSD-style ioctls. @@ -402,6 +411,12 @@ #define IEEE80211_IOC_TXPOWMAX 43 /* max tx power for channel */ #define IEEE80211_IOC_STA_TXPOW 44 /* per-station tx power limit */ #define IEEE80211_IOC_STA_INFO 45 /* station/neighbor info */ +#define IEEE80211_IOC_WME_CWMIN 46 /* WME: CWmin */ +#define IEEE80211_IOC_WME_CWMAX 47 /* WME: CWmax */ +#define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFS */ +#define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */ +#define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */ +#define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/ /* * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS. ==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#18 (text+ko) ==== @@ -427,6 +427,7 @@ * mode is locked. */ ieee80211_reset_erp(ic); + ieee80211_wme_initparams(ic); ieee80211_new_state(ic, IEEE80211_S_RUN, -1); } @@ -766,6 +767,7 @@ */ ic->ic_curmode = ieee80211_chan2mode(ic, selbs->ni_chan); ieee80211_reset_erp(ic); + ieee80211_wme_initparams(ic); if (ic->ic_opmode == IEEE80211_M_IBSS) ieee80211_new_state(ic, IEEE80211_S_RUN, -1); else @@ -805,7 +807,7 @@ { #define N(a) (sizeof(a)/sizeof(a[0])) struct ieee80211com *ic = ni->ni_ic; - int i; + int i, qlen; /* NB: preserve ni_table */ if (ni->ni_flags & IEEE80211_NODE_PWR_MGT) { @@ -815,14 +817,14 @@ "[%s] power save mode off, %u sta's in ps mode\n", ether_sprintf(ni->ni_macaddr), ic->ic_ps_sta); } - if (_IF_QLEN(&ni->ni_savedq) != 0) { - /* - * Drain power save queue. - */ - _IF_DRAIN(&ni->ni_savedq); - if (ic->ic_set_tim != NULL) - ic->ic_set_tim(ic, ni, 0); - } + + /* + * Drain power save queue and, if needed, clear TIM. + */ + IEEE80211_NODE_SAVEQ_DRAIN(ni, qlen); + if (qlen != 0 && ic->ic_set_tim != NULL) + ic->ic_set_tim(ic, ni, 0); + ni->ni_associd = 0; if (ni->ni_challenge != NULL) { FREE(ni->ni_challenge, M_DEVBUF); @@ -859,6 +861,7 @@ FREE(ni->ni_wpa_ie, M_DEVBUF); if (ni->ni_wme_ie != NULL) FREE(ni->ni_wme_ie, M_DEVBUF); + IEEE80211_NODE_SAVEQ_DESTROY(ni); FREE(ni, M_80211_NODE); } @@ -887,6 +890,7 @@ ni->ni_txpower = ic->ic_txpowlimit; /* max power */ ieee80211_crypto_resetkey(ic, &ni->ni_ucastkey, IEEE80211_KEYIX_NONE); ni->ni_inact = nt->nt_inact_init; + IEEE80211_NODE_SAVEQ_INIT(ni, "unknown"); IEEE80211_NODE_LOCK(nt); TAILQ_INSERT_TAIL(&nt->nt_node, ni, ni_list); @@ -1395,9 +1399,9 @@ printf("\tassocid 0x%x txpower %u vlan %u\n", ni->ni_associd, ni->ni_txpower, ni->ni_vlan); printf("\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n", - ni->ni_txseq, - ni->ni_rxseq >> IEEE80211_SEQ_SEQ_SHIFT, - ni->ni_rxseq & IEEE80211_SEQ_FRAG_MASK, + ni->ni_txseqs[0], + ni->ni_rxseqs[0] >> IEEE80211_SEQ_SEQ_SHIFT, + ni->ni_rxseqs[0] & IEEE80211_SEQ_FRAG_MASK, ni->ni_rxfragstamp); printf("\trstamp %u rssi %u intval %u capinfo 0x%x\n", ni->ni_rstamp, ni->ni_rssi, ni->ni_intval, ni->ni_capinfo); @@ -1500,6 +1504,7 @@ } ni->ni_associd = aid | 0xc000; IEEE80211_AID_SET(ni->ni_associd, ic->ic_aid_bitmap); + ic->ic_sta_assoc++; newassoc = 1; if (ic->ic_curmode == IEEE80211_MODE_11G) ieee80211_node_join_11g(ic, ni); @@ -1615,6 +1620,7 @@ ic->ic_auth->ia_node_leave(ic, ni); IEEE80211_AID_CLR(ni->ni_associd, ic->ic_aid_bitmap); ni->ni_associd = 0; + ic->ic_sta_assoc--; if (ic->ic_curmode == IEEE80211_MODE_11G) ieee80211_node_leave_11g(ic, ni); @@ -1700,7 +1706,7 @@ KASSERT(aid < ic->ic_max_aid, ("bogus aid %u, max %u", aid, ic->ic_max_aid)); - /* XXX locking */ + IEEE80211_BEACON_LOCK(ic); if (set != (isset(ic->ic_tim_bitmap, aid) != 0)) { if (set) { setbit(ic->ic_tim_bitmap, aid); @@ -1714,6 +1720,7 @@ ether_sprintf(ni->ni_macaddr), aid, set ? "" : "no "); ic->ic_flags |= IEEE80211_F_TIMUPDATE; } + IEEE80211_BEACON_UNLOCK(ic); } /* ==== //depot/projects/wifi/sys/net80211/ieee80211_node.h#11 (text+ko) ==== @@ -105,9 +105,8 @@ u_int32_t *ni_challenge; /* shared-key challenge */ u_int8_t *ni_wpa_ie; /* captured WPA/RSN ie */ u_int8_t *ni_wme_ie; /* captured WME ie */ - u_int16_t ni_txseq; /* seq to be transmitted */ - u_int16_t ni_rxseq; /* seq previous received */ - u_int16_t ni_rxseqs[16]; /* seq previous for qos frames*/ + u_int16_t ni_txseqs[17]; /* tx seq per-tid */ + u_int16_t ni_rxseqs[17]; /* rx seq previous per-tid*/ u_int32_t ni_rxfragstamp; /* time stamp of last rx frag */ struct mbuf *ni_rxfrag[3]; /* rx frag reassembly */ struct ieee80211_rsnparms ni_rsn; /* RSN/WPA parameters */ @@ -141,17 +140,7 @@ int ni_fails; /* failure count to associate */ int ni_inact; /* inactivity mark count */ int ni_txrate; /* index to ni_rates[] */ - /* - * NB: this queue is manipulated without explicit locking, - * so always use the _ variant macros. We might be better - * off just rolling our own packet queue to avoid these - * shenanigans. - */ -#if 1 - struct ifaltq ni_savedq; /* ps-poll queue */ -#else struct ifqueue ni_savedq; /* ps-poll queue */ -#endif struct ieee80211_nodestats ni_stats; /* per-node statistics */ }; MALLOC_DECLARE(M_80211_NODE); ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#10 (text+ko) ==== @@ -117,8 +117,8 @@ wh->i_fc[1] = IEEE80211_FC1_DIR_NODS; *(u_int16_t *)wh->i_dur = 0; *(u_int16_t *)wh->i_seq = - htole16(ni->ni_txseq << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseq++; + htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[0]++; /* * Hack. When sending PROBE_REQ frames while scanning we * explicitly force a broadcast rather than (as before) clobber @@ -186,8 +186,8 @@ IEEE80211_FC0_SUBTYPE_NODATA; *(u_int16_t *)wh->i_dur = 0; *(u_int16_t *)wh->i_seq = - htole16(ni->ni_txseq << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseq++; + htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[0]++; /* XXX WDS */ wh->i_fc[1] = IEEE80211_FC1_DIR_FROMDS; @@ -272,6 +272,122 @@ #undef TO_BE_RECLAIMED } +/* + * Assign priority to a frame based on any vlan tag assigned + * to the station and/or any Diffserv setting in an IP header. + * Finally, if an ACM policy is setup (in station mode) it's + * applied. + */ +int +ieee80211_classify(struct ieee80211com *ic, struct mbuf *m, struct ieee80211_node *ni) +{ + int v_wme_ac, d_wme_ac, ac; +#ifdef INET + struct ether_header *eh; +#endif + + if ((ni->ni_flags & IEEE80211_NODE_QOS) == 0) { + ac = WME_AC_BE; + goto done; + } + + /* + * If node has a vlan tag then all traffic + * to it must have a matching tag. + */ + v_wme_ac = 0; + if (ni->ni_vlan != 0) { + struct m_tag *mtag = VLAN_OUTPUT_TAG(ic->ic_ifp, m); + if (mtag != NULL) { + IEEE80211_NODE_STAT(ni, tx_novlantag); + return 1; + } + if (EVL_VLANOFTAG(VLAN_TAG_VALUE(mtag)) != + EVL_VLANOFTAG(ni->ni_vlan)) { + IEEE80211_NODE_STAT(ni, tx_vlanmismatch); + return 1; + } + /* map vlan priority to AC */ + switch (EVL_PRIOFTAG(ni->ni_vlan)) { + case 1: + case 2: + v_wme_ac = WME_AC_BK; + break; + case 0: + case 3: + v_wme_ac = WME_AC_BE; + break; + case 4: + case 5: + v_wme_ac = WME_AC_VI; + break; + case 6: + case 7: + v_wme_ac = WME_AC_VO; + break; + } + } >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:54:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7DD4E16A4D9; Tue, 23 Nov 2004 03:54:55 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34B1E16A4E9 for ; Tue, 23 Nov 2004 03:54:54 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 568A143D48 for ; Tue, 23 Nov 2004 03:54:54 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3ss55002394 for ; Tue, 23 Nov 2004 03:54:54 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3srcx002390 for perforce@freebsd.org; Tue, 23 Nov 2004 03:54:53 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:54:53 GMT Message-Id: <200411230354.iAN3srcx002390@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65687 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:54:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=65687 Change 65687 by sam@sam_ebb on 2004/11/23 03:54:42 checkpoint wme support (need to deal with CTS bursting) Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#27 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#9 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#27 (text+ko) ==== @@ -134,6 +134,7 @@ static void ath_rx_proc(void *, int); static struct ath_txq *ath_txq_setup(struct ath_softc*, int qtype, int subtype); static int ath_tx_setup(struct ath_softc *, int, int); +static int ath_wme_update(struct ieee80211com *); static void ath_tx_cleanupq(struct ath_softc *, struct ath_txq *); static void ath_tx_cleanup(struct ath_softc *); static int ath_tx_start(struct ath_softc *, struct ieee80211_node *, @@ -163,14 +164,6 @@ static void ath_bpfattach(struct ath_softc *); static void ath_announce(struct ath_softc *); -static const char *acnames[] = { - "WME_AC_BE", - "WME_AC_BK", - "WME_AC_VI", - "WME_AC_VO", - "WME_UPSD", -}; - SYSCTL_DECL(_hw_ath); /* XXX validate sysctl values */ @@ -387,7 +380,7 @@ /* NB: insure BK queue is the lowest priority h/w queue */ if (!ath_tx_setup(sc, WME_AC_BK, HAL_WME_AC_BK)) { if_printf(ifp, "unable to setup xmit queue for %s traffic!\n", - acnames[WME_AC_BK]); + ieee80211_wme_acnames[WME_AC_BK]); error = EIO; goto bad2; } @@ -459,6 +452,7 @@ ic->ic_reset = ath_reset; ic->ic_newassoc = ath_newassoc; ic->ic_updateslot = ath_updateslot; + ic->ic_wme.wme_update = ath_wme_update; /* XXX not right but it's not used anywhere important */ ic->ic_phytype = IEEE80211_T_OFDM; ic->ic_opmode = IEEE80211_M_STA; @@ -502,7 +496,20 @@ sc->sc_hastpc = ath_hal_hastpc(ah); if (sc->sc_hastpc || ath_hal_hastxpowlimit(ah)) ic->ic_caps |= IEEE80211_C_TXPMGT; + /* + * Mark WME capability only if we have sufficient + * hardware queues to do proper priority scheduling. + */ + if (sc->sc_ac2q[WME_AC_BE] != sc->sc_ac2q[WME_AC_BK]) + ic->ic_caps |= IEEE80211_C_WME; + /* + * Check for frame bursting capability. + */ + if (ath_hal_hasbursting(ah)) + ic->ic_caps |= IEEE80211_C_BURST; + + /* * Indicate we need the 802.11 header padded to a * 32-bit boundary for 4-address and QoS frames. */ @@ -1082,6 +1089,13 @@ ieee80211_pwrsave(ic, ni, m); goto reclaim; } + /* calculate priority so we can find the tx queue */ + if (ieee80211_classify(ic, m, ni)) { + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: discard, classification failure\n", + __func__); + goto bad; + } ifp->if_opackets++; BPF_MTAP(ifp, m); /* @@ -2667,6 +2681,53 @@ } /* + * Update WME parameters for a transmit queue. + */ +static int +ath_txq_update(struct ath_softc *sc, int ac) +{ +#define ATH_EXPONENT_TO_VALUE(v) ((1<sc_ic; + struct ath_txq *txq = sc->sc_ac2q[ac]; + struct wmeParams *wmep = &ic->ic_wme.wme_chanParams.cap_wmeParams[ac]; + struct ath_hal *ah = sc->sc_ah; + HAL_TXQ_INFO qi; + + ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi); + qi.tqi_aifs = wmep->wmep_aifsn; + qi.tqi_cwmin = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmin); + qi.tqi_cwmax = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmax); + qi.tqi_burstTime = ATH_TXOP_TO_US(wmep->wmep_txopLimit); + + if (!ath_hal_settxqueueprops(ah, txq->axq_qnum, &qi)) { + device_printf(sc->sc_dev, "unable to update hardware queue " + "parameters for %s traffic!\n", + ieee80211_wme_acnames[ac]); + return 0; + } else { + ath_hal_resettxqueue(ah, txq->axq_qnum); /* push to h/w */ + return 1; + } +#undef ATH_TXOP_TO_US +#undef ATH_EXPONENT_TO_VALUE +} + +/* + * Callback from the 802.11 layer to update WME parameters. + */ +static int +ath_wme_update(struct ieee80211com *ic) +{ + struct ath_softc *sc = ic->ic_ifp->if_softc; + + return !ath_txq_update(sc, WME_AC_BE) || + !ath_txq_update(sc, WME_AC_BK) || + !ath_txq_update(sc, WME_AC_VI) || + !ath_txq_update(sc, WME_AC_VO) ? EIO : 0; +} + +/* * Reclaim resources for a setup queue. */ static void @@ -2866,7 +2927,11 @@ else txrate = an->an_tx_mgtrate; /* NB: force all management frames to highest queue */ - txq = sc->sc_ac2q[WME_AC_VO]; + if (ni->ni_flags & IEEE80211_NODE_QOS) { + /* NB: force all management frames to highest queue */ + txq = sc->sc_ac2q[WME_AC_VO]; + } else + txq = sc->sc_ac2q[WME_AC_BE]; flags |= HAL_TXDESC_INTREQ; /* force interrupt */ break; case IEEE80211_FC0_TYPE_CTL: @@ -2878,7 +2943,11 @@ else txrate = an->an_tx_mgtrate; /* NB: force all ctl frames to highest queue */ - txq = sc->sc_ac2q[WME_AC_VO]; + if (ni->ni_flags & IEEE80211_NODE_QOS) { + /* NB: force all ctl frames to highest queue */ + txq = sc->sc_ac2q[WME_AC_VO]; + } else + txq = sc->sc_ac2q[WME_AC_BE]; flags |= HAL_TXDESC_INTREQ; /* force interrupt */ break; case IEEE80211_FC0_TYPE_DATA: @@ -2892,10 +2961,12 @@ * Default all non-QoS traffic to the background queue. */ if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) { - /* XXX validate skb->priority */ - txq = sc->sc_ac2q[M_WME_GETAC(m0)]; + u_int pri = M_WME_GETAC(m0); + txq = sc->sc_ac2q[pri]; + if (ic->ic_wme.wme_wmeChanParams.cap_wmeParams[pri].wmep_noackPolicy) + flags |= HAL_TXDESC_NOACK; } else - txq = sc->sc_ac2q[WME_AC_BK]; + txq = sc->sc_ac2q[WME_AC_BE]; break; default: if_printf(ifp, "bogus frame type 0x%x (%s)\n", @@ -3095,7 +3166,22 @@ __func__, i, ds->ds_link, ds->ds_data, ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1]); } - +#if 0 + if ((flags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) && + !ath_hal_updateCTSForBursting(ah, ds + , txq->axq_linkbuf != NULL ? + txq->axq_linkbuf->bf_desc : NULL + , txq->axq_lastdsWithCTS + , txq->axq_gatingds + , IEEE80211_TXOP_TO_US(ic->ic_chanParams.cap_wmeParams[skb->priority].wmep_txopLimit) + , ath_hal_computetxtime(ah, rt, IEEE80211_ACK_LEN, cix, AH_TRUE))) { + ATH_TXQ_LOCK(txq); + txq->axq_lastdsWithCTS = ds; + /* set gating Desc to final desc */ + txq->axq_gatingds = (struct ath_desc *)txq->axq_link; + ATH_TXQ_UNLOCK(txq); + } +#endif /* * Insert the frame on the outbound list and * pass it on to the hardware. @@ -3137,11 +3223,12 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) { struct ath_hal *ah = sc->sc_ah; + struct ieee80211com *ic = &sc->sc_ic; struct ath_buf *bf; struct ath_desc *ds; struct ieee80211_node *ni; struct ath_node *an; - int sr, lr; + int sr, lr, pri; HAL_STATUS status; DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: tx queue %u head %p link %p\n", @@ -3168,6 +3255,12 @@ ATH_TXQ_UNLOCK(txq); break; } +#if 0 + if (bf->bf_desc == txq->axq_lastdsWithCTS) + txq->axq_lastdsWithCTS = NULL; + if (ds == txq->axq_gatingds) + txq->axq_gatingds = NULL; +#endif ATH_TXQ_REMOVE_HEAD(txq, bf_list); ATH_TXQ_UNLOCK(txq); @@ -3182,6 +3275,9 @@ ds->ds_txstat.ts_rssi; ATH_RSSI_LPF(an->an_halstats.ns_avgtxrssi, ds->ds_txstat.ts_rssi); + pri = M_WME_GETAC(bf->bf_m); + if (pri >= WME_AC_VO) + ic->ic_wme.wme_hipri_traffic++; } else { if (ds->ds_txstat.ts_status & HAL_TXERR_XRETRY) sc->sc_stats.ast_tx_xretries++; @@ -4320,7 +4416,7 @@ for (i = 0; i <= WME_AC_VO; i++) { struct ath_txq *txq = sc->sc_ac2q[i]; if_printf(ifp, "Use hw queue %u for %s traffic\n", - txq->axq_qnum, acnames[i]); + txq->axq_qnum, ieee80211_wme_acnames[i]); } if_printf(ifp, "Use hw queue %u for CAB traffic\n", sc->sc_cabq->axq_qnum); ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#9 (text+ko) ==== @@ -353,6 +353,10 @@ ((*(_ah)->ah_resetTxQueue)((_ah), (_q))) #define ath_hal_releasetxqueue(_ah, _q) \ ((*(_ah)->ah_releaseTxQueue)((_ah), (_q))) +#define ath_hal_gettxqueueprops(_ah, _q, _qi) \ + ((*(_ah)->ah_getTxQueueProps)((_ah), (_q), (_qi))) +#define ath_hal_settxqueueprops(_ah, _q, _qi) \ + ((*(_ah)->ah_setTxQueueProps)((_ah), (_q), (_qi))) #define ath_hal_getrfgain(_ah) \ ((*(_ah)->ah_getRfGain)((_ah))) #define ath_hal_getdefantenna(_ah) \ @@ -421,6 +425,8 @@ (ath_hal_getcapability(_ah, HAL_CAP_TPC, 1, NULL) == HAL_OK) #define ath_hal_settpc(_ah, _v) \ ath_hal_setcapability(_ah, HAL_CAP_TPC, 1, _v, NULL) +#define ath_hal_hasbursting(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_BURST, 0, NULL) == HAL_OK) #define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \ ((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq))) @@ -440,6 +446,10 @@ ((*(_ah)->ah_fillTxDesc)((_ah), (_ds), (_l), (_first), (_last), (_ds0))) #define ath_hal_txprocdesc(_ah, _ds) \ ((*(_ah)->ah_procTxDesc)((_ah), (_ds))) +#define ath_hal_updateCTSForBursting(_ah, _ds, _prevds, _prevdsWithCTS, \ + _gatingds, _txOpLimit, _ctsDuration) \ + ((*(_ah)->ah_updateCTSForBursting)((_ah), (_ds), (_prevds), \ + (_prevdsWithCTS), (_gatingds), (_txOpLimit), (_ctsDuration))) #define ath_hal_gpioCfgOutput(_ah, _gpio) \ ((*(_ah)->ah_gpioCfgOutput)((_ah), (_gpio))) From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:55:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 61EFF16A4D6; Tue, 23 Nov 2004 03:55:56 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2726516A4D1 for ; Tue, 23 Nov 2004 03:55:56 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14D7443D5D for ; Tue, 23 Nov 2004 03:55:56 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3ttSC002736 for ; Tue, 23 Nov 2004 03:55:55 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3ttLn002733 for perforce@freebsd.org; Tue, 23 Nov 2004 03:55:55 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:55:55 GMT Message-Id: <200411230355.iAN3ttLn002733@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65688 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:55:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=65688 Change 65688 by sam@sam_ebb on 2004/11/23 03:55:16 add wme debug Affected files ... .. //depot/projects/wifi/tools/tools/ath/80211debug.c#3 edit Differences ... ==== //depot/projects/wifi/tools/tools/ath/80211debug.c#3 (text+ko) ==== @@ -71,6 +71,7 @@ #define IEEE80211_MSG_RADKEYS 0x00002000 /* dump 802.1x keys */ #define IEEE80211_MSG_WPA 0x00001000 /* WPA/RSN protocol */ #define IEEE80211_MSG_ACL 0x00000800 /* ACL handling */ +#define IEEE80211_MSG_WME 0x00000400 /* WME protocol */ static struct { const char *name; @@ -96,6 +97,7 @@ { "radkeys", IEEE80211_MSG_RADKEYS }, { "wpa", IEEE80211_MSG_WPA }, { "acl", IEEE80211_MSG_ACL }, + { "wme", IEEE80211_MSG_WME }, }; static u_int From owner-p4-projects@FreeBSD.ORG Tue Nov 23 03:55:58 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A337616A524; Tue, 23 Nov 2004 03:55:57 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BB4316A51D for ; Tue, 23 Nov 2004 03:55:57 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C73B043D5D for ; Tue, 23 Nov 2004 03:55:56 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAN3tuSH002749 for ; Tue, 23 Nov 2004 03:55:56 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAN3tulB002746 for perforce@freebsd.org; Tue, 23 Nov 2004 03:55:56 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 03:55:56 GMT Message-Id: <200411230355.iAN3tulB002746@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65690 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:55:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=65690 Change 65690 by sam@sam_ebb on 2004/11/23 03:55:35 checkpoint wme support Affected files ... .. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#15 edit Differences ... ==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#15 (text+ko) ==== @@ -481,6 +481,42 @@ } } +static void +set80211cwmin(const char *val, int d, int s, const struct afswtch *rafp) +{ + set80211(s, IEEE80211_IOC_WME_CWMIN, atoi(val), 0, NULL); +} + +static void +set80211cwmax(const char *val, int d, int s, const struct afswtch *rafp) +{ + set80211(s, IEEE80211_IOC_WME_CWMAX, atoi(val), 0, NULL); +} + +static void +set80211aifs(const char *val, int d, int s, const struct afswtch *rafp) +{ + set80211(s, IEEE80211_IOC_WME_AIFS, atoi(val), 0, NULL); +} + +static void +set80211txoplimit(const char *val, int d, int s, const struct afswtch *rafp) +{ + set80211(s, IEEE80211_IOC_WME_TXOPLIMIT, atoi(val), 0, NULL); +} + +static void +set80211acm(const char *val, int d, int s, const struct afswtch *rafp) +{ + set80211(s, IEEE80211_IOC_WME_ACM, atoi(val), 0, NULL); +} + +static void +set80211ackpolicy(const char *val, int d, int s, const struct afswtch *rafp) +{ + set80211(s, IEEE80211_IOC_WME_ACKPOLICY, d, 0, NULL); +} + static int getmaxrate(uint8_t rates[15], uint8_t nrates) { @@ -697,6 +733,32 @@ list_scan(s); } +/* unalligned little endian access */ +#define LE_READ_4(p) \ + ((u_int32_t) \ + ((((const u_int8_t *)(p))[0] ) | \ + (((const u_int8_t *)(p))[1] << 8) | \ + (((const u_int8_t *)(p))[2] << 16) | \ + (((const u_int8_t *)(p))[3] << 24))) + +static int __inline +iswpaoui(const u_int8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((WPA_OUI_TYPE<<24)|WPA_OUI); +} + +static int __inline +iswmeoui(const u_int8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((WME_OUI_TYPE<<24)|WME_OUI); +} + +static int __inline +isatherosoui(const u_int8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((ATH_OUI_TYPE<<24)|ATH_OUI); +} + static void list_stations(int s) { @@ -732,6 +794,7 @@ do { struct ieee80211req_sta_info *si; uint8_t *vp; + int ielen; si = (struct ieee80211req_sta_info *) cp; vp = (u_int8_t *)(si+1); @@ -742,26 +805,29 @@ , (si->isi_rates[si->isi_txrate] & IEEE80211_RATE_VAL)/2 , si->isi_rssi , si->isi_inact - , si->isi_txseq - , si->isi_rxseq + , si->isi_txseqs[0] + , si->isi_rxseqs[0] , getcaps(si->isi_capinfo) , si->isi_erp ); - if (si->isi_ie_len > 0) { + for (ielen = si->isi_ie_len; ielen > 0; ielen -= 2+vp[1]) switch (vp[0]) { case IEEE80211_ELEMID_VENDOR: - if (vp[1] < 2 + 4 || - memcmp(&vp[2], "\x00\x50\xf2\x01", 4) != 0) - break; - printie(" WPA", vp, 2+vp[1], 24); + if (iswpaoui(vp)) + printie(" WPA", vp, 2+vp[1], 24); + else if (iswmeoui(vp)) + printie(" WME", vp, 2+vp[1], 24); + else + printie(" VEN", vp, 2+vp[1], 24); break; case IEEE80211_ELEMID_RSN: printie(" RSN", vp, 2+vp[1], 24); break; - /* XXX WME */ + default: + printie(" ???", vp, 2+vp[1], 24); + break; } - } printf("\n"); cp += si->isi_len, len -= si->isi_len; } while (len >= sizeof(struct ieee80211req_sta_info)); @@ -828,7 +894,8 @@ #define IEEE80211_C_BITS \ "\020\1WEP\2TKIP\3AES\4AES_CCM\6CKIP\11IBSS\12PMGT\13HOSTAP\14AHDEMO" \ -"\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE\21MONITOR\22TKIPMIC\30WPA1\31WPA2" +"\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE\21MONITOR\22TKIPMIC\30WPA1" \ +"\31WPA2\32BURST\33WME" static void list_capabilities(int s) @@ -1236,10 +1303,10 @@ ireq.i_type = IEEE80211_IOC_WME; if (ioctl(s, SIOCG80211, &ireq) != -1) { if (ireq.i_val) { - printf("%cwme ENA", spacer); + printf("%cwme", spacer); spacer = ' '; } else if (verbose) { - printf("%cwme DIS", spacer); + printf("%c-wme", spacer); spacer = ' '; } } @@ -1259,10 +1326,10 @@ ireq.i_type = IEEE80211_IOC_APBRIDGE; if (ioctl(s, SIOCG80211, &ireq) != -1) { if (!ireq.i_val) { - printf("%capbridge DIS", spacer); + printf("%c-apbridge", spacer); spacer = ' '; } else if (verbose) { - printf("%capbridge ENA", spacer); + printf("%capbridge", spacer); spacer = ' '; } } @@ -1297,10 +1364,10 @@ ireq.i_type = IEEE80211_IOC_COUNTERMEASURES; if (ioctl(s, SIOCG80211, &ireq) != -1) { if (ireq.i_val) { - printf("%ccountermeasures ENA", spacer); + printf("%ccountermeasures", spacer); spacer = ' '; } else if (verbose) { - printf("%ccountermeasures DIS", spacer); + printf("%c-countermeasures", spacer); spacer = ' '; } } @@ -1472,6 +1539,13 @@ { "ap", NEXTARG, set80211bssid }, { "scan", 0, set80211scan }, { "list", NEXTARG, set80211list }, + { "cwmin", NEXTARG, set80211cwmin }, + { "cwmax", NEXTARG, set80211cwmax }, + { "aifs", NEXTARG, set80211aifs }, + { "txoplimit", NEXTARG, set80211txoplimit }, + { "acm", NEXTARG, set80211acm }, + { "ack", 1, set80211ackpolicy }, + { "-ack", 0, set80211ackpolicy }, }; static struct afswtch af_ieee80211 = { .af_name = "ieee80211", From owner-p4-projects@FreeBSD.ORG Tue Nov 23 12:23:33 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6DB0B16A4D0; Tue, 23 Nov 2004 12:23:33 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42C6516A4CE for ; Tue, 23 Nov 2004 12:23:33 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 377CA43D1F for ; Tue, 23 Nov 2004 12:23:33 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANCNX6C032210 for ; Tue, 23 Nov 2004 12:23:33 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANCNWXP032207 for perforce@freebsd.org; Tue, 23 Nov 2004 12:23:32 GMT (envelope-from davidxu@freebsd.org) Date: Tue, 23 Nov 2004 12:23:32 GMT Message-Id: <200411231223.iANCNWXP032207@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 65704 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 12:23:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=65704 Change 65704 by davidxu@davidxu_alona on 2004/11/23 12:22:53 Debugger support. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread_db/Makefile#2 edit .. //depot/projects/davidxu_thread/src/lib/libthread_db/libpthread2_db.c#1 add .. //depot/projects/davidxu_thread/src/lib/libthread_db/libpthread2_db.h#1 add Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread_db/Makefile#2 (text+ko) ==== @@ -6,6 +6,7 @@ SHLIB_MAJOR= 1 SRCS= thread_db.c SRCS+= libpthread_db.c libpthread_md.c +SRCS+= libpthread2_db.c SRCS+= libc_r_db.c libc_r_md.c SRCS+= libthr_db.c INCS= thread_db.h From owner-p4-projects@FreeBSD.ORG Tue Nov 23 17:30:49 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 459B416A4D0; Tue, 23 Nov 2004 17:30:49 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07BAA16A4CE for ; Tue, 23 Nov 2004 17:30:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D980F43D46 for ; Tue, 23 Nov 2004 17:30:48 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANHUmKl060149 for ; Tue, 23 Nov 2004 17:30:48 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANHUmUs060146 for perforce@freebsd.org; Tue, 23 Nov 2004 17:30:48 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 17:30:48 GMT Message-Id: <200411231730.iANHUmUs060146@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65721 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 17:30:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=65721 Change 65721 by sam@sam_ebb on 2004/11/23 17:30:32 fix typo that caused beacon tx's to wait for an ack Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#28 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#28 (text+ko) ==== @@ -1671,7 +1671,7 @@ flags = HAL_TXDESC_NOACK; if (ic->ic_opmode == IEEE80211_M_IBSS && sc->sc_hasveol) { ds->ds_link = bf->bf_daddr; /* self-linked */ - flags = HAL_TXDESC_VEOL; + flags |= HAL_TXDESC_VEOL; } else ds->ds_link = 0; ds->ds_data = bf->bf_segs[0].ds_addr; From owner-p4-projects@FreeBSD.ORG Tue Nov 23 18:25:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E76A616A4D0; Tue, 23 Nov 2004 18:25:55 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8AB416A4CE for ; Tue, 23 Nov 2004 18:25:55 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D3A843D1D for ; Tue, 23 Nov 2004 18:25:55 +0000 (GMT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANIPtag061868 for ; Tue, 23 Nov 2004 18:25:55 GMT (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANIPtwA061865 for perforce@freebsd.org; Tue, 23 Nov 2004 18:25:55 GMT (envelope-from areisse@nailabs.com) Date: Tue, 23 Nov 2004 18:25:55 GMT Message-Id: <200411231825.iANIPtwA061865@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 65722 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 18:25:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=65722 Change 65722 by areisse@areisse_tislabs on 2004/11/23 18:25:04 Changes required to get the kernel to build after merging new selinux pieces. The sebsd module should still not be used, as the old and new policy formats are incompatible and the policy tools have not been updated yet. Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.c#7 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.h#7 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/avtab.c#6 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/avtab.h#6 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.c#2 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.h#2 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/policydb.c#5 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/policydb.h#6 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/security.h#7 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/services.c#8 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/services.h#5 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.c#7 (text+ko) ==== @@ -89,6 +89,24 @@ return (ssid ^ (tsid<<2) ^ (tclass<<4)) & (AVC_CACHE_SLOTS - 1); } +#ifdef AVC_CACHE_STATS +static inline void avc_cache_stats_incr(int type) +{ + avc_cache_stats[type]++; +} + +static inline void avc_cache_stats_add(int type, unsigned val) +{ + avc_cache_stats[type] += val; +} +#else +static inline void avc_cache_stats_incr(int type) +{ } + +static inline void avc_cache_stats_add(int type, unsigned val) +{ } +#endif + /** * avc_dump_av - Display an access vector in human-readable form. * @tclass: target security class @@ -583,9 +601,6 @@ } else { printf(" fs/inode info not available"); } - inode = a->u.fs.dentry->d_inode; - } else if (a->u.fs.inode) { - inode = a->u.fs.inode; } break; case AVC_AUDIT_DATA_NET: @@ -1022,6 +1037,7 @@ return rc; } +/* static int __init avc_log_level_setup(char *str) { avc_log_level = simple_strtol(str, NULL, 0); @@ -1032,3 +1048,4 @@ __setup("avc_log_level=", avc_log_level_setup); +*/ ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.h#7 (text+ko) ==== @@ -15,6 +15,7 @@ #endif /* _KERNEL */ #include +#include #include #include ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/avtab.c#6 (text+ko) ==== @@ -14,14 +14,6 @@ * the Free Software Foundation, version 2. */ -#include -#include -#include -#include - -#include "avtab.h" -#include "policydb.h" - #ifdef _KERNEL #include #include @@ -40,14 +32,12 @@ (keyp->source_type << 9)) & \ AVTAB_HASH_MASK) -static kmem_cache_t *avtab_node_cachep; - static struct avtab_node* avtab_insert_node(struct avtab *h, int hvalue, struct avtab_node * prev, struct avtab_node * cur, struct avtab_key *key, struct avtab_datum *datum) { struct avtab_node * newnode; - newnode = kmem_cache_alloc(avtab_node_cachep, SLAB_KERNEL); + newnode = kmalloc(sizeof(*newnode), GFP_KERNEL); if (newnode == NULL) return NULL; memset(newnode, 0, sizeof(struct avtab_node)); @@ -95,7 +85,7 @@ newnode = avtab_insert_node(h, hvalue, prev, cur, key, datum); if(!newnode) - return -ENOMEM; + return ENOMEM; return 0; } @@ -244,7 +234,7 @@ } h->htable[i] = NULL; } - vfree(h->htable); + kfree(h->htable); h->htable = NULL; } @@ -315,19 +305,19 @@ int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey) { - __u32 *buf; - __u32 items, items2; + u32 *buf; + u32 items, items2; memset(avkey, 0, sizeof(struct avtab_key)); memset(avdatum, 0, sizeof(struct avtab_datum)); - buf = next_entry(fp, sizeof(__u32)); + buf = next_entry(fp, sizeof(u32)); if (!buf) { printk(KERN_ERR "security: avtab: truncated entry\n"); goto bad; } items2 = le32_to_cpu(buf[0]); - buf = next_entry(fp, sizeof(__u32)*items2); + buf = next_entry(fp, sizeof(u32)*items2); if (!buf) { printk(KERN_ERR "security: avtab: truncated entry\n"); goto bad; @@ -347,12 +337,22 @@ goto bad; } if (avdatum->specified & AVTAB_AV) { - if (avdatum->specified & AVTAB_ALLOWED) - avtab_allowed(avdatum) = le32_to_cpu(buf[items++]); - if (avdatum->specified & AVTAB_AUDITDENY) - avtab_auditdeny(avdatum) = le32_to_cpu(buf[items++]); - if (avdatum->specified & AVTAB_AUDITALLOW) - avtab_auditallow(avdatum) = le32_to_cpu(buf[items++]); + + if (avdatum->specified & AVTAB_ALLOWED) { + u32 b1 = le32_to_cpu (buf[items++]); + u32 b2 = le32_to_cpu (buf[items++]); + avtab_allowed(avdatum) = (((u64) b1) << 32) | b2; + } + if (avdatum->specified & AVTAB_AUDITDENY) { + u32 b1 = le32_to_cpu (buf[items++]); + u32 b2 = le32_to_cpu (buf[items++]); + avtab_auditdeny(avdatum) = (((u64) b1) << 32) | b2; + } + if (avdatum->specified & AVTAB_AUDITALLOW) { + u32 b1 = le32_to_cpu (buf[items++]); + u32 b2 = le32_to_cpu (buf[items++]); + avtab_auditallow(avdatum) = (((u64) b1) << 32) | b2; + } } else { if (avdatum->specified & AVTAB_TRANSITION) avtab_transition(avdatum) = le32_to_cpu(buf[items++]); @@ -394,39 +394,6 @@ for (i = 0; i < nel; i++) { if (avtab_read_item(fp, &avdatum, &avkey)) goto bad; - } - if (avdatum.specified & AVTAB_AV) { - if (avdatum.specified & AVTAB_ALLOWED) - { - u32 b1 = le32_to_cpu (buf[items++]); - u32 b2 = le32_to_cpu (buf[items++]); - avtab_allowed(&avdatum) = (((u64) b1) << 32) | b2; - } - if (avdatum.specified & AVTAB_AUDITDENY) - { - u32 b1 = le32_to_cpu (buf[items++]); - u32 b2 = le32_to_cpu (buf[items++]); - avtab_auditdeny(&avdatum) = (((u64) b1) << 32) | b2; - } - if (avdatum.specified & AVTAB_AUDITALLOW) - { - u32 b1 = le32_to_cpu (buf[items++]); - u32 b2 = le32_to_cpu (buf[items++]); - avtab_auditallow(&avdatum) = (((u64) b1) << 32) | b2; - } - } else { - if (avdatum.specified & AVTAB_TRANSITION) - avtab_transition(&avdatum) = le32_to_cpu(buf[items++]); - if (avdatum.specified & AVTAB_CHANGE) - avtab_change(&avdatum) = le32_to_cpu(buf[items++]); - if (avdatum.specified & AVTAB_MEMBER) - avtab_member(&avdatum) = le32_to_cpu(buf[items++]); - } - if (items != items2) { - printk(KERN_ERR "security: avtab: entry only had %d " - "items, expected %d\n", items2, items); - goto bad; - } rc = avtab_insert(a, &avkey, &avdatum); if (rc) { if (rc == ENOMEM) ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/avtab.h#6 (text+ko) ==== @@ -38,6 +38,7 @@ #define AVTAB_MEMBER 32 #define AVTAB_CHANGE 64 #define AVTAB_TYPE (AVTAB_TRANSITION | AVTAB_MEMBER | AVTAB_CHANGE) +#define AVTAB_ENABLED 0x80000000 /* reserved for used in cond_avtab */ u32 specified; /* what fields are specified */ access_vector_t data[3]; /* access vectors or types */ #define avtab_allowed(x) (x)->data[0] ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.c#2 (text+ko) ==== @@ -7,15 +7,16 @@ * the Free Software Foundation, version 2. */ -#include -#include -#include -#include -#include -#include +#if defined(__FreeBSD__) && defined(_KERNEL) +#include +#include +#include +#include +#endif /* FreeBSD _KERNEL */ -#include "security.h" -#include "conditional.h" +#include +#include +#include /* * cond_evaluate_expr evaluates a conditional expr ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.h#2 (text+ko) ==== @@ -10,9 +10,10 @@ #ifndef _CONDITIONAL_H_ #define _CONDITIONAL_H_ -#include "avtab.h" -#include "symtab.h" -#include "policydb.h" +#include +#include +#include +#include #define COND_EXPR_MAXDEPTH 10 @@ -29,8 +30,8 @@ #define COND_EQ 6 /* bool == bool */ #define COND_NEQ 7 /* bool != bool */ #define COND_LAST 8 - __u32 expr_type; - __u32 bool; + u32 expr_type; + u32 bool; struct cond_expr *next; }; ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/policydb.c#5 (text+ko) ==== @@ -14,16 +14,6 @@ * the Free Software Foundation, version 2. */ -#include -#include -#include -#include -#include "security.h" - -#include "policydb.h" -#include "conditional.h" -#include "mls.h" - #if defined(__FreeBSD__) && defined(_KERNEL) #include #include @@ -37,6 +27,7 @@ #include #include #include +#include #define _DEBUG_HASHES @@ -204,7 +195,7 @@ comdatum = datum; p = datap; if (!comdatum->value || comdatum->value > p->p_commons.nprim) - return -EINVAL; + return EINVAL; p->p_common_val_to_name[comdatum->value - 1] = key; return 0; } @@ -217,7 +208,7 @@ cladatum = datum; p = datap; if (!cladatum->value || cladatum->value > p->p_classes.nprim) - return -EINVAL; + return EINVAL; p->p_class_val_to_name[cladatum->value - 1] = key; p->class_val_to_struct[cladatum->value - 1] = cladatum; return 0; @@ -231,7 +222,7 @@ role = datum; p = datap; if (!role->value || role->value > p->p_roles.nprim) - return -EINVAL; + return EINVAL; p->p_role_val_to_name[role->value - 1] = key; p->role_val_to_struct[role->value - 1] = role; return 0; @@ -247,7 +238,7 @@ if (typdatum->primary) { if (!typdatum->value || typdatum->value > p->p_types.nprim) - return -EINVAL; + return EINVAL; p->p_type_val_to_name[typdatum->value - 1] = key; } @@ -262,7 +253,7 @@ usrdatum = datum; p = datap; if (!usrdatum->value || usrdatum->value > p->p_users.nprim) - return -EINVAL; + return EINVAL; p->p_user_val_to_name[usrdatum->value - 1] = key; p->user_val_to_struct[usrdatum->value - 1] = usrdatum; return 0; @@ -373,12 +364,11 @@ GFP_KERNEL); if (!p->user_val_to_struct) { rc = ENOMEM; - rc = -ENOMEM; goto out; } if (cond_init_bool_indexes(p)) { - rc = -ENOMEM; + rc = ENOMEM; goto out; } @@ -1477,14 +1467,14 @@ goto bad; newgenfs = kmalloc(sizeof(*newgenfs), GFP_KERNEL); if (!newgenfs) { - rc = -ENOMEM; + rc = ENOMEM; goto bad; } memset(newgenfs, 0, sizeof(*newgenfs)); newgenfs->fstype = kmalloc(len + 1,GFP_KERNEL); if (!newgenfs->fstype) { - rc = -ENOMEM; + rc = ENOMEM; kfree(newgenfs); goto bad; } @@ -1522,14 +1512,14 @@ newc = kmalloc(sizeof(*newc), GFP_KERNEL); if (!newc) { - rc = -ENOMEM; + rc = ENOMEM; goto bad; } memset(newc, 0, sizeof(*newc)); newc->u.name = kmalloc(len + 1,GFP_KERNEL); if (!newc->u.name) { - rc = -ENOMEM; + rc = ENOMEM; goto bad_newc; } memcpy(newc->u.name, buf, len); ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/policydb.h#6 (text+ko) ==== @@ -119,7 +119,7 @@ /* Boolean data type */ struct cond_bool_datum { - __u32 value; /* internal type value */ + u32 value; /* internal type value */ int state; }; ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/security.h#7 (text+ko) ==== @@ -77,7 +77,6 @@ int security_node_sid(u16 domain, void *addr, u32 addrlen, security_id_t *out_sid); - u32 *out_sid); #define SECURITY_FS_USE_XATTR 1 /* use xattr */ #define SECURITY_FS_USE_TRANS 2 /* use transition SIDs, e.g. devpts/tmpfs */ ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/services.c#8 (text+ko) ==== @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include #include @@ -540,7 +542,7 @@ goto out_unlock; if ((p - scontext2) < scontext_len) { - rc = -EINVAL; + rc = EINVAL; goto out_unlock; } @@ -955,7 +957,7 @@ if (rc) goto out; - rc = -EINVAL; + rc = EINVAL; /* Convert the user. */ usrdatum = hashtab_search(args->newp->p_users.table, @@ -1231,7 +1233,7 @@ u32 addr; if (addrlen != sizeof(u32)) { - rc = -EINVAL; + rc = EINVAL; goto out; } @@ -1248,7 +1250,7 @@ case AF_INET6: if (addrlen != sizeof(u64) * 2) { - rc = -EINVAL; + rc = EINVAL; goto out; } c = policydb.ocontexts[OCON_NODE6]; @@ -1503,7 +1505,7 @@ int security_get_bools(int *len, char ***names, int **values) { - int i, rc = -ENOMEM; + int i, rc = ENOMEM; POLICY_RDLOCK; *names = NULL; @@ -1560,7 +1562,7 @@ lenp = policydb.p_bools.nprim; if (len != lenp) { - rc = -EFAULT; + rc = EFAULT; goto out; } @@ -1590,7 +1592,7 @@ POLICY_WRUNLOCK; if (!rc) { avc_ss_reset(seqno); - selnl_notify_policyload(seqno); + /*selnl_notify_policyload(seqno);*/ } return rc; } @@ -1604,7 +1606,7 @@ len = policydb.p_bools.nprim; if (bool >= len) { - rc = -EFAULT; + rc = EFAULT; goto out; } ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/services.h#5 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Tue Nov 23 20:54:58 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A32BF16A4D0; Tue, 23 Nov 2004 20:54:57 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BE4116A4CE for ; Tue, 23 Nov 2004 20:54:57 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EECC43D4C for ; Tue, 23 Nov 2004 20:54:57 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANKsvCJ073885 for ; Tue, 23 Nov 2004 20:54:57 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANKsvX6073882 for perforce@freebsd.org; Tue, 23 Nov 2004 20:54:57 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 20:54:57 GMT Message-Id: <200411232054.iANKsvX6073882@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65728 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 20:54:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=65728 Change 65728 by sam@sam_ebb on 2004/11/23 20:54:22 o replace dual command function pointers with a single pointer wrapped in an anonymous union o add convenience defines for declaring callback functions and for initializing command structures s.t. the correct arm of the union is used should be no functional changes Affected files ... .. //depot/projects/wifi/sbin/ifconfig/af_atalk.c#2 edit .. //depot/projects/wifi/sbin/ifconfig/af_inet6.c#3 edit .. //depot/projects/wifi/sbin/ifconfig/ifclone.c#3 edit .. //depot/projects/wifi/sbin/ifconfig/ifconfig.c#4 edit .. //depot/projects/wifi/sbin/ifconfig/ifconfig.h#4 edit .. //depot/projects/wifi/sbin/ifconfig/ifmac.c#3 edit .. //depot/projects/wifi/sbin/ifconfig/ifmedia.c#3 edit .. //depot/projects/wifi/sbin/ifconfig/ifvlan.c#3 edit Differences ... ==== //depot/projects/wifi/sbin/ifconfig/af_atalk.c#2 (text+ko) ==== @@ -155,8 +155,8 @@ } static struct cmd atalk_cmds[] = { - { "range", NEXTARG, setatrange }, - { "phase", NEXTARG, setatphase }, + DEF_CMD_ARG("range", setatrange), + DEF_CMD_ARG("phase", setatphase), }; static struct afswtch af_atalk = { ==== //depot/projects/wifi/sbin/ifconfig/af_inet6.c#3 (text+ko) ==== @@ -498,17 +498,17 @@ } static struct cmd inet6_cmds[] = { - { "prefixlen", NEXTARG, setifprefixlen }, - { "anycast", IN6_IFF_ANYCAST, setip6flags }, - { "tentative", IN6_IFF_TENTATIVE, setip6flags }, - { "-tentative", -IN6_IFF_TENTATIVE, setip6flags }, - { "deprecated", IN6_IFF_DEPRECATED, setip6flags }, - { "-deprecated", -IN6_IFF_DEPRECATED, setip6flags }, - { "autoconf", IN6_IFF_AUTOCONF, setip6flags }, - { "-autoconf", -IN6_IFF_AUTOCONF, setip6flags }, - { "pltime", NEXTARG, setip6pltime }, - { "vltime", NEXTARG, setip6vltime }, - { "eui64", 0, setip6eui64 }, + DEF_CMD_ARG("prefixlen", setifprefixlen), + DEF_CMD("anycast", IN6_IFF_ANYCAST, setip6flags), + DEF_CMD("tentative", IN6_IFF_TENTATIVE, setip6flags), + DEF_CMD("-tentative", -IN6_IFF_TENTATIVE, setip6flags), + DEF_CMD("deprecated", IN6_IFF_DEPRECATED, setip6flags), + DEF_CMD("-deprecated", -IN6_IFF_DEPRECATED, setip6flags), + DEF_CMD("autoconf", IN6_IFF_AUTOCONF, setip6flags), + DEF_CMD("-autoconf", -IN6_IFF_AUTOCONF, setip6flags), + DEF_CMD_ARG("pltime", setip6pltime), + DEF_CMD_ARG("vltime", setip6vltime), + DEF_CMD("eui64", 0, setip6eui64), }; static struct afswtch af_inet6 = { ==== //depot/projects/wifi/sbin/ifconfig/ifclone.c#3 (text+ko) ==== @@ -130,8 +130,8 @@ } static struct cmd clone_cmds[] = { - { "destroy", 0, clone_destroy }, - { "unplumb", 0, clone_destroy }, + DEF_CMD("destroy", 0, clone_destroy), + DEF_CMD("unplumb", 0, clone_destroy), }; static void ==== //depot/projects/wifi/sbin/ifconfig/ifconfig.c#4 (text+ko) ==== @@ -448,10 +448,11 @@ /* specially-handled comamnds */ static void setifaddr(const char *, int, int, const struct afswtch *); -static const struct cmd setifaddr_cmd = { "ifaddr", 0, setifaddr }; +static const struct cmd setifaddr_cmd = DEF_CMD("ifaddr", 0, setifaddr); static void setifdstaddr(const char *, int, int, const struct afswtch *); -static const struct cmd setifdstaddr_cmd = { "ifdstaddr", 0, setifdstaddr }; +static const struct cmd setifdstaddr_cmd = + DEF_CMD("ifdstaddr", 0, setifdstaddr); static int ifconfig(int argc, char *const *argv, const struct afswtch *afp) @@ -951,53 +952,53 @@ } static struct cmd basic_cmds[] = { - { "up", IFF_UP, setifflags } , - { "down", -IFF_UP, setifflags }, - { "arp", -IFF_NOARP, setifflags }, - { "-arp", IFF_NOARP, setifflags }, - { "debug", IFF_DEBUG, setifflags }, - { "-debug", -IFF_DEBUG, setifflags }, - { "promisc", IFF_PPROMISC, setifflags }, - { "-promisc", -IFF_PPROMISC, setifflags }, - { "add", IFF_UP, notealias }, - { "alias", IFF_UP, notealias }, - { "-alias", -IFF_UP, notealias }, - { "delete", -IFF_UP, notealias }, - { "remove", -IFF_UP, notealias }, + DEF_CMD("up", IFF_UP, setifflags), + DEF_CMD("down", -IFF_UP, setifflags), + DEF_CMD("arp", -IFF_NOARP, setifflags), + DEF_CMD("-arp", IFF_NOARP, setifflags), + DEF_CMD("debug", IFF_DEBUG, setifflags), + DEF_CMD("-debug", -IFF_DEBUG, setifflags), + DEF_CMD("promisc", IFF_PPROMISC, setifflags), + DEF_CMD("-promisc", -IFF_PPROMISC, setifflags), + DEF_CMD("add", IFF_UP, notealias), + DEF_CMD("alias", IFF_UP, notealias), + DEF_CMD("-alias", -IFF_UP, notealias), + DEF_CMD("delete", -IFF_UP, notealias), + DEF_CMD("remove", -IFF_UP, notealias), #ifdef notdef #define EN_SWABIPS 0x1000 - { "swabips", EN_SWABIPS, setifflags }, - { "-swabips", -EN_SWABIPS, setifflags }, + DEF_CMD("swabips", EN_SWABIPS, setifflags), + DEF_CMD("-swabips", -EN_SWABIPS, setifflags), #endif - { "netmask", NEXTARG, setifnetmask }, - { "metric", NEXTARG, setifmetric }, - { "broadcast", NEXTARG, setifbroadaddr }, - { "ipdst", NEXTARG, setifipdst }, - { "tunnel", NEXTARG2, NULL, settunnel }, - { "deletetunnel", 0, deletetunnel }, - { "link0", IFF_LINK0, setifflags }, - { "-link0", -IFF_LINK0, setifflags }, - { "link1", IFF_LINK1, setifflags }, - { "-link1", -IFF_LINK1, setifflags }, - { "link2", IFF_LINK2, setifflags }, - { "-link2", -IFF_LINK2, setifflags }, - { "monitor", IFF_MONITOR, setifflags }, - { "-monitor", -IFF_MONITOR, setifflags }, - { "staticarp", IFF_STATICARP, setifflags }, - { "-staticarp", -IFF_STATICARP, setifflags }, - { "rxcsum", IFCAP_RXCSUM, setifcap }, - { "-rxcsum", -IFCAP_RXCSUM, setifcap }, - { "txcsum", IFCAP_TXCSUM, setifcap }, - { "-txcsum", -IFCAP_TXCSUM, setifcap }, - { "netcons", IFCAP_NETCONS, setifcap }, - { "-netcons", -IFCAP_NETCONS, setifcap }, - { "polling", IFCAP_POLLING, setifcap }, - { "-polling", -IFCAP_POLLING, setifcap }, - { "normal", -IFF_LINK0, setifflags }, - { "compress", IFF_LINK0, setifflags }, - { "noicmp", IFF_LINK1, setifflags }, - { "mtu", NEXTARG, setifmtu }, - { "name", NEXTARG, setifname }, + DEF_CMD_ARG("netmask", setifnetmask), + DEF_CMD_ARG("metric", setifmetric), + DEF_CMD_ARG("broadcast", setifbroadaddr), + DEF_CMD_ARG("ipdst", setifipdst), + DEF_CMD_ARG2("tunnel", settunnel), + DEF_CMD("deletetunnel", 0, deletetunnel), + DEF_CMD("link0", IFF_LINK0, setifflags), + DEF_CMD("-link0", -IFF_LINK0, setifflags), + DEF_CMD("link1", IFF_LINK1, setifflags), + DEF_CMD("-link1", -IFF_LINK1, setifflags), + DEF_CMD("link2", IFF_LINK2, setifflags), + DEF_CMD("-link2", -IFF_LINK2, setifflags), + DEF_CMD("monitor", IFF_MONITOR, setifflags), + DEF_CMD("-monitor", -IFF_MONITOR, setifflags), + DEF_CMD("staticarp", IFF_STATICARP, setifflags), + DEF_CMD("-staticarp", -IFF_STATICARP, setifflags), + DEF_CMD("rxcsum", IFCAP_RXCSUM, setifcap), + DEF_CMD("-rxcsum", -IFCAP_RXCSUM, setifcap), + DEF_CMD("txcsum", IFCAP_TXCSUM, setifcap), + DEF_CMD("-txcsum", -IFCAP_TXCSUM, setifcap), + DEF_CMD("netcons", IFCAP_NETCONS, setifcap), + DEF_CMD("-netcons", -IFCAP_NETCONS, setifcap), + DEF_CMD("polling", IFCAP_POLLING, setifcap), + DEF_CMD("-polling", -IFCAP_POLLING, setifcap), + DEF_CMD("normal", -IFF_LINK0, setifflags), + DEF_CMD("compress", IFF_LINK0, setifflags), + DEF_CMD("noicmp", IFF_LINK1, setifflags), + DEF_CMD_ARG("mtu", setifmtu), + DEF_CMD_ARG("name", setifname), }; static __constructor void ==== //depot/projects/wifi/sbin/ifconfig/ifconfig.h#4 (text+ko) ==== @@ -40,7 +40,7 @@ struct cmd; typedef void c_func(const char *cmd, int arg, int s, const struct afswtch *afp); -typedef void c_func2(const char *arg, const char *arg2, int s, const struct afswtch *afp); +typedef void c_func2(const char *arg1, const char *arg2, int s, const struct afswtch *afp); struct cmd { const char *c_name; @@ -48,12 +48,27 @@ #define NEXTARG 0xffffff /* has following arg */ #define NEXTARG2 0xfffffe /* has 2 following args */ #define OPTARG 0xfffffd /* has optional following arg */ - c_func *c_func; - c_func2 *c_func2; + union { + c_func *c_func; + c_func2 *c_func2; + }; struct cmd *c_next; }; void cmd_register(struct cmd *); +/* + * Macros for declaring command functions and initializing entries. + */ +#define DECL_CMD_FUNC(name, cmd, arg) \ + void name(const char *cmd, int arg, int s, const struct afswtch *afp) +#define DECL_CMD_FUNC2(name, arg1, arg2) \ + void name(const char *arg1, const char *arg2, int s, const struct afswtch *afp) + +#define DEF_CMD(name, param, func) { name, param, { .c_func = func } } +#define DEF_CMD_ARG(name, func) { name, NEXTARG, { .c_func = func } } +#define DEF_CMD_OPTARG(name, func) { name, OPTARG, { .c_func = func } } +#define DEF_CMD_ARG2(name, func) { name, NEXTARG2, { .c_func2 = func } } + struct rt_addrinfo; struct addrinfo; ==== //depot/projects/wifi/sbin/ifconfig/ifmac.c#3 (text+ko) ==== @@ -100,7 +100,7 @@ } static struct cmd mac_cmds[] = { - { "maclabel", NEXTARG, setifmaclabel }, + DEF_CMD_ARG("maclabel", setifmaclabel), }; static struct afswtch af_mac = { .af_name = "maclabel", ==== //depot/projects/wifi/sbin/ifconfig/ifmedia.c#3 (text+ko) ==== @@ -779,10 +779,10 @@ **********************************************************************/ static struct cmd media_cmds[] = { - { "media", NEXTARG, setmedia }, - { "mode", NEXTARG, setmediamode }, - { "mediaopt", NEXTARG, setmediaopt }, - { "-mediaopt", NEXTARG, unsetmediaopt }, + DEF_CMD_ARG("media", setmedia), + DEF_CMD_ARG("mode", setmediamode), + DEF_CMD_ARG("mediaopt", setmediaopt), + DEF_CMD_ARG("-mediaopt",unsetmediaopt), }; static struct afswtch af_media = { .af_name = "media", ==== //depot/projects/wifi/sbin/ifconfig/ifvlan.c#3 (text+ko) ==== @@ -146,13 +146,13 @@ } static struct cmd vlan_cmds[] = { - { "vlan", NEXTARG, setvlantag }, - { "vlandev", NEXTARG, setvlandev }, - { "-vlandev", NEXTARG, unsetvlandev }, - { "vlanmtu", IFCAP_VLAN_MTU, setifcap }, - { "-vlanmtu", -IFCAP_VLAN_MTU, setifcap }, - { "vlanhwtag", IFCAP_VLAN_HWTAGGING, setifcap }, - { "-vlanhwtag", -IFCAP_VLAN_HWTAGGING, setifcap }, + DEF_CMD_ARG("vlan", setvlantag), + DEF_CMD_ARG("vlandev", setvlandev), + DEF_CMD_ARG("-vlandev", unsetvlandev), + DEF_CMD("vlanmtu", IFCAP_VLAN_MTU, setifcap), + DEF_CMD("-vlanmtu", -IFCAP_VLAN_MTU, setifcap), + DEF_CMD("vlanhwtag", IFCAP_VLAN_HWTAGGING, setifcap), + DEF_CMD("-vlanhwtag", -IFCAP_VLAN_HWTAGGING, setifcap), }; static struct afswtch af_vlan = { .af_name = "vlan", From owner-p4-projects@FreeBSD.ORG Tue Nov 23 22:44:12 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7264616A4D0; Tue, 23 Nov 2004 22:44:12 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3563016A4CE for ; Tue, 23 Nov 2004 22:44:12 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08BFE43D55 for ; Tue, 23 Nov 2004 22:44:12 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMiBCS078043 for ; Tue, 23 Nov 2004 22:44:11 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMiBMj078040 for perforce@freebsd.org; Tue, 23 Nov 2004 22:44:11 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 22:44:11 GMT Message-Id: <200411232244.iANMiBMj078040@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65734 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:44:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=65734 Change 65734 by sam@sam_ebb on 2004/11/23 22:43:12 o redo callback decls+definitions using macros o add basic wme parameters Affected files ... .. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#16 edit Differences ... ==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#16 (text+ko) ==== @@ -481,40 +481,82 @@ } } -static void -set80211cwmin(const char *val, int d, int s, const struct afswtch *rafp) +static int +getac(const char *ac) +{ + if (strcasecmp(ac, "ac_be") == 0 || strcasecmp(ac, "be") == 0) + return WME_AC_BE; + if (strcasecmp(ac, "ac_bk") == 0 || strcasecmp(ac, "bk") == 0) + return WME_AC_BK; + if (strcasecmp(ac, "ac_vi") == 0 || strcasecmp(ac, "vi") == 0) + return WME_AC_VI; + if (strcasecmp(ac, "ac_vo") == 0 || strcasecmp(ac, "vo") == 0) + return WME_AC_VO; + errx(1, "unknown wme access class %s", ac); +} + +static +DECL_CMD_FUNC2(set80211cwmin, ac, val) +{ + set80211(s, IEEE80211_IOC_WME_CWMIN, atoi(val), getac(ac), NULL); +} + +static +DECL_CMD_FUNC2(set80211cwmax, ac, val) +{ + set80211(s, IEEE80211_IOC_WME_CWMAX, atoi(val), getac(ac), NULL); +} + +static +DECL_CMD_FUNC2(set80211aifs, ac, val) +{ + set80211(s, IEEE80211_IOC_WME_AIFS, atoi(val), getac(ac), NULL); +} + +static +DECL_CMD_FUNC2(set80211txoplimit, ac, val) +{ + set80211(s, IEEE80211_IOC_WME_TXOPLIMIT, atoi(val), getac(ac), NULL); +} + +static +DECL_CMD_FUNC(set80211acm, val, d) { - set80211(s, IEEE80211_IOC_WME_CWMIN, atoi(val), 0, NULL); + set80211(s, IEEE80211_IOC_WME_ACM, d, WME_AC_BE, NULL); } -static void -set80211cwmax(const char *val, int d, int s, const struct afswtch *rafp) +static +DECL_CMD_FUNC(set80211ackpolicy, val, d) { - set80211(s, IEEE80211_IOC_WME_CWMAX, atoi(val), 0, NULL); + set80211(s, IEEE80211_IOC_WME_ACKPOLICY, d, WME_AC_BE, NULL); } -static void -set80211aifs(const char *val, int d, int s, const struct afswtch *rafp) +static +DECL_CMD_FUNC2(set80211bsscwmin, ac, val) { - set80211(s, IEEE80211_IOC_WME_AIFS, atoi(val), 0, NULL); + set80211(s, IEEE80211_IOC_WME_CWMIN, atoi(val), + getac(ac)|IEEE80211_WMEPARAM_BSS, NULL); } -static void -set80211txoplimit(const char *val, int d, int s, const struct afswtch *rafp) +static +DECL_CMD_FUNC2(set80211bsscwmax, ac, val) { - set80211(s, IEEE80211_IOC_WME_TXOPLIMIT, atoi(val), 0, NULL); + set80211(s, IEEE80211_IOC_WME_CWMAX, atoi(val), + getac(ac)|IEEE80211_WMEPARAM_BSS, NULL); } -static void -set80211acm(const char *val, int d, int s, const struct afswtch *rafp) +static +DECL_CMD_FUNC2(set80211bssaifs, ac, val) { - set80211(s, IEEE80211_IOC_WME_ACM, atoi(val), 0, NULL); + set80211(s, IEEE80211_IOC_WME_AIFS, atoi(val), + getac(ac)|IEEE80211_WMEPARAM_BSS, NULL); } -static void -set80211ackpolicy(const char *val, int d, int s, const struct afswtch *rafp) +static +DECL_CMD_FUNC2(set80211bsstxoplimit, ac, val) { - set80211(s, IEEE80211_IOC_WME_ACKPOLICY, d, 0, NULL); + set80211(s, IEEE80211_IOC_WME_TXOPLIMIT, atoi(val), + getac(ac)|IEEE80211_WMEPARAM_BSS, NULL); } static int @@ -726,8 +768,8 @@ close(sroute); } -static void -set80211scan(const char *val, int d, int s, const struct afswtch *rafp) +static +DECL_CMD_FUNC(set80211scan, val, d) { scan_and_wait(s); list_scan(s); @@ -914,7 +956,65 @@ } static void -set80211list(const char *arg, int d, int s, const struct afswtch *rafp) +list_wme(int s) +{ + static const char *acnames[] = { "AC_BE", "AC_BK", "AC_VI", "AC_VO" }; + struct ieee80211req ireq; + int ac; + + (void) memset(&ireq, 0, sizeof(ireq)); + (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); + ireq.i_len = 0; + for (ac = WME_AC_BE; ac <= WME_AC_VO; ac++) { +again: + if (ireq.i_len & IEEE80211_WMEPARAM_BSS) + printf("\t%s", " "); + else + printf("\t%s", acnames[ac]); + + ireq.i_len = (ireq.i_len & IEEE80211_WMEPARAM_BSS) | ac; + + /* show WME BSS parameters */ + ireq.i_type = IEEE80211_IOC_WME_CWMIN; + if (ioctl(s, SIOCG80211, &ireq) != -1) + printf(" cwmin %2u", ireq.i_val); + ireq.i_type = IEEE80211_IOC_WME_CWMAX; + if (ioctl(s, SIOCG80211, &ireq) != -1) + printf(" cwmax %2u", ireq.i_val); + ireq.i_type = IEEE80211_IOC_WME_AIFS; + if (ioctl(s, SIOCG80211, &ireq) != -1) + printf(" aifs %2u", ireq.i_val); + ireq.i_type = IEEE80211_IOC_WME_TXOPLIMIT; + if (ioctl(s, SIOCG80211, &ireq) != -1) + printf(" txopLimit %3u", ireq.i_val); + ireq.i_type = IEEE80211_IOC_WME_ACM; + if (ioctl(s, SIOCG80211, &ireq) != -1) { + if (ireq.i_val) + printf(" acm"); + else if (verbose) + printf(" -acm"); + } + /* !BSS only */ + if ((ireq.i_len & IEEE80211_WMEPARAM_BSS) == 0) { + ireq.i_type = IEEE80211_IOC_WME_ACKPOLICY; + if (ioctl(s, SIOCG80211, &ireq) != -1) { + if (!ireq.i_val) + printf(" -ack"); + else if (verbose) + printf(" ack"); + } + } + printf("\n"); + if ((ireq.i_len & IEEE80211_WMEPARAM_BSS) == 0) { + ireq.i_len |= IEEE80211_WMEPARAM_BSS; + goto again; + } else + ireq.i_len &= ~IEEE80211_WMEPARAM_BSS; + } +} + +static +DECL_CMD_FUNC(set80211list, arg, d) { #define iseq(a,b) (strncasecmp(a,b,sizeof(b)-1) == 0) @@ -928,6 +1028,8 @@ list_keys(s); else if (iseq(arg, "caps")) list_capabilities(s); + else if (iseq(arg, "wme")) + list_wme(s); else errx(1, "Don't know how to list %s for %s", arg, name); #undef iseq @@ -1054,7 +1156,7 @@ { static const uint8_t zerobssid[IEEE80211_ADDR_LEN]; enum ieee80211_opmode opmode = get80211opmode(s); - int i, num, wpa; + int i, num, wpa, wme; struct ieee80211req ireq; u_int8_t data[32]; char spacer; @@ -1302,14 +1404,16 @@ ireq.i_type = IEEE80211_IOC_WME; if (ioctl(s, SIOCG80211, &ireq) != -1) { - if (ireq.i_val) { + wme = ireq.i_val; + if (wme) { printf("%cwme", spacer); spacer = ' '; } else if (verbose) { printf("%c-wme", spacer); spacer = ' '; } - } + } else + wme = 0; if (opmode == IEEE80211_M_HOSTAP) { ireq.i_type = IEEE80211_IOC_HIDESSID; @@ -1359,6 +1463,9 @@ printf("\n"); spacer = '\t'; + if (wme && verbose) + list_wme(s); + if (wpa) { spacer = '\t'; ireq.i_type = IEEE80211_IOC_COUNTERMEASURES; @@ -1507,45 +1614,50 @@ } static struct cmd ieee80211_cmds[] = { - { "ssid", NEXTARG, set80211ssid }, - { "nwid", NEXTARG, set80211ssid }, - { "stationname", NEXTARG, set80211stationname }, - { "station", NEXTARG, set80211stationname }, /* BSD/OS */ - { "channel", NEXTARG, set80211channel }, - { "authmode", NEXTARG, set80211authmode }, - { "powersavemode", NEXTARG, set80211powersavemode }, - { "powersave", 1, set80211powersave }, - { "-powersave", 0, set80211powersave }, - { "powersavesleep", NEXTARG, set80211powersavesleep }, - { "wepmode", NEXTARG, set80211wepmode }, - { "wep", 1, set80211wep }, - { "-wep", 0, set80211wep }, - { "weptxkey", NEXTARG, set80211weptxkey }, - { "wepkey", NEXTARG, set80211wepkey }, - { "nwkey", NEXTARG, set80211nwkey }, /* NetBSD */ - { "-nwkey", 0, set80211wep }, /* NetBSD */ - { "rtsthreshold",NEXTARG, set80211rtsthreshold }, - { "protmode", NEXTARG, set80211protmode }, - { "txpower", NEXTARG, set80211txpower }, - { "roaming", NEXTARG, set80211roaming }, - { "wme", 1, set80211wme }, - { "-wme", 0, set80211wme }, - { "hidessid", 1, set80211hidessid }, - { "-hidessid", 0, set80211hidessid }, - { "apbridge", 1, set80211apbridge }, - { "-apbridge", 0, set80211apbridge }, - { "chanlist", NEXTARG, set80211chanlist }, - { "bssid", NEXTARG, set80211bssid }, - { "ap", NEXTARG, set80211bssid }, - { "scan", 0, set80211scan }, - { "list", NEXTARG, set80211list }, - { "cwmin", NEXTARG, set80211cwmin }, - { "cwmax", NEXTARG, set80211cwmax }, - { "aifs", NEXTARG, set80211aifs }, - { "txoplimit", NEXTARG, set80211txoplimit }, - { "acm", NEXTARG, set80211acm }, - { "ack", 1, set80211ackpolicy }, - { "-ack", 0, set80211ackpolicy }, + DEF_CMD_ARG("ssid", set80211ssid), + DEF_CMD_ARG("nwid", set80211ssid), + DEF_CMD_ARG("stationname", set80211stationname), + DEF_CMD_ARG("station", set80211stationname), /* BSD/OS */ + DEF_CMD_ARG("channel", set80211channel), + DEF_CMD_ARG("authmode", set80211authmode), + DEF_CMD_ARG("powersavemode", set80211powersavemode), + DEF_CMD("powersave", 1, set80211powersave), + DEF_CMD("-powersave", 0, set80211powersave), + DEF_CMD_ARG("powersavesleep", set80211powersavesleep), + DEF_CMD_ARG("wepmode", set80211wepmode), + DEF_CMD("wep", 1, set80211wep), + DEF_CMD("-wep", 0, set80211wep), + DEF_CMD_ARG("weptxkey", set80211weptxkey), + DEF_CMD_ARG("wepkey", set80211wepkey), + DEF_CMD_ARG("nwkey", set80211nwkey), /* NetBSD */ + DEF_CMD("-nwkey", 0, set80211wep), /* NetBSD */ + DEF_CMD_ARG("rtsthreshold", set80211rtsthreshold), + DEF_CMD_ARG("protmode", set80211protmode), + DEF_CMD_ARG("txpower", set80211txpower), + DEF_CMD_ARG("roaming", set80211roaming), + DEF_CMD("wme", 1, set80211wme), + DEF_CMD("-wme", 0, set80211wme), + DEF_CMD("hidessid", 1, set80211hidessid), + DEF_CMD("-hidessid", 0, set80211hidessid), + DEF_CMD("apbridge", 1, set80211apbridge), + DEF_CMD("-apbridge", 0, set80211apbridge), + DEF_CMD_ARG("chanlist", set80211chanlist), + DEF_CMD_ARG("bssid", set80211bssid), + DEF_CMD_ARG("ap", set80211bssid), + DEF_CMD("scan", 0, set80211scan), + DEF_CMD_ARG("list", set80211list), + DEF_CMD_ARG2("cwmin", set80211cwmin), + DEF_CMD_ARG2("cwmax", set80211cwmax), + DEF_CMD_ARG2("aifs", set80211aifs), + DEF_CMD_ARG2("txoplimit", set80211txoplimit), + DEF_CMD("acm", 1, set80211acm), + DEF_CMD("-acm", 0, set80211acm), + DEF_CMD("ack", 1, set80211ackpolicy), + DEF_CMD("-ack", 0, set80211ackpolicy), + DEF_CMD_ARG2("bss:cwmin", set80211bsscwmin), + DEF_CMD_ARG2("bss:cwmax", set80211bsscwmax), + DEF_CMD_ARG2("bss:aifs", set80211bssaifs), + DEF_CMD_ARG2("bss:txoplimit", set80211bsstxoplimit), }; static struct afswtch af_ieee80211 = { .af_name = "ieee80211", From owner-p4-projects@FreeBSD.ORG Tue Nov 23 22:45:14 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1855216A4D1; Tue, 23 Nov 2004 22:45:14 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D308216A4CF for ; Tue, 23 Nov 2004 22:45:13 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C17B543D1D for ; Tue, 23 Nov 2004 22:45:13 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMjDBM078106 for ; Tue, 23 Nov 2004 22:45:13 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMjDkR078103 for perforce@freebsd.org; Tue, 23 Nov 2004 22:45:13 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 22:45:13 GMT Message-Id: <200411232245.iANMjDkR078103@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65735 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:45:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=65735 Change 65735 by sam@sam_ebb on 2004/11/23 22:44:16 correct station-mode wme parameter updates received from management frames Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#17 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#17 (text+ko) ==== @@ -1557,15 +1557,14 @@ return 0; } qosinfo = frm[__offsetof(struct ieee80211_wme_param, param_qosInfo)]; - if ((qosinfo & WME_QOSINFO_COUNT) < wme->wme_wmeChanParams.cap_info) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_ELEMID | IEEE80211_MSG_WME, - "%s: count mismatch, qosinfo 0x%x expected 0x%x\n", - __func__, qosinfo, wme->wme_wmeChanParams.cap_info); + qosinfo &= WME_QOSINFO_COUNT; + /* XXX do proper check for wraparound */ + if (qosinfo == wme->wme_wmeChanParams.cap_info) return 0; - } frm += __offsetof(struct ieee80211_wme_param, params_acParams); for (i = 0; i < WME_NUM_AC; i++) { - struct wmeParams *wmep = &wme->wme_chanParams.cap_wmeParams[i]; + struct wmeParams *wmep = + &wme->wme_wmeChanParams.cap_wmeParams[i]; /* NB: ACI not used */ wmep->wmep_acm = MS(frm[0], WME_PARAM_ACM); wmep->wmep_aifsn = MS(frm[0], WME_PARAM_AIFSN); @@ -1574,6 +1573,7 @@ wmep->wmep_txopLimit = LE_READ_2(frm+2); frm += 4; } + wme->wme_wmeChanParams.cap_info = qosinfo; return 1; #undef MS } From owner-p4-projects@FreeBSD.ORG Tue Nov 23 22:45:15 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C3D5F16A4D5; Tue, 23 Nov 2004 22:45:14 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30BC416A4DA for ; Tue, 23 Nov 2004 22:45:14 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C0EB43D1D for ; Tue, 23 Nov 2004 22:45:14 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMjECn078113 for ; Tue, 23 Nov 2004 22:45:14 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMjD0m078109 for perforce@freebsd.org; Tue, 23 Nov 2004 22:45:13 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 22:45:13 GMT Message-Id: <200411232245.iANMjD0m078109@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65736 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:45:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=65736 Change 65736 by sam@sam_ebb on 2004/11/23 22:44:34 wme parameter fixups Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#18 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#18 (text+ko) ==== @@ -1154,9 +1154,9 @@ if (ac >= WME_NUM_AC) ac = WME_AC_BE; if (ireq->i_len & IEEE80211_WMEPARAM_BSS) - wmep = &wme->wme_bssChanParams.cap_wmeParams[ac]; + wmep = &wme->wme_wmeBssChanParams.cap_wmeParams[ac]; else - wmep = &wme->wme_wmeBssChanParams.cap_wmeParams[ac]; + wmep = &wme->wme_wmeChanParams.cap_wmeParams[ac]; switch (ireq->i_type) { case IEEE80211_IOC_WME_CWMIN: /* WME: CWmin */ ireq->i_val = wmep->wmep_logcwmin; @@ -1171,10 +1171,12 @@ ireq->i_val = wmep->wmep_txopLimit; break; case IEEE80211_IOC_WME_ACM: /* WME: ACM (bss only) */ + wmep = &wme->wme_wmeBssChanParams.cap_wmeParams[ac]; ireq->i_val = wmep->wmep_acm; break; case IEEE80211_IOC_WME_ACKPOLICY: /* WME: ACK policy (!bss only)*/ - ireq->i_val = wmep->wmep_noackPolicy; + wmep = &wme->wme_wmeChanParams.cap_wmeParams[ac]; + ireq->i_val = !wmep->wmep_noackPolicy; break; } return 0; @@ -1769,7 +1771,7 @@ break; case IEEE80211_IOC_WME_ACKPOLICY: /* WME: ACK policy (!bss only)*/ wmep->wmep_noackPolicy = chanp->wmep_noackPolicy = - (ireq->i_val) != 0; + (ireq->i_val) == 0; break; } ieee80211_wme_updateparams(ic); From owner-p4-projects@FreeBSD.ORG Tue Nov 23 22:45:15 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0F4A916A522; Tue, 23 Nov 2004 22:45:15 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A7BA16A500 for ; Tue, 23 Nov 2004 22:45:14 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AC6943D1D for ; Tue, 23 Nov 2004 22:45:14 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMjEFM078119 for ; Tue, 23 Nov 2004 22:45:14 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMjEtA078116 for perforce@freebsd.org; Tue, 23 Nov 2004 22:45:14 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 22:45:14 GMT Message-Id: <200411232245.iANMjEtA078116@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65737 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:45:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=65737 Change 65737 by sam@sam_ebb on 2004/11/23 22:44:45 improve comments Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#12 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#12 (text+ko) ==== @@ -411,9 +411,9 @@ #define IEEE80211_IOC_TXPOWMAX 43 /* max tx power for channel */ #define IEEE80211_IOC_STA_TXPOW 44 /* per-station tx power limit */ #define IEEE80211_IOC_STA_INFO 45 /* station/neighbor info */ -#define IEEE80211_IOC_WME_CWMIN 46 /* WME: CWmin */ -#define IEEE80211_IOC_WME_CWMAX 47 /* WME: CWmax */ -#define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFS */ +#define IEEE80211_IOC_WME_CWMIN 46 /* WME: ECWmin */ +#define IEEE80211_IOC_WME_CWMAX 47 /* WME: ECWmax */ +#define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFSN */ #define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */ #define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */ #define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/ From owner-p4-projects@FreeBSD.ORG Tue Nov 23 22:46:16 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F0C716A4D0; Tue, 23 Nov 2004 22:46:16 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AA4916A4CE for ; Tue, 23 Nov 2004 22:46:16 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29DF043D5C for ; Tue, 23 Nov 2004 22:46:16 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMkGw2078159 for ; Tue, 23 Nov 2004 22:46:16 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMkFbf078156 for perforce@freebsd.org; Tue, 23 Nov 2004 22:46:15 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 22:46:15 GMT Message-Id: <200411232246.iANMkFbf078156@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65738 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:46:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=65738 Change 65738 by sam@sam_ebb on 2004/11/23 22:45:31 correct wme parameter update for dynamic changes found when updating beacon frames Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#11 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#11 (text+ko) ==== @@ -1441,6 +1441,13 @@ if (ic->ic_flags & IEEE80211_F_WME) { struct ieee80211_wme_state *wme = &ic->ic_wme; + /* + * Check for agressive mode change. When there is + * significant high priority traffic in the BSS + * throttle back BE traffic by using conservative + * parameters. Otherwise BE uses agressive params + * to optimize performance of legacy/non-QoS traffic. + */ if (wme->wme_flags & WME_F_AGGRMODE) { if (wme->wme_hipri_traffic > wme->wme_hipri_switch_thresh) { @@ -1448,7 +1455,7 @@ "%s: traffic %u, disable aggressive mode\n", __func__, wme->wme_hipri_traffic); wme->wme_flags &= ~WME_F_AGGRMODE; - wme->wme_update(ic); + ieee80211_wme_updateparams_locked(ic); wme->wme_hipri_traffic = wme->wme_hipri_switch_hysteresis; } else @@ -1460,7 +1467,7 @@ "%s: traffic %u, enable aggressive mode\n", __func__, wme->wme_hipri_traffic); wme->wme_flags |= WME_F_AGGRMODE; - wme->wme_update(ic); + ieee80211_wme_updateparams_locked(ic); wme->wme_hipri_traffic = 0; } else wme->wme_hipri_traffic = From owner-p4-projects@FreeBSD.ORG Tue Nov 23 22:48:19 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 70C8E16A4D0; Tue, 23 Nov 2004 22:48:19 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BE4F16A4CE for ; Tue, 23 Nov 2004 22:48:19 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E49E43D2F for ; Tue, 23 Nov 2004 22:48:19 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMmJjQ078186 for ; Tue, 23 Nov 2004 22:48:19 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMmIJM078183 for perforce@freebsd.org; Tue, 23 Nov 2004 22:48:18 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 22:48:18 GMT Message-Id: <200411232248.iANMmIJM078183@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65739 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:48:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=65739 Change 65739 by sam@sam_ebb on 2004/11/23 22:48:15 o split wme parameter update into locked+unlocked versions so there's an unlocked version to call from the beacon update routine o update the wme parameter set identifier so stations will install parameters received via beacons Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#9 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#9 (text+ko) ==== @@ -525,6 +525,9 @@ } } +/* + * WME protocol support. The following parameters come from the spec. + */ typedef struct phyParamType { u_int8_t aifsn; u_int8_t logcwmin; @@ -687,8 +690,11 @@ } } +/* + * Update WME parameters for ourself and the BSS. + */ void -ieee80211_wme_updateparams(struct ieee80211com *ic) +ieee80211_wme_updateparams_locked(struct ieee80211com *ic) { static const paramType phyParam[IEEE80211_MODE_MAX] = { { 2, 4, 10, 64 }, /* IEEE80211_MODE_AUTO */ @@ -704,10 +710,6 @@ struct wmeParams *chanp, *bssp; int i; - if ((ic->ic_caps & IEEE80211_C_WME) == 0) - return; - - IEEE80211_BEACON_LOCK(ic); /* set up the channel access parameters for the physical device */ for (i = 0; i < WME_NUM_AC; i++) { chanp = &wme->wme_chanParams.cap_wmeParams[i]; @@ -725,6 +727,14 @@ chanp->wmep_txopLimit = wmep->wmep_txopLimit; } + /* + * This implements agressive mode as found in certain + * vendors' AP's. When there is significant high + * priority (VI/VO) traffic in the BSS throttle back BE + * traffic by using conservative parameters. Otherwise + * BE uses agressive params to optimize performance of + * legacy/non-QoS traffic. + */ if ((ic->ic_opmode == IEEE80211_M_HOSTAP && (wme->wme_flags & WME_F_AGGRMODE) == 0) || (ic->ic_opmode != IEEE80211_M_HOSTAP && @@ -776,9 +786,34 @@ , chanp->wmep_logcwmin ); } + if (ic->ic_opmode == IEEE80211_M_HOSTAP) { /* XXX ibss? */ + /* + * Arrange for a beacon update and bump the parameter + * set number so associated stations load the new values. + */ + wme->wme_bssChanParams.cap_info = + (wme->wme_bssChanParams.cap_info+1) & WME_QOSINFO_COUNT; + ic->ic_flags |= IEEE80211_F_WMEUPDATE; + } + wme->wme_update(ic); - ic->ic_flags |= IEEE80211_F_WMEUPDATE; - IEEE80211_BEACON_UNLOCK(ic); + + IEEE80211_DPRINTF(ic, IEEE80211_MSG_WME, + "%s: WME params updated, cap_info 0x%x\n", __func__, + ic->ic_opmode == IEEE80211_M_STA ? + wme->wme_wmeChanParams.cap_info : + wme->wme_bssChanParams.cap_info); +} + +void +ieee80211_wme_updateparams(struct ieee80211com *ic) +{ + + if (ic->ic_caps & IEEE80211_C_WME) { + IEEE80211_BEACON_LOCK(ic); + ieee80211_wme_updateparams_locked(ic); + IEEE80211_BEACON_UNLOCK(ic); + } } static int From owner-p4-projects@FreeBSD.ORG Tue Nov 23 22:49:21 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28C0916A4D0; Tue, 23 Nov 2004 22:49:21 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0030216A4CE for ; Tue, 23 Nov 2004 22:49:20 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D026343D39 for ; Tue, 23 Nov 2004 22:49:20 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMnKwZ078210 for ; Tue, 23 Nov 2004 22:49:20 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMnKBg078207 for perforce@freebsd.org; Tue, 23 Nov 2004 22:49:20 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 22:49:20 GMT Message-Id: <200411232249.iANMnKBg078207@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65740 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:49:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=65740 Change 65740 by sam@sam_ebb on 2004/11/23 22:48:29 add ieee80211_wme_updateparams_locked definition Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#8 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#8 (text+ko) ==== @@ -202,6 +202,7 @@ extern void ieee80211_wme_initparams(struct ieee80211com *); extern void ieee80211_wme_updateparams(struct ieee80211com *); +extern void ieee80211_wme_updateparams_locked(struct ieee80211com *); #define ieee80211_new_state(_ic, _nstate, _arg) \ (((_ic)->ic_newstate)((_ic), (_nstate), (_arg))) From owner-p4-projects@FreeBSD.ORG Tue Nov 23 23:10:50 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA3D016A4D2; Tue, 23 Nov 2004 23:10:49 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D13216A4CE for ; Tue, 23 Nov 2004 23:10:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 303A543D3F for ; Tue, 23 Nov 2004 23:10:49 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANNAn11079316 for ; Tue, 23 Nov 2004 23:10:49 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANNAmOK079313 for perforce@freebsd.org; Tue, 23 Nov 2004 23:10:48 GMT (envelope-from jhb@freebsd.org) Date: Tue, 23 Nov 2004 23:10:48 GMT Message-Id: <200411232310.iANNAmOK079313@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 65745 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 23:10:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=65745 Change 65745 by jhb@jhb_slimer on 2004/11/23 23:10:26 IFC @65733. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/interrupt.c#31 integrate .. //depot/projects/smpng/sys/arm/arm/intr.c#5 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/uart_bus_i80321.c#2 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/uart_cpu_i80321.c#2 integrate .. //depot/projects/smpng/sys/boot/Makefile#17 integrate .. //depot/projects/smpng/sys/boot/efi/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/efi/libefi/arch/ia64/ldscript.ia64#7 delete .. //depot/projects/smpng/sys/boot/efi/libefi/arch/ia64/start.S#7 delete .. //depot/projects/smpng/sys/boot/efi/loader/Makefile#12 delete .. //depot/projects/smpng/sys/boot/efi/loader/conf.c#9 delete .. //depot/projects/smpng/sys/boot/efi/loader/main.c#15 delete .. //depot/projects/smpng/sys/boot/efi/loader/version#5 delete .. //depot/projects/smpng/sys/boot/ia64/Makefile#4 integrate .. //depot/projects/smpng/sys/boot/ia64/efi/Makefile#1 branch .. //depot/projects/smpng/sys/boot/ia64/efi/conf.c#1 branch .. //depot/projects/smpng/sys/boot/ia64/efi/ldscript.ia64#1 branch .. //depot/projects/smpng/sys/boot/ia64/efi/main.c#1 branch .. //depot/projects/smpng/sys/boot/ia64/efi/start.S#1 branch .. //depot/projects/smpng/sys/boot/ia64/efi/version#1 branch .. //depot/projects/smpng/sys/conf/files.alpha#32 integrate .. //depot/projects/smpng/sys/conf/files.amd64#24 integrate .. //depot/projects/smpng/sys/conf/files.arm#3 integrate .. //depot/projects/smpng/sys/conf/files.i386#71 integrate .. //depot/projects/smpng/sys/conf/files.ia64#46 integrate .. //depot/projects/smpng/sys/conf/files.pc98#65 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#23 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcib.c#27 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcib_acpi.c#17 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcib_pci.c#8 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcibvar.h#4 integrate .. //depot/projects/smpng/sys/geom/gate/g_gate.c#8 integrate .. //depot/projects/smpng/sys/kern/sys_pipe.c#49 integrate .. //depot/projects/smpng/sys/netgraph/ng_cisco.c#10 integrate .. //depot/projects/smpng/sys/netgraph/ng_iface.c#16 integrate .. //depot/projects/smpng/sys/netgraph/ng_one2many.c#11 integrate .. //depot/projects/smpng/sys/netgraph/ng_one2many.h#4 integrate .. //depot/projects/smpng/sys/netinet/tcp_input.c#63 integrate .. //depot/projects/smpng/sys/netinet/tcp_subr.c#59 integrate .. //depot/projects/smpng/sys/netinet/tcp_timer.c#20 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/interrupt.c#31 (text+ko) ==== @@ -33,7 +33,7 @@ #include /* 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.82 2004/07/20 06:32:32 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.83 2004/11/23 22:11:53 jhb Exp $"); #include #include @@ -474,7 +474,7 @@ /* * Only one processor drives the actual timer. */ - if (PCPU_GET(cpuid) == boot_cpu_id) { + if (PCPU_GET(cpuid) == 0) { #endif (*platform.clockintr)(framep); /* divide hz (1024) by 8 to get stathz (128) */ ==== //depot/projects/smpng/sys/arm/arm/intr.c#5 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.4 2004/11/12 21:49:05 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.5 2004/11/23 16:31:16 cognet Exp $"); #include #include #include @@ -139,17 +139,16 @@ continue; ih = TAILQ_FIRST(&ithd->it_handlers); if (ih && ih->ih_flags & IH_FAST) { + oldirqstate = disable_interrupts(I32_bit); TAILQ_FOREACH(ih, &ithd->it_handlers, ih_next) { ih->ih_handler(ih->ih_argument ? ih->ih_argument : frame); } + restore_interrupts(oldirqstate); arm_unmask_irqs(1 << i); - } else if (ih) { - oldirqstate = enable_interrupts(I32_bit); + } else if (ih) ithread_schedule(ithd); - restore_interrupts(oldirqstate); - } irqnb |= arm_get_irqnb(frame); } td->td_intr_nesting_level--; ==== //depot/projects/smpng/sys/arm/xscale/i80321/uart_bus_i80321.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_bus_i80321.c,v 1.1 2004/09/23 22:45:36 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_bus_i80321.c,v 1.2 2004/11/23 16:30:50 cognet Exp $"); #include #include @@ -59,7 +59,6 @@ sizeof(struct uart_softc), }; -extern struct uart_class uart_i8251_class; extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; static int uart_i80321_probe(device_t dev) @@ -68,7 +67,7 @@ sc = device_get_softc(dev); sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); - sc->sc_class = &uart_i8251_class; + sc->sc_class = &uart_ns8250_class; bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); return(uart_bus_probe(dev, 0, 0, 0, 0)); } ==== //depot/projects/smpng/sys/arm/xscale/i80321/uart_cpu_i80321.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_cpu_i80321.c,v 1.1 2004/09/23 22:45:36 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_cpu_i80321.c,v 1.2 2004/11/23 16:30:50 cognet Exp $"); #include #include @@ -55,7 +55,7 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - di->ops = uart_i8251_ops; + di->ops = uart_ns8250_ops; di->bas.chan = 0; di->bas.bst = &obio_bs_tag; di->bas.regshft = 0; ==== //depot/projects/smpng/sys/boot/Makefile#17 (text+ko) ==== @@ -1,10 +1,15 @@ -# $FreeBSD: src/sys/boot/Makefile,v 1.24 2004/08/16 15:45:24 marius Exp $ +# $FreeBSD: src/sys/boot/Makefile,v 1.25 2004/11/23 05:52:00 marcel Exp $ .if !defined(NOFORTH) # Build the add-in FORTH interpreter. SUBDIR+= ficl .endif +# Build EFI library. +.if ${MACHINE_ARCH} == "ia64" +SUBDIR+= efi +.endif + # Build Open Firmware library. .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" SUBDIR+= ofw @@ -19,9 +24,4 @@ #SUBDIR+= arc #.endif -# Build EFI executable on ia64. -.if ${MACHINE_ARCH} == "ia64" -SUBDIR+= efi -.endif - .include ==== //depot/projects/smpng/sys/boot/efi/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/sys/boot/efi/Makefile,v 1.1 2001/06/09 16:49:48 dfr Exp $ +# $FreeBSD: src/sys/boot/efi/Makefile,v 1.2 2004/11/23 06:04:51 marcel Exp $ -SUBDIR= libefi loader +SUBDIR= libefi .include ==== //depot/projects/smpng/sys/boot/ia64/Makefile#4 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/sys/boot/ia64/Makefile,v 1.3 2004/09/24 04:21:14 marcel Exp $ +# $FreeBSD: src/sys/boot/ia64/Makefile,v 1.4 2004/11/23 06:03:03 marcel Exp $ -SUBDIR= ski +SUBDIR= efi ski .include ==== //depot/projects/smpng/sys/conf/files.alpha#32 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.alpha,v 1.114 2004/08/01 11:40:51 markm Exp $ +# $FreeBSD: src/sys/conf/files.alpha,v 1.115 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -179,7 +179,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/ppc/ppc.c optional ppc ==== //depot/projects/smpng/sys/conf/files.amd64#24 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.50 2004/09/28 07:29:54 markm Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.51 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -123,7 +123,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/mem/memutil.c optional mem ==== //depot/projects/smpng/sys/conf/files.arm#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files.arm,v 1.3 2004/05/14 23:42:54 cognet Exp $ +# $FreeBSD: src/sys/conf/files.arm,v 1.4 2004/11/22 22:20:50 cognet Exp $ arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard @@ -29,6 +29,7 @@ arm/arm/intr.c standard arm/arm/locore.S standard no-obj arm/arm/machdep.c standard +arm/arm/mem.c optional mem arm/arm/nexus.c optional nexus arm/arm/nexus_io.c optional nexus arm/arm/nexus_io_asm.S optional nexus ==== //depot/projects/smpng/sys/conf/files.i386#71 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.508 2004/11/15 05:54:14 imp Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.509 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -157,7 +157,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/kbd/kbd.c optional vt ==== //depot/projects/smpng/sys/conf/files.ia64#46 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.ia64,v 1.73 2004/09/25 04:27:44 marcel Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.74 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -55,7 +55,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/ppc/ppc.c optional ppc isa ==== //depot/projects/smpng/sys/conf/files.pc98#65 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.306 2004/08/30 23:03:56 peter Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.307 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -105,7 +105,6 @@ dev/fb/fb.c optional gdc dev/fb/splash.c optional splash dev/fe/if_fe_cbus.c optional fe isa -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/kbd/kbd.c optional pckbd ==== //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#23 (text+ko) ==== @@ -25,17 +25,22 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.33 2004/09/25 06:15:56 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.34 2004/11/23 22:26:44 jhb Exp $"); #include "opt_acpi.h" #include +#include #include -#include +#include +#include +#include #include "acpi.h" #include #include +#include +#include #include #include "pcib_if.h" @@ -43,1119 +48,714 @@ #define _COMPONENT ACPI_BUS ACPI_MODULE_NAME("PCI_LINK") -TAILQ_HEAD(acpi_pci_link_entries, acpi_pci_link_entry); -static struct acpi_pci_link_entries acpi_pci_link_entries; ACPI_SERIAL_DECL(pci_link, "ACPI PCI link"); -TAILQ_HEAD(acpi_prt_entries, acpi_prt_entry); -static struct acpi_prt_entries acpi_prt_entries; +#define NUM_ISA_INTERRUPTS 16 +#define NUM_ACPI_INTERRUPTS 256 + +/* + * An ACPI PCI link device may contain multiple links. Each link has its + * own ACPI resource. _PRT entries specify which link is being used via + * the Source Index. + */ + +struct link; + +struct acpi_pci_link_softc { + int pl_num_links; + struct link *pl_links; +}; + +struct link { + struct acpi_pci_link_softc *l_sc; + uint8_t l_bios_irq; + uint8_t l_irq; + uint8_t l_initial_irq; + int l_res_index; + int l_num_irqs; + int *l_irqs; + int l_references; + int l_routed:1; + int l_isa_irq:1; + ACPI_RESOURCE l_prs_template; +}; + +struct link_res_request { + struct acpi_pci_link_softc *sc; + int count; +}; + +MALLOC_DEFINE(M_PCI_LINK, "PCI Link", "ACPI PCI Link structures"); -static int irq_penalty[MAX_ACPI_INTERRUPTS]; +static int pci_link_interrupt_weights[NUM_ACPI_INTERRUPTS]; +static int pci_link_bios_isa_irqs; -static int acpi_pci_link_is_valid_irq(struct acpi_pci_link_entry *link, - UINT8 irq); -static void acpi_pci_link_update_irq_penalty(device_t dev, int busno); -static void acpi_pci_link_set_bootdisabled_priority(void); -static void acpi_pci_link_fixup_bootdisabled_link(void); +static char *pci_link_ids[] = { "PNP0C0F", NULL }; /* - * PCI link object management + * Fetch the short name associated with an ACPI handle and save it in the + * passed in buffer. */ - -static void -acpi_pci_link_dump_polarity(UINT32 ActiveHighLow) +static ACPI_STATUS +acpi_short_name(ACPI_HANDLE handle, char *buffer, size_t buflen) { + ACPI_BUFFER buf; - switch (ActiveHighLow) { - case ACPI_ACTIVE_HIGH: - printf("high,"); - break; - case ACPI_ACTIVE_LOW: - printf("low,"); - break; - default: - printf("unknown,"); - break; - } + buf.Length = buflen; + buf.Pointer = buffer; + return (AcpiGetName(handle, ACPI_SINGLE_NAME, &buf)); } -static void -acpi_pci_link_dump_trigger(UINT32 EdgeLevel) +static int +acpi_pci_link_probe(device_t dev) { + char descr[64], name[10]; - switch (EdgeLevel) { - case ACPI_EDGE_SENSITIVE: - printf("edge,"); - break; - case ACPI_LEVEL_SENSITIVE: - printf("level,"); - break; - default: - printf("unknown,"); - break; + /* + * We explicitly do not check _STA since not all systems set it to + * sensible values. + */ + if (!acpi_disabled("pci_link") && + ACPI_ID_PROBE(device_get_parent(dev), dev, pci_link_ids) != NULL) { + if (ACPI_FAILURE(acpi_short_name(acpi_get_handle(dev), name, + sizeof(name)))) + device_set_desc(dev, "ACPI PCI Link"); + else { + snprintf(descr, sizeof(descr), "ACPI PCI Link %s", + name); + device_set_desc_copy(dev, descr); + } + return (0); } + return (ENXIO); } -static void -acpi_pci_link_dump_sharemode(UINT32 SharedExclusive) +static ACPI_STATUS +acpi_count_resources(ACPI_RESOURCE *res, void *context) { + int *count; - switch (SharedExclusive) { - case ACPI_EXCLUSIVE: - printf("exclusive"); - break; - case ACPI_SHARED: - printf("sharable"); - break; - default: - printf("unknown"); - break; - } + count = (int *)context; + (*count)++; + return (AE_OK); } -static void -acpi_pci_link_entry_dump(struct acpi_prt_entry *entry) +static ACPI_STATUS +link_add_crs(ACPI_RESOURCE *res, void *context) { - UINT8 i; - ACPI_RESOURCE_IRQ *Irq; - ACPI_RESOURCE_EXT_IRQ *ExtIrq; - struct acpi_pci_link_entry *link; + struct link_res_request *req; + struct link *link; - if (entry == NULL || entry->pci_link == NULL) - return; - link = entry->pci_link; - - printf("%s irq%c%2d: ", acpi_name(link->handle), - (link->flags & ACPI_LINK_ROUTED) ? '*' : ' ', link->current_irq); - - printf("["); - if (link->number_of_interrupts) - printf("%2d", link->interrupts[0]); - for (i = 1; i < link->number_of_interrupts; i++) - printf("%3d", link->interrupts[i]); - printf("] %2d+ ", link->initial_irq); - - switch (link->possible_resources.Id) { + ACPI_SERIAL_ASSERT(pci_link); + req = (struct link_res_request *)context; + link = &req->sc->pl_links[req->count]; + req->count++; + switch (res->Id) { case ACPI_RSTYPE_IRQ: - Irq = &link->possible_resources.Data.Irq; - acpi_pci_link_dump_polarity(Irq->ActiveHighLow); - acpi_pci_link_dump_trigger(Irq->EdgeLevel); - acpi_pci_link_dump_sharemode(Irq->SharedExclusive); - break; case ACPI_RSTYPE_EXT_IRQ: - ExtIrq = &link->possible_resources.Data.ExtendedIrq; - acpi_pci_link_dump_polarity(ExtIrq->ActiveHighLow); - acpi_pci_link_dump_trigger(ExtIrq->EdgeLevel); - acpi_pci_link_dump_sharemode(ExtIrq->SharedExclusive); + if (res->Id == ACPI_RSTYPE_IRQ) { + if (res->Data.Irq.NumberOfInterrupts > 0) { + KASSERT(res->Data.Irq.NumberOfInterrupts == 1, + ("%s: too many interrupts", __func__)); + link->l_irq = res->Data.Irq.Interrupts[0]; + } + } else if (res->Data.ExtendedIrq.NumberOfInterrupts > 0) { + KASSERT(res->Data.ExtendedIrq.NumberOfInterrupts == 1, + ("%s: too many interrupts", __func__)); + link->l_irq = res->Data.ExtendedIrq.Interrupts[0]; + } + + /* + * An IRQ of zero means that the link isn't routed. + */ + if (link->l_irq == 0) + link->l_irq = PCI_INVALID_IRQ; break; } - - printf(" %d.%d.%d\n", entry->busno, - (int)(ACPI_ADR_PCI_SLOT(entry->prt.Address)), - (int)entry->prt.Pin); + return (AE_OK); } +/* + * Populate the set of possible IRQs for each device. + */ static ACPI_STATUS -acpi_pci_link_get_object_status(ACPI_HANDLE handle, UINT32 *sta) +link_add_prs(ACPI_RESOURCE *res, void *context) { - ACPI_DEVICE_INFO *devinfo; - ACPI_BUFFER buf; - ACPI_STATUS error; + struct link_res_request *req; + struct link *link; + UINT32 *irqs; + int i; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - - if (handle == NULL || sta == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid argument\n")); - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - buf.Pointer = NULL; - buf.Length = ACPI_ALLOCATE_BUFFER; - error = AcpiGetObjectInfo(handle, &buf); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't get object info %s - %s\n", - acpi_name(handle), AcpiFormatException(error))); - return_ACPI_STATUS (error); - } - - devinfo = (ACPI_DEVICE_INFO *)buf.Pointer; - if ((devinfo->Valid & ACPI_VALID_HID) == 0 || - strcmp(devinfo->HardwareId.Value, "PNP0C0F") != 0) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid hardware ID - %s\n", - acpi_name(handle))); - AcpiOsFree(buf.Pointer); - return_ACPI_STATUS (AE_TYPE); - } - - if ((devinfo->Valid & ACPI_VALID_STA) != 0) { - *sta = devinfo->CurrentStatus; - } else { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "invalid status - %s\n", - acpi_name(handle))); - *sta = 0; - } - - AcpiOsFree(buf.Pointer); - return_ACPI_STATUS (AE_OK); -} - -static ACPI_STATUS -acpi_pci_link_get_irq_resources(ACPI_RESOURCE *resources, - UINT8 *number_of_interrupts, UINT8 interrupts[]) -{ - UINT8 count; - UINT8 i; - UINT32 NumberOfInterrupts; - UINT32 *Interrupts; - - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - - if (resources == NULL || number_of_interrupts == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid argument\n")); - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - *number_of_interrupts = 0; - NumberOfInterrupts = 0; - Interrupts = NULL; - - if (resources->Id == ACPI_RSTYPE_START_DPF) - resources = ACPI_NEXT_RESOURCE(resources); - - if (resources->Id != ACPI_RSTYPE_IRQ && - resources->Id != ACPI_RSTYPE_EXT_IRQ) { - printf("acpi link get: resource %d is not an IRQ\n", - resources->Id); - return_ACPI_STATUS (AE_TYPE); - } - - switch (resources->Id) { + ACPI_SERIAL_ASSERT(pci_link); + req = (struct link_res_request *)context; + link = &req->sc->pl_links[req->count]; + req->count++; + switch (res->Id) { case ACPI_RSTYPE_IRQ: - NumberOfInterrupts = resources->Data.Irq.NumberOfInterrupts; - Interrupts = resources->Data.Irq.Interrupts; - break; case ACPI_RSTYPE_EXT_IRQ: - NumberOfInterrupts = - resources->Data.ExtendedIrq.NumberOfInterrupts; - Interrupts = resources->Data.ExtendedIrq.Interrupts; - break; - } - if (NumberOfInterrupts == 0) - return_ACPI_STATUS (AE_NULL_ENTRY); + /* + * Stash a copy of the resource for later use when doing + * _SRS. + */ + bcopy(res, &link->l_prs_template, sizeof(ACPI_RESOURCE)); + if (res->Id == ACPI_RSTYPE_IRQ) { + link->l_num_irqs = res->Data.Irq.NumberOfInterrupts; + irqs = res->Data.Irq.Interrupts; + } else { + link->l_num_irqs = + res->Data.ExtendedIrq.NumberOfInterrupts; + irqs = res->Data.ExtendedIrq.Interrupts; + } + if (link->l_num_irqs == 0) + break; - count = 0; - for (i = 0; i < NumberOfInterrupts; i++) { - if (i >= MAX_POSSIBLE_INTERRUPTS) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "too many IRQs (%d)\n", - i)); - break; + /* + * Save a list of the valid IRQs. Also, if all of the + * valid IRQs are ISA IRQs, then mark this link as + * routed via an ISA interrupt. + */ + link->l_isa_irq = 1; + link->l_irqs = malloc(sizeof(int) * link->l_num_irqs, + M_PCI_LINK, M_WAITOK | M_ZERO); + for (i = 0; i < link->l_num_irqs; i++) { + link->l_irqs[i] = irqs[i]; + if (irqs[1] >= NUM_ISA_INTERRUPTS) + link->l_isa_irq = 0; } - if (Interrupts[i] == 0) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "invalid IRQ %d\n", - Interrupts[i])); - continue; - } - interrupts[count] = Interrupts[i]; - count++; + break; } - *number_of_interrupts = count; - - return_ACPI_STATUS (AE_OK); + return (AE_OK); } -static ACPI_STATUS -acpi_pci_link_get_current_irq(struct acpi_pci_link_entry *link, UINT8 *irq) +static int +link_valid_irq(struct link *link, int irq) { - ACPI_STATUS error; - ACPI_BUFFER buf; - ACPI_RESOURCE *resources; - UINT8 number_of_interrupts; - UINT8 interrupts[MAX_POSSIBLE_INTERRUPTS];; + int i; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(pci_link); - if (link == NULL || irq == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid argument\n")); - return_ACPI_STATUS (AE_BAD_PARAMETER); - } + /* Invalid interrupts are never valid. */ + if (!PCI_INTERRUPT_VALID(irq)) + return (0); - *irq = 0; - buf.Pointer = NULL; - buf.Length = ACPI_ALLOCATE_BUFFER; - error = AcpiGetCurrentResources(link->handle, &buf); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't get PCI interrupt link device _CRS %s - %s\n", - acpi_name(link->handle), AcpiFormatException(error))); - return_ACPI_STATUS (error); - } - if (buf.Pointer == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't allocate memory - %s\n", - acpi_name(link->handle))); - return_ACPI_STATUS (AE_NO_MEMORY); - } + /* Any interrupt in the list of possible interrupts is valid. */ + for (i = 0; i < link->l_num_irqs; i++) + if (link->l_irqs[i] == irq) + return (1); - resources = (ACPI_RESOURCE *) buf.Pointer; - number_of_interrupts = 0; - bzero(interrupts, sizeof(interrupts)); - error = acpi_pci_link_get_irq_resources(resources, - &number_of_interrupts, interrupts); - AcpiOsFree(buf.Pointer); + /* + * For links routed via an ISA interrupt, if the SCI is routed via + * an ISA interrupt, the SCI is always treated as a valid IRQ. + */ + if (link->l_isa_irq && AcpiGbl_FADT->SciInt == irq && + irq < NUM_ISA_INTERRUPTS) + return (1); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "couldn't get current IRQ from interrupt link %s - %s\n", - acpi_name(link->handle), AcpiFormatException(error))); - return_ACPI_STATUS (error); - } - - if (number_of_interrupts == 0) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "PCI interrupt link device _CRS data is corrupted - %s\n", - acpi_name(link->handle))); - return_ACPI_STATUS (AE_NULL_ENTRY); - } - - *irq = interrupts[0]; - - return_ACPI_STATUS (AE_OK); + /* If the interrupt wasn't found in the list it is not valid. */ + return (0); } -static ACPI_STATUS -acpi_pci_link_add_link(ACPI_HANDLE handle, struct acpi_prt_entry *entry) +static void +acpi_pci_link_dump(struct acpi_pci_link_softc *sc) { - ACPI_STATUS error; - ACPI_BUFFER buf; - ACPI_RESOURCE *resources; - struct acpi_pci_link_entry *link; + struct link *link; + int i, j; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(pci_link); - - entry->pci_link = NULL; - TAILQ_FOREACH(link, &acpi_pci_link_entries, links) { - if (link->handle == handle) { - entry->pci_link = link; - link->references++; - return_ACPI_STATUS (AE_OK); - } + printf("Index IRQ Rtd Ref IRQs\n"); + for (i = 0; i < sc->pl_num_links; i++) { + link = &sc->pl_links[i]; + printf("%5d %3d %c %3d ", i, link->l_irq, + link->l_routed ? 'Y' : 'N', link->l_references); + if (link->l_num_irqs == 0) + printf(" none"); + else for (j = 0; j < link->l_num_irqs; j++) + printf(" %d", link->l_irqs[j]); + printf("\n"); } +} - link = AcpiOsAllocate(sizeof(struct acpi_pci_link_entry)); - if (link == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't allocate memory - %s\n", acpi_name(handle))); - return_ACPI_STATUS (AE_NO_MEMORY); - } +static int +acpi_pci_link_attach(device_t dev) +{ + struct acpi_pci_link_softc *sc; + struct link_res_request req; + ACPI_STATUS status; + int i; - buf.Pointer = NULL; - buf.Length = ACPI_ALLOCATE_BUFFER; - - bzero(link, sizeof(struct acpi_pci_link_entry)); - link->handle = handle; + sc = device_get_softc(dev); + ACPI_SERIAL_BEGIN(pci_link); /* - * Get the IRQ configured at boot-time. If successful, set this - * as the initial IRQ. + * Count the number of current resources so we know how big of + * a link array to allocate. */ - error = acpi_pci_link_get_current_irq(link, &link->current_irq); - if (ACPI_SUCCESS(error)) { - link->initial_irq = link->current_irq; - } else { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "couldn't get current IRQ from interrupt link %s - %s\n", - acpi_name(handle), AcpiFormatException(error))); - link->initial_irq = 0; - } + status = AcpiWalkResources(acpi_get_handle(dev), "_CRS", + acpi_count_resources, &sc->pl_num_links); + if (ACPI_FAILURE(status)) + return (ENXIO); + if (sc->pl_num_links == 0) + return (0); + sc->pl_links = malloc(sizeof(struct link) * sc->pl_num_links, + M_PCI_LINK, M_WAITOK | M_ZERO); - error = AcpiGetPossibleResources(handle, &buf); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "couldn't get interrupt link device _PRS data %s - %s\n", - acpi_name(handle), AcpiFormatException(error))); - goto out; + /* Initialize the child links. */ + for (i = 0; i < sc->pl_num_links; i++) { + sc->pl_links[i].l_irq = PCI_INVALID_IRQ; + sc->pl_links[i].l_bios_irq = PCI_INVALID_IRQ; + sc->pl_links[i].l_res_index = i; + sc->pl_links[i].l_sc = sc; + sc->pl_links[i].l_isa_irq = 0; } - if (buf.Pointer == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "_PRS buffer is empty - %s\n", acpi_name(handle))); - error = AE_NO_MEMORY; - goto out; + req.count = 0; + req.sc = sc; + status = AcpiWalkResources(acpi_get_handle(dev), "_CRS", + link_add_crs, &req); + if (ACPI_FAILURE(status)) + goto fail; + req.count = 0; + status = AcpiWalkResources(acpi_get_handle(dev), "_PRS", + link_add_prs, &req); + if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) + goto fail; + if (bootverbose) { + device_printf(dev, "Links after initial probe:\n"); + acpi_pci_link_dump(sc); } - /* Skip any DPF descriptors. XXX We should centralize this code. */ - resources = (ACPI_RESOURCE *) buf.Pointer; - if (resources->Id == ACPI_RSTYPE_START_DPF) - resources = ACPI_NEXT_RESOURCE(resources); - - /* XXX This only handles one resource, ignoring SourceIndex. */ - bcopy(resources, &link->possible_resources, - sizeof(link->possible_resources)); - - error = acpi_pci_link_get_irq_resources(resources, - &link->number_of_interrupts, link->interrupts); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "couldn't get possible IRQs from interrupt link %s - %s\n", - acpi_name(handle), AcpiFormatException(error))); - goto out; + /* Verify initial IRQs if we have _PRS. */ + if (status != AE_NOT_FOUND) + for (i = 0; i < sc->pl_num_links; i++) + if (!link_valid_irq(&sc->pl_links[i], + sc->pl_links[i].l_irq)) + sc->pl_links[i].l_irq = PCI_INVALID_IRQ; + if (bootverbose) { + device_printf(dev, "Links after initial validation:\n"); + acpi_pci_link_dump(sc); } - if (link->number_of_interrupts == 0) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "interrupt link device _PRS data is corrupted - %s\n", - acpi_name(handle))); - error = AE_NULL_ENTRY; - goto out; - } + /* Save initial IRQs. */ + for (i = 0; i < sc->pl_num_links; i++) + sc->pl_links[i].l_initial_irq = sc->pl_links[i].l_irq; /* * Try to disable this link. If successful, set the current IRQ to * zero and flags to indicate this link is not routed. If we can't * run _DIS (i.e., the method doesn't exist), assume the initial * IRQ was routed by the BIOS. - * - * XXX Since we detect link devices via _PRT entries but run long - * after APIC mode has been enabled, we don't get a chance to - * disable links that will be unused (especially in APIC mode). - * Leaving them enabled can cause duplicate interrupts for some - * devices. The right fix is to probe links via their PNPID, so we - * see them no matter what the _PRT says. */ - if (ACPI_SUCCESS(AcpiEvaluateObject(handle, "_DIS", NULL, NULL))) { - link->current_irq = 0; - link->flags = ACPI_LINK_NONE; - } else - link->flags = ACPI_LINK_ROUTED; - - /* - * If the initial IRQ is invalid (not in _PRS), set it to 0 and - * mark this link as not routed. We won't use it as the preferred - * interrupt later when we route. - */ - if (!acpi_pci_link_is_valid_irq(link, link->initial_irq) && - link->initial_irq != 0) { - printf("ACPI link %s has invalid initial irq %d, ignoring\n", - acpi_name(handle), link->initial_irq); - link->initial_irq = 0; - link->flags = ACPI_LINK_NONE; + if (ACPI_SUCCESS(AcpiEvaluateObject(acpi_get_handle(dev), "_DIS", NULL, + NULL))) + for (i = 0; i < sc->pl_num_links; i++) + sc->pl_links[i].l_irq = PCI_INVALID_IRQ; + else + for (i = 0; i < sc->pl_num_links; i++) + if (PCI_INTERRUPT_VALID(sc->pl_links[i].l_irq)) + sc->pl_links[i].l_routed = 1; + if (bootverbose) { + device_printf(dev, "Links after disable:\n"); + acpi_pci_link_dump(sc); } + ACPI_SERIAL_END(pci_link); + return (0); +fail: + ACPI_SERIAL_END(pci_link); + for (i = 0; i < sc->pl_num_links; i++) + if (sc->pl_links[i].l_irqs != NULL) + free(sc->pl_links[i].l_irqs, M_PCI_LINK); + free(sc->pl_links, M_PCI_LINK); + return (ENXIO); +} >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 23 23:25:10 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F68A16A4D0; Tue, 23 Nov 2004 23:25:10 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A68F16A4CE for ; Tue, 23 Nov 2004 23:25:10 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48E8043D2F for ; Tue, 23 Nov 2004 23:25:10 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANNPA5w079892 for ; Tue, 23 Nov 2004 23:25:10 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANNP9op079889 for perforce@freebsd.org; Tue, 23 Nov 2004 23:25:09 GMT (envelope-from sam@freebsd.org) Date: Tue, 23 Nov 2004 23:25:09 GMT Message-Id: <200411232325.iANNP9op079889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65754 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 23:25:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=65754 Change 65754 by sam@sam_ebb on 2004/11/23 23:24:09 o return all channels, not just active ones, for get chan info o add in get chan list to retrieve active channel list Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#19 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#19 (text+ko) ==== @@ -866,6 +866,15 @@ } static int +ieee80211_ioctl_getchanlist(struct ieee80211com *ic, struct ieee80211req *ireq) +{ + + if (sizeof(ic->ic_chan_active) > ireq->i_len) + ireq->i_len = sizeof(ic->ic_chan_active); + return copyout(&ic->ic_chan_active, ireq->i_data, ireq->i_len); +} + +static int ieee80211_ioctl_getchaninfo(struct ieee80211com *ic, struct ieee80211req *ireq) { struct ieee80211req_chaninfo chans; /* XXX off stack? */ @@ -881,7 +890,7 @@ i = 0; memset(&chans, 0, sizeof(chans)); for (; i <= IEEE80211_CHAN_MAX; i++) - if (isset(ic->ic_chan_active, i)) { + if (isset(ic->ic_chan_avail, i)) { struct ieee80211_channel *c = &ic->ic_channels[i]; chans.ic_chans[chans.ic_nchans].ic_freq = c->ic_freq; chans.ic_chans[chans.ic_nchans].ic_flags = c->ic_flags; @@ -1307,6 +1316,9 @@ break; } break; + case IEEE80211_IOC_CHANLIST: + error = ieee80211_ioctl_getchanlist(ic, ireq); + break; case IEEE80211_IOC_ROAMING: ireq->i_val = ic->ic_roaming; break; @@ -1638,7 +1650,7 @@ ieee80211_ioctl_setchanlist(struct ieee80211com *ic, struct ieee80211req *ireq) { struct ieee80211req_chanlist list; - u_char chanlist[roundup(IEEE80211_CHAN_MAX, NBBY)]; + u_char chanlist[IEEE80211_CHAN_BYTES]; int i, j, error; if (ireq->i_len != sizeof(list)) From owner-p4-projects@FreeBSD.ORG Wed Nov 24 02:40:06 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 73B5116A4D6; Wed, 24 Nov 2004 02:40:06 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 417AD16A4CE for ; Wed, 24 Nov 2004 02:40:06 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12FC943D62 for ; Wed, 24 Nov 2004 02:40:06 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAO2e58g092856 for ; Wed, 24 Nov 2004 02:40:05 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAO2e5w4092853 for perforce@freebsd.org; Wed, 24 Nov 2004 02:40:05 GMT (envelope-from sam@freebsd.org) Date: Wed, 24 Nov 2004 02:40:05 GMT Message-Id: <200411240240.iAO2e5w4092853@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65759 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 02:40:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=65759 Change 65759 by sam@sam_ebb on 2004/11/24 02:39:40 add list active to list only active channels Affected files ... .. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#17 edit Differences ... ==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#17 (text+ko) ==== @@ -902,10 +902,12 @@ } static void -list_channels(int s) +list_channels(int s, int allchans) { struct ieee80211req ireq; struct ieee80211req_chaninfo chans; + struct ieee80211req_chaninfo achans; + const struct ieee80211_channel *c; int i, half; (void) memset(&ireq, 0, sizeof(ireq)); @@ -915,16 +917,32 @@ ireq.i_len = sizeof(chans); if (ioctl(s, SIOCG80211, &ireq) < 0) errx(1, "unable to get channel information"); - half = chans.ic_nchans / 2; - if (chans.ic_nchans % 2) + if (!allchans) { + struct ieee80211req_chanlist active; + + ireq.i_type = IEEE80211_IOC_CHANLIST; + ireq.i_data = &active; + ireq.i_len = sizeof(active); + if (ioctl(s, SIOCG80211, &ireq) < 0) + errx(1, "unable to get active channel list"); + memset(&achans, 0, sizeof(achans)); + for (i = 0; i < chans.ic_nchans; i++) { + c = &chans.ic_chans[i]; + if (isset(active.ic_channels, ieee80211_mhz2ieee(c->ic_freq)) || allchans) + achans.ic_chans[achans.ic_nchans++] = *c; + } + } else + achans = chans; + half = achans.ic_nchans / 2; + if (achans.ic_nchans % 2) half++; - for (i = 0; i < chans.ic_nchans / 2; i++) { - print_chaninfo(&chans.ic_chans[i]); - print_chaninfo(&chans.ic_chans[half+i]); + for (i = 0; i < achans.ic_nchans / 2; i++) { + print_chaninfo(&achans.ic_chans[i]); + print_chaninfo(&achans.ic_chans[half+i]); printf("\n"); } - if (chans.ic_nchans % 2) { - print_chaninfo(&chans.ic_chans[i]); + if (achans.ic_nchans % 2) { + print_chaninfo(&achans.ic_chans[i]); printf("\n"); } } @@ -1023,7 +1041,9 @@ else if (iseq(arg, "scan") || iseq(arg, "ap")) list_scan(s); else if (iseq(arg, "chan") || iseq(arg, "freq")) - list_channels(s); + list_channels(s, 1); + else if (iseq(arg, "active")) + list_channels(s, 0); else if (iseq(arg, "keys")) list_keys(s); else if (iseq(arg, "caps")) From owner-p4-projects@FreeBSD.ORG Wed Nov 24 02:48:17 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C77F816A88D; Wed, 24 Nov 2004 02:48:16 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8823816A863 for ; Wed, 24 Nov 2004 02:48:16 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E04943D60 for ; Wed, 24 Nov 2004 02:48:16 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAO2mGCI093251 for ; Wed, 24 Nov 2004 02:48:16 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAO2mGHE093248 for perforce@freebsd.org; Wed, 24 Nov 2004 02:48:16 GMT (envelope-from wsalamon@computer.org) Date: Wed, 24 Nov 2004 02:48:16 GMT Message-Id: <200411240248.iAO2mGHE093248@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Subject: PERFORCE change 65760 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 02:48:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=65760 Change 65760 by wsalamon@rickenbacker on 2004/11/24 02:47:47 Add auditing to login, which is required to set up the user process audit state. Update the man page to include audit info for login. Affected files ... .. //depot/projects/trustedbsd/audit3/usr.bin/login/Makefile#2 edit .. //depot/projects/trustedbsd/audit3/usr.bin/login/login.1#3 edit .. //depot/projects/trustedbsd/audit3/usr.bin/login/login.c#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/usr.bin/login/Makefile#2 (text+ko) ==== @@ -5,7 +5,7 @@ SRCS= login.c login_fbtab.c CFLAGS+=-DLOGALL DPADD= ${LIBUTIL} ${LIBPAM} -LDADD= -lutil ${MINUSLPAM} +LDADD= -lutil -lbsm ${MINUSLPAM} MAN= login.1 login.access.5 .if !defined(NO_SETUID_LOGIN) BINOWN= root ==== //depot/projects/trustedbsd/audit3/usr.bin/login/login.1#3 (text+ko) ==== @@ -124,6 +124,12 @@ Consult the .Xr builtin 1 manual page. +.Pp +The +.Nm +utility will submit an audit record when login succeeds or fails. Failure to +determine the current auditing state will result in an error exit from +.Nm . .Sh FILES .Bl -tag -width ".Pa /etc/login.access" -compact .It Pa /etc/fbtab @@ -143,6 +149,10 @@ .It Pa /etc/pam.d/login .Xr pam 8 configuration file +.It Pa /etc/security/audit_user +user flags for auditing +.It Pa /etc/security/audit_control +global flags for auditing .El .Sh SEE ALSO .Xr builtin 1 , ==== //depot/projects/trustedbsd/audit3/usr.bin/login/login.c#2 (text+ko) ==== @@ -61,6 +61,9 @@ #include #include +#include +#include + #include #include #include @@ -96,6 +99,8 @@ static void sigint(int); static void timedout(int); static void usage(void); +static void au_success(); +static void au_fail(char *, int); #define TTYGRPNAME "tty" /* group to own ttys */ #define DEFAULT_BACKOFF 3 @@ -155,6 +160,11 @@ static int pam_cred_established; static int pam_session_established; +/* + * Audit data + */ +au_tid_t tid; + int main(int argc, char *argv[]) { @@ -172,6 +182,7 @@ const char *shell = NULL; login_cap_t *lc = NULL; pid_t pid; + char auditsuccess = 1; (void)signal(SIGQUIT, SIG_IGN); (void)signal(SIGINT, SIG_IGN); @@ -290,16 +301,19 @@ pam_err = pam_start("login", username, &pamc, &pamh); if (pam_err != PAM_SUCCESS) { pam_syslog("pam_start()"); + au_fail("PAM Error", 1); bail(NO_SLEEP_EXIT, 1); } pam_err = pam_set_item(pamh, PAM_TTY, tty); if (pam_err != PAM_SUCCESS) { pam_syslog("pam_set_item(PAM_TTY)"); + au_fail("PAM Error", 1); bail(NO_SLEEP_EXIT, 1); } pam_err = pam_set_item(pamh, PAM_RHOST, hostname); if (pam_err != PAM_SUCCESS) { pam_syslog("pam_set_item(PAM_RHOST)"); + au_fail("PAM Error", 1); bail(NO_SLEEP_EXIT, 1); } @@ -316,6 +330,7 @@ (uid == (uid_t)0 || uid == (uid_t)pwd->pw_uid)) { /* already authenticated */ rval = 0; + auditsuccess = 0; /* opened a terminal window only */ } else { fflag = 0; (void)setpriority(PRIO_PROCESS, 0, -4); @@ -328,6 +343,12 @@ pam_cleanup(); + /* + * we are not exiting here, but this corresponds to + * a failed login event, so set exitstatus to 1 + */ + au_fail("Login incorrect", 1); + (void)printf("Login incorrect\n"); failures++; @@ -350,6 +371,10 @@ endpwent(); + /* Audit successful login */ + if (auditsuccess) + au_success(); + /* * Establish the login class. */ @@ -746,6 +771,154 @@ return (1); } +/* + * The following tokens are included in the audit record for a successful + * login: + * header + * subject + * return + */ +static void +au_success() +{ + token_t *tok; + int aufd; + au_mask_t aumask; + auditinfo_t auinfo; + uid_t uid = pwd->pw_uid; + gid_t gid = pwd->pw_gid; + pid_t pid = getpid(); + long au_cond; + + /* If we are not auditing, don't cut an audit record; just return */ + if (auditon(A_GETCOND, &au_cond, sizeof(long)) < 0) { + fprintf(stderr, "login: Could not determine audit condition\n"); + exit(1); + } + if (au_cond == AUC_NOAUDIT) + return; + + /* Compute and Set the user's preselection mask */ + if(au_user_mask(pwd->pw_name, &aumask) == -1) { + fprintf(stderr, "login: Could not set audit mask\n"); + exit(1); + } + + /* Set the audit info for the user */ + auinfo.ai_auid = uid; + auinfo.ai_asid = pid; + bcopy(&tid, &auinfo.ai_termid, sizeof(auinfo.ai_termid)); + bcopy(&aumask, &auinfo.ai_mask, sizeof(auinfo.ai_mask)); + if(setaudit(&auinfo) != 0) { + fprintf(stderr, "login: setaudit failed: %s\n", + strerror(errno)); + exit(1); + } + + if((aufd = au_open()) == -1) { + fprintf(stderr, "login: Audit Error: au_open() failed\n"); + exit(1); + } + + /* The subject that is created (euid, egid of the current process) */ + if((tok = au_to_subject32(uid, geteuid(), getegid(), + uid, gid, pid, pid, &tid)) == NULL) { + fprintf(stderr, + "login: Audit Error: au_to_subject32() failed\n"); + exit(1); + } + au_write(aufd, tok); + + if((tok = au_to_return32(0, 0)) == NULL) { + fprintf(stderr, + "login: Audit Error: au_to_return32() failed\n"); + exit(1); + } + au_write(aufd, tok); + + if(au_close(aufd, 1, AUE_login) == -1) { + fprintf(stderr, "login: Audit Record was not committed.\n"); + exit(1); + } +} + +/* + * The following tokens are included in the audit record for failed + * login attempts: + * header + * subject + * text + * return + */ +static void +au_fail(char *errmsg, int na) +{ + token_t *tok; + int aufd; + long au_cond; + uid_t uid; + gid_t gid; + pid_t pid = getpid(); + + /* If we are not auditing, don't cut an audit record; just return */ + if (auditon(A_GETCOND, &au_cond, sizeof(long)) < 0) { + fprintf(stderr, "login: Could not determine audit condition\n"); + exit(1); + } + if (au_cond == AUC_NOAUDIT) + return; + + if((aufd = au_open()) == -1) { + fprintf(stderr, "login: Audit Error: au_open() failed\n"); + exit(1); + } + + if(na) { + /* Non attributable event */ + /* Assuming that login is not called within a user's + * session => auid,asid == -1 */ + if((tok = au_to_subject32(-1, geteuid(), getegid(), -1, -1, + pid, -1, &tid)) == NULL) { + + fprintf(stderr, + "login: Audit Error: au_to_subject32() failed\n"); + exit(1); + } + } + else { + /* we know the subject -- so use its value instead */ + uid = pwd->pw_uid; + gid = pwd->pw_gid; + if((tok = au_to_subject32(uid, geteuid(), getegid(), + uid, gid, pid, pid, &tid)) == NULL) { + fprintf(stderr, + "login: Audit Error: au_to_subject32() failed\n"); + exit(1); + } + } + au_write(aufd, tok); + + /* Include the error message */ + if((tok = au_to_text(errmsg)) == NULL) { + fprintf(stderr, "login: Audit Error: au_to_text() failed\n"); + exit(1); + } + au_write(aufd, tok); + + if((tok = au_to_return32(1, errno)) == NULL) { + fprintf(stderr, + "login: Audit Error: au_to_return32() failed\n"); + exit(1); + } + au_write(aufd, tok); + + if(au_close(aufd, 1, AUE_login) == -1) { + fprintf(stderr, + "login: Audit Error: au_close() was not committed\n"); + exit(1); + } +} + static void usage() { From owner-p4-projects@FreeBSD.ORG Wed Nov 24 02:51:21 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BE77A16A9DB; Wed, 24 Nov 2004 02:51:20 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99FB316A9C8 for ; Wed, 24 Nov 2004 02:51:20 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 873BC43D39 for ; Wed, 24 Nov 2004 02:51:20 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAO2pKpb093400 for ; Wed, 24 Nov 2004 02:51:20 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAO2pKNk093397 for perforce@freebsd.org; Wed, 24 Nov 2004 02:51:20 GMT (envelope-from wsalamon@computer.org) Date: Wed, 24 Nov 2004 02:51:20 GMT Message-Id: <200411240251.iAO2pKNk093397@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Subject: PERFORCE change 65761 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 02:51:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=65761 Change 65761 by wsalamon@rickenbacker on 2004/11/24 02:50:25 Add the Apple copyright to cover the auditing pieces. Affected files ... .. //depot/projects/trustedbsd/audit3/usr.bin/login/login.c#3 edit Differences ... ==== //depot/projects/trustedbsd/audit3/usr.bin/login/login.c#3 (text+ko) ==== @@ -37,6 +37,29 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights + * Reserved. This file contains Original Code and/or Modifications of + * Original Code as defined in and that are subject to the Apple Public + * Source License Version 1.0 (the 'License'). You may not use this file + * except in compliance with the License. Please obtain a copy of the + * License at http://www.apple.com/publicsource and read it before using + * this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License." + * + * @APPLE_LICENSE_HEADER_END@ + */ #if 0 #ifndef lint From owner-p4-projects@FreeBSD.ORG Wed Nov 24 04:42:34 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BF9116A4D0; Wed, 24 Nov 2004 04:42:34 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1104416A4CE for ; Wed, 24 Nov 2004 04:42:34 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1FE243D1D for ; Wed, 24 Nov 2004 04:42:33 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAO4gXU7097087 for ; Wed, 24 Nov 2004 04:42:33 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAO4gX3c097084 for perforce@freebsd.org; Wed, 24 Nov 2004 04:42:33 GMT (envelope-from sam@freebsd.org) Date: Wed, 24 Nov 2004 04:42:33 GMT Message-Id: <200411240442.iAO4gX3c097084@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65762 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 04:42:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=65762 Change 65762 by sam@sam_ebb on 2004/11/24 04:41:39 missing turboG entry Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211.c#12 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211.c#12 (text+ko) ==== @@ -311,6 +311,7 @@ IFM_IEEE80211_11G, IFM_IEEE80211_FH, IFM_IEEE80211_11A | IFM_IEEE80211_TURBO, + IFM_IEEE80211_11G | IFM_IEEE80211_TURBO, }; if ((ic->ic_modecaps & (1< Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 144F216A4D0; Wed, 24 Nov 2004 05:35:39 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA67B16A4CE for ; Wed, 24 Nov 2004 05:35:38 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE4FD43D58 for ; Wed, 24 Nov 2004 05:35:38 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAO5ZcqH005310 for ; Wed, 24 Nov 2004 05:35:38 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAO5ZcBW005307 for perforce@freebsd.org; Wed, 24 Nov 2004 05:35:38 GMT (envelope-from sam@freebsd.org) Date: Wed, 24 Nov 2004 05:35:38 GMT Message-Id: <200411240535.iAO5ZcBW005307@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65764 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 05:35:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=65764 Change 65764 by sam@sam_ebb on 2004/11/24 05:34:45 consolidate printing of information elements Affected files ... .. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#18 edit Differences ... ==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#18 (text+ko) ==== @@ -665,7 +665,55 @@ return maxlen; } +/* unalligned little endian access */ +#define LE_READ_4(p) \ + ((u_int32_t) \ + ((((const u_int8_t *)(p))[0] ) | \ + (((const u_int8_t *)(p))[1] << 8) | \ + (((const u_int8_t *)(p))[2] << 16) | \ + (((const u_int8_t *)(p))[3] << 24))) + +static int __inline +iswpaoui(const u_int8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((WPA_OUI_TYPE<<24)|WPA_OUI); +} + +static int __inline +iswmeoui(const u_int8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((WME_OUI_TYPE<<24)|WME_OUI); +} + +static int __inline +isatherosoui(const u_int8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((ATH_OUI_TYPE<<24)|ATH_OUI); +} + static void +printies(const u_int8_t *vp, int ielen, int maxcols) +{ + for (; ielen > 0; ielen -= 2+vp[1]) + switch (vp[0]) { + case IEEE80211_ELEMID_VENDOR: + if (iswpaoui(vp)) + printie(" WPA", vp, 2+vp[1], maxcols); + else if (iswmeoui(vp)) + printie(" WME", vp, 2+vp[1], maxcols); + else + printie(" VEN", vp, 2+vp[1], maxcols); + break; + case IEEE80211_ELEMID_RSN: + printie(" RSN", vp, 2+vp[1], maxcols); + break; + default: + printie(" ???", vp, 2+vp[1], maxcols); + break; + } +} + +static void list_scan(int s) { uint8_t buf[24*1024]; @@ -711,21 +759,7 @@ , sr->isr_intval , getcaps(sr->isr_capinfo) ); - - if (sr->isr_ie_len > 0) { - vp += sr->isr_ssid_len; - switch (vp[0]) { - case IEEE80211_ELEMID_VENDOR: - if (vp[1] < 2 + 4 || - memcmp(&vp[2], "\x00\x50\xf2\x01", 4) != 0) - break; - printie("WPA", vp, 2+vp[1], 24); - break; - case IEEE80211_ELEMID_RSN: - printie("RSN", vp, 2+vp[1], 24); - break; - } - } + printies(vp + sr->isr_ssid_len, sr->isr_ie_len, 24);; printf("\n"); cp += sr->isr_len, len -= sr->isr_len; } while (len >= sizeof(struct ieee80211req_scan_result)); @@ -775,32 +809,6 @@ list_scan(s); } -/* unalligned little endian access */ -#define LE_READ_4(p) \ - ((u_int32_t) \ - ((((const u_int8_t *)(p))[0] ) | \ - (((const u_int8_t *)(p))[1] << 8) | \ - (((const u_int8_t *)(p))[2] << 16) | \ - (((const u_int8_t *)(p))[3] << 24))) - -static int __inline -iswpaoui(const u_int8_t *frm) -{ - return frm[1] > 3 && LE_READ_4(frm+2) == ((WPA_OUI_TYPE<<24)|WPA_OUI); -} - -static int __inline -iswmeoui(const u_int8_t *frm) -{ - return frm[1] > 3 && LE_READ_4(frm+2) == ((WME_OUI_TYPE<<24)|WME_OUI); -} - -static int __inline -isatherosoui(const u_int8_t *frm) -{ - return frm[1] > 3 && LE_READ_4(frm+2) == ((ATH_OUI_TYPE<<24)|ATH_OUI); -} - static void list_stations(int s) { @@ -836,7 +844,6 @@ do { struct ieee80211req_sta_info *si; uint8_t *vp; - int ielen; si = (struct ieee80211req_sta_info *) cp; vp = (u_int8_t *)(si+1); @@ -852,24 +859,7 @@ , getcaps(si->isi_capinfo) , si->isi_erp ); - - for (ielen = si->isi_ie_len; ielen > 0; ielen -= 2+vp[1]) - switch (vp[0]) { - case IEEE80211_ELEMID_VENDOR: - if (iswpaoui(vp)) - printie(" WPA", vp, 2+vp[1], 24); - else if (iswmeoui(vp)) - printie(" WME", vp, 2+vp[1], 24); - else - printie(" VEN", vp, 2+vp[1], 24); - break; - case IEEE80211_ELEMID_RSN: - printie(" RSN", vp, 2+vp[1], 24); - break; - default: - printie(" ???", vp, 2+vp[1], 24); - break; - } + printies(vp, si->isi_ie_len, 24); printf("\n"); cp += si->isi_len, len -= si->isi_len; } while (len >= sizeof(struct ieee80211req_sta_info)); From owner-p4-projects@FreeBSD.ORG Wed Nov 24 13:51:57 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C8BCF16A4D0; Wed, 24 Nov 2004 13:51:56 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CB0616A4CE for ; Wed, 24 Nov 2004 13:51:56 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E81343D54 for ; Wed, 24 Nov 2004 13:51:56 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAODpuxk037076 for ; Wed, 24 Nov 2004 13:51:56 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAODpuRT037073 for perforce@freebsd.org; Wed, 24 Nov 2004 13:51:56 GMT (envelope-from davidxu@freebsd.org) Date: Wed, 24 Nov 2004 13:51:56 GMT Message-Id: <200411241351.iAODpuRT037073@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 65773 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 13:51:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=65773 Change 65773 by davidxu@davidxu_alona on 2004/11/24 13:50:55 Add a mechanism to record which signal is for proc, but dispatched to the thread. Affected files ... .. //depot/projects/davidxu_thread/src/sys/kern/kern_sig.c#2 edit .. //depot/projects/davidxu_thread/src/sys/sys/proc.h#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/sys/kern/kern_sig.c#2 (text+ko) ==== @@ -217,6 +217,7 @@ SIGSETNAND(set, td->td_sigmask); SIGSETNAND(p->p_siglist, set); SIGSETOR(td->td_siglist, set); + SIGSETOR(td->td_sigproc, set); if (SIGPENDING(td)) { mtx_lock_spin(&sched_lock); @@ -623,6 +624,29 @@ } /* + * Repost signals post to the proc but dispatched to the + * thread, it should only be called when thread is exiting. + */ +void +sigrepost(struct thread *td) +{ + int i; + sigset_t set; + + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + set = td->td_siglist; + SIGSETAND(set, td->td_sigproc); + if (SIGNOTEMPTY(set)) { + for (i = 1; i <= _SIG_MAXSIG; ++i) { + if (SIGISMEMBER(set, i)) { + SIGDELSET(td->td_siglist, i); + psignal(td->td_proc, i); + } + } + } +} + +/* * kern_sigprocmask() * * Manipulate signal mask. @@ -1503,6 +1527,7 @@ } else { PROC_LOCK(p); } + SIGDELSET(td->td_sigproc, sig); ps = p->p_sigacts; mtx_lock(&ps->ps_mtx); if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(ps->ps_sigcatch, sig) && @@ -1763,9 +1788,13 @@ SIGADDSET(*siglist, sig); signotify(td); /* uses schedlock */ - if (siglist == &td->td_siglist && (td->td_waitset != NULL) && - action != SIG_HOLD) { - td->td_waitset = NULL; + if (siglist == &td->td_siglist) { + if (target == SIGTARGET_TD) + SIGDELSET(td->td_sigproc, sig); + else + SIGADDSET(td->td_sigproc, sig); + if ((td->td_waitset != NULL) && action != SIG_HOLD) + td->td_waitset = NULL; } /* @@ -2117,7 +2146,6 @@ stopevent(p, S_SIG, sig); mtx_lock(&ps->ps_mtx); } - /* * We should see pending but ignored signals * only if P_TRACED was on when they were posted. @@ -2142,6 +2170,7 @@ * otherwise we just look for signals again. */ SIGDELSET(td->td_siglist, sig); /* clear old signal */ + if (td->td_pflags & TDP_SA) SIGADDSET(td->td_sigmask, sig); if (newsig == 0) @@ -2160,6 +2189,7 @@ * signal is being masked, look for other signals. */ SIGADDSET(td->td_siglist, sig); + SIGDELSET(td->td_sigproc, sig); if (td->td_pflags & TDP_SA) SIGDELSET(td->td_sigmask, sig); if (SIGISMEMBER(td->td_sigmask, sig)) ==== //depot/projects/davidxu_thread/src/sys/sys/proc.h#2 (text+ko) ==== @@ -281,6 +281,7 @@ sigset_t td_oldsigmask; /* (k) Saved mask from pre sigpause. */ sigset_t td_sigmask; /* (c) Current signal mask. */ sigset_t td_siglist; /* (c) Sigs arrived, not delivered. */ + sigset_t td_sigproc; /* (c) Signals targets proc. */ sigset_t *td_waitset; /* (c) Wait set for sigwait. */ TAILQ_ENTRY(thread) td_umtx; /* (c?) Link for when we're blocked. */ volatile u_int td_generation; /* (k) For detection of preemption */ From owner-p4-projects@FreeBSD.ORG Wed Nov 24 13:52:58 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6AE8F16A4D0; Wed, 24 Nov 2004 13:52:58 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4629116A4CE for ; Wed, 24 Nov 2004 13:52:58 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23F9443D58 for ; Wed, 24 Nov 2004 13:52:58 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAODqwrU037115 for ; Wed, 24 Nov 2004 13:52:58 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAODqvHt037112 for perforce@freebsd.org; Wed, 24 Nov 2004 13:52:57 GMT (envelope-from davidxu@freebsd.org) Date: Wed, 24 Nov 2004 13:52:57 GMT Message-Id: <200411241352.iAODqvHt037112@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 65774 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 13:52:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=65774 Change 65774 by davidxu@davidxu_alona on 2004/11/24 13:52:23 add prototype sigrepost(struct thread *). Affected files ... .. //depot/projects/davidxu_thread/src/sys/sys/signalvar.h#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/sys/sys/signalvar.h#2 (text+ko) ==== @@ -272,6 +272,7 @@ void tdsignal(struct thread *td, int sig, sigtarget_t target); void trapsignal(struct thread *td, int sig, u_long code); int ptracestop(struct thread *td, int sig); +void sigrepost(struct thread *); /* * Machine-dependent functions: From owner-p4-projects@FreeBSD.ORG Wed Nov 24 13:55:01 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E87416A4D0; Wed, 24 Nov 2004 13:55:01 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C55D16A4CE for ; Wed, 24 Nov 2004 13:55:01 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A15943D31 for ; Wed, 24 Nov 2004 13:55:01 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAODt0dU037152 for ; Wed, 24 Nov 2004 13:55:00 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAODt0Qw037139 for perforce@freebsd.org; Wed, 24 Nov 2004 13:55:00 GMT (envelope-from davidxu@freebsd.org) Date: Wed, 24 Nov 2004 13:55:00 GMT Message-Id: <200411241355.iAODt0Qw037139@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 65775 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 13:55:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=65775 Change 65775 by davidxu@davidxu_alona on 2004/11/24 13:54:23 Repost signals to avoid signal lost problem. Affected files ... .. //depot/projects/davidxu_thread/src/sys/kern/kern_thr.c#4 edit Differences ... ==== //depot/projects/davidxu_thread/src/sys/kern/kern_thr.c#4 (text+ko) ==== @@ -197,6 +197,8 @@ suword((void *)uap->state, 1); PROC_LOCK(p); + SIGFILLSET(td->td_siglist); + sigrepost(td); mtx_lock_spin(&sched_lock); /* From owner-p4-projects@FreeBSD.ORG Wed Nov 24 13:59:07 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA66416A4D0; Wed, 24 Nov 2004 13:59:06 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8602016A4CE for ; Wed, 24 Nov 2004 13:59:06 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 791C543D41 for ; Wed, 24 Nov 2004 13:59:06 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAODx6Bi037321 for ; Wed, 24 Nov 2004 13:59:06 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAODx6AN037318 for perforce@freebsd.org; Wed, 24 Nov 2004 13:59:06 GMT (envelope-from davidxu@freebsd.org) Date: Wed, 24 Nov 2004 13:59:06 GMT Message-Id: <200411241359.iAODx6AN037318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 65776 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 13:59:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=65776 Change 65776 by davidxu@davidxu_alona on 2004/11/24 13:58:34 Reduce diff with CURRENT. Affected files ... .. //depot/projects/davidxu_thread/src/sys/kern/kern_sig.c#3 edit Differences ... ==== //depot/projects/davidxu_thread/src/sys/kern/kern_sig.c#3 (text+ko) ==== @@ -2146,6 +2146,7 @@ stopevent(p, S_SIG, sig); mtx_lock(&ps->ps_mtx); } + /* * We should see pending but ignored signals * only if P_TRACED was on when they were posted. @@ -2170,7 +2171,6 @@ * otherwise we just look for signals again. */ SIGDELSET(td->td_siglist, sig); /* clear old signal */ - if (td->td_pflags & TDP_SA) SIGADDSET(td->td_sigmask, sig); if (newsig == 0) From owner-p4-projects@FreeBSD.ORG Wed Nov 24 14:19:33 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3CDC816A4DB; Wed, 24 Nov 2004 14:19:33 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E822A16A4DA for ; Wed, 24 Nov 2004 14:19:32 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85D0943D1F for ; Wed, 24 Nov 2004 14:19:32 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAOEJWBq038304 for ; Wed, 24 Nov 2004 14:19:32 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAOEJV8o038301 for perforce@freebsd.org; Wed, 24 Nov 2004 14:19:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 24 Nov 2004 14:19:31 GMT Message-Id: <200411241419.iAOEJV8o038301@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 65778 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 14:19:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=65778 Change 65778 by rwatson@rwatson_zoo on 2004/11/24 14:18:40 Integrate netperf_socket from FreeBSD CVS: alpha cpuid cleanup. u-area substantially removed. bounce buffer page pools. additional vm locking/clenaup. file descriptor locking chages, fixes -- there's now a sleep lock. select, et al, substantially less giant-centric. conditional acquisition of Giant for the network stack pushed into fo_ioctl, fo_poll, etc. armisms galore. pci link, interrupt, isa magic. bundles of dma cleanups relating to large memory spaces and bounce buffering. if_ed altq. if_hme mpsafe. bufobj becomes argument to vop_vmap, not device node vnode pointer. vnode bypass for device nodes. vnode bypass for fifo nodes. revoke cleanup. de-80386. UP spin lock optimization. interrupt storm detection cleanup. ntp_gettime() system call. many more TCP lock documentation, assertions, some new locking, locking fixes, especially relating to tcp_input(), TCP ISN generation, time wait states. divert socket "connection" clean up (don't connect). many if_sk bug fixes. Parts of MAC support for System V IPC; System V IPC ABI cleanup. Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/genassym.c#3 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/interrupt.c#8 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/machdep.c#10 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/mp_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/alpha/include/param.h#6 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#8 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/genassym.c#5 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#20 integrate .. //depot/projects/netperf_socket/sys/amd64/include/param.h#6 integrate .. //depot/projects/netperf_socket/sys/arm/arm/busdma_machdep.c#6 integrate .. //depot/projects/netperf_socket/sys/arm/arm/db_interface.c#3 integrate .. //depot/projects/netperf_socket/sys/arm/arm/db_trace.c#7 integrate .. //depot/projects/netperf_socket/sys/arm/arm/exception.S#4 integrate .. //depot/projects/netperf_socket/sys/arm/arm/genassym.c#4 integrate .. //depot/projects/netperf_socket/sys/arm/arm/intr.c#5 integrate .. //depot/projects/netperf_socket/sys/arm/arm/pmap.c#12 integrate .. //depot/projects/netperf_socket/sys/arm/arm/swtch.S#5 integrate .. //depot/projects/netperf_socket/sys/arm/arm/trap.c#4 integrate .. //depot/projects/netperf_socket/sys/arm/arm/undefined.c#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/vm_machdep.c#7 integrate .. //depot/projects/netperf_socket/sys/arm/include/cpufunc.h#5 integrate .. //depot/projects/netperf_socket/sys/arm/include/db_machdep.h#3 integrate .. //depot/projects/netperf_socket/sys/arm/include/kdb.h#2 integrate .. //depot/projects/netperf_socket/sys/arm/include/param.h#5 integrate .. //depot/projects/netperf_socket/sys/arm/sa11x0/assabet_machdep.c#6 integrate .. //depot/projects/netperf_socket/sys/arm/xscale/i80321/i80321.c#2 integrate .. //depot/projects/netperf_socket/sys/arm/xscale/i80321/iq31244_machdep.c#4 integrate .. //depot/projects/netperf_socket/sys/arm/xscale/i80321/std.i80321#2 integrate .. //depot/projects/netperf_socket/sys/arm/xscale/i80321/std.iq31244#2 integrate .. //depot/projects/netperf_socket/sys/arm/xscale/i80321/uart_bus_i80321.c#2 integrate .. //depot/projects/netperf_socket/sys/arm/xscale/i80321/uart_cpu_i80321.c#2 integrate .. //depot/projects/netperf_socket/sys/boot/Makefile#5 integrate .. //depot/projects/netperf_socket/sys/boot/common/commands.c#4 integrate .. //depot/projects/netperf_socket/sys/boot/efi/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/boot/efi/libefi/arch/ia64/ldscript.ia64#3 delete .. //depot/projects/netperf_socket/sys/boot/efi/libefi/arch/ia64/start.S#3 delete .. //depot/projects/netperf_socket/sys/boot/efi/loader/Makefile#4 delete .. //depot/projects/netperf_socket/sys/boot/efi/loader/conf.c#2 delete .. //depot/projects/netperf_socket/sys/boot/efi/loader/main.c#4 delete .. //depot/projects/netperf_socket/sys/boot/efi/loader/version#2 delete .. //depot/projects/netperf_socket/sys/boot/ia64/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/boot/ia64/efi/Makefile#1 branch .. //depot/projects/netperf_socket/sys/boot/ia64/efi/conf.c#1 branch .. //depot/projects/netperf_socket/sys/boot/ia64/efi/ldscript.ia64#1 branch .. //depot/projects/netperf_socket/sys/boot/ia64/efi/main.c#1 branch .. //depot/projects/netperf_socket/sys/boot/ia64/efi/start.S#1 branch .. //depot/projects/netperf_socket/sys/boot/ia64/efi/version#1 branch .. //depot/projects/netperf_socket/sys/cam/cam_xpt.c#7 integrate .. //depot/projects/netperf_socket/sys/coda/coda_vnops.c#4 integrate .. //depot/projects/netperf_socket/sys/compat/freebsd32/freebsd32_proto.h#10 integrate .. //depot/projects/netperf_socket/sys/compat/freebsd32/freebsd32_syscall.h#10 integrate .. //depot/projects/netperf_socket/sys/compat/freebsd32/freebsd32_syscalls.c#10 integrate .. //depot/projects/netperf_socket/sys/compat/freebsd32/freebsd32_sysent.c#10 integrate .. //depot/projects/netperf_socket/sys/compat/freebsd32/syscalls.master#9 integrate .. //depot/projects/netperf_socket/sys/compat/pecoff/imgact_pecoff.c#3 integrate .. //depot/projects/netperf_socket/sys/compat/svr4/svr4_filio.c#4 integrate .. //depot/projects/netperf_socket/sys/compat/svr4/svr4_misc.c#5 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#46 integrate .. //depot/projects/netperf_socket/sys/conf/files#57 integrate .. //depot/projects/netperf_socket/sys/conf/files.alpha#8 integrate .. //depot/projects/netperf_socket/sys/conf/files.amd64#18 integrate .. //depot/projects/netperf_socket/sys/conf/files.arm#2 integrate .. //depot/projects/netperf_socket/sys/conf/files.i386#31 integrate .. //depot/projects/netperf_socket/sys/conf/files.ia64#9 integrate .. //depot/projects/netperf_socket/sys/conf/files.pc98#17 integrate .. //depot/projects/netperf_socket/sys/conf/files.sparc64#13 integrate .. //depot/projects/netperf_socket/sys/conf/kern.post.mk#11 integrate .. //depot/projects/netperf_socket/sys/conf/kmod.mk#18 integrate .. //depot/projects/netperf_socket/sys/conf/options.i386#7 integrate .. //depot/projects/netperf_socket/sys/conf/options.pc98#9 integrate .. //depot/projects/netperf_socket/sys/contrib/pf/net/pf.c#17 integrate .. //depot/projects/netperf_socket/sys/crypto/blowfish/arch/i386/bf_enc.S#2 integrate .. //depot/projects/netperf_socket/sys/ddb/db_command.c#6 integrate .. //depot/projects/netperf_socket/sys/ddb/db_ps.c#7 integrate .. //depot/projects/netperf_socket/sys/ddb/db_run.c#3 integrate .. //depot/projects/netperf_socket/sys/ddb/db_thread.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/aac/aac.c#12 integrate .. //depot/projects/netperf_socket/sys/dev/acpi_support/acpi_asus.c#1 branch .. //depot/projects/netperf_socket/sys/dev/acpi_support/acpi_panasonic.c#1 branch .. //depot/projects/netperf_socket/sys/dev/acpi_support/acpi_sony.c#1 branch .. //depot/projects/netperf_socket/sys/dev/acpi_support/acpi_toshiba.c#1 branch .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_cpu.c#14 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#15 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib_acpi.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib_pci.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcibvar.h#3 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_snc.c#2 delete .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.h#7 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic7xxx.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic_osm_lib.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-all.c#22 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-dma.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-lowlevel.c#19 integrate .. //depot/projects/netperf_socket/sys/dev/bge/if_bge.c#14 integrate .. //depot/projects/netperf_socket/sys/dev/ed/if_ed.c#11 integrate .. //depot/projects/netperf_socket/sys/dev/fdc/fdc.c#15 integrate .. //depot/projects/netperf_socket/sys/dev/fxp/if_fxp.c#14 integrate .. //depot/projects/netperf_socket/sys/dev/hme/if_hme.c#12 integrate .. //depot/projects/netperf_socket/sys/dev/hme/if_hme_pci.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/hme/if_hme_sbus.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/hme/if_hmevar.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/ic/ns16550.h#3 integrate .. //depot/projects/netperf_socket/sys/dev/ic/sab82532.h#1 branch .. //depot/projects/netperf_socket/sys/dev/ic/z8530.h#1 branch .. //depot/projects/netperf_socket/sys/dev/mc146818/mc146818.c#1 branch .. //depot/projects/netperf_socket/sys/dev/mc146818/mc146818reg.h#1 branch .. //depot/projects/netperf_socket/sys/dev/mc146818/mc146818var.h#1 branch .. //depot/projects/netperf_socket/sys/dev/mk48txx/mk48txx.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/mk48txx/mk48txxreg.h#3 integrate .. //depot/projects/netperf_socket/sys/dev/mk48txx/mk48txxvar.h#1 branch .. //depot/projects/netperf_socket/sys/dev/puc/puc_sbus.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/streams/streams.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_bus.h#5 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_bus_isa.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_core.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_alpha.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_amd64.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_i386.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_ia64.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_pc98.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_sparc64.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_i8251.c#3 delete .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_i8251.h#2 delete .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_ns8250.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_ns8250.h#2 delete .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_sab82532.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_sab82532.h#2 delete .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_z8530.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/uart/uart_dev_z8530.h#2 delete .. //depot/projects/netperf_socket/sys/dev/uart/uart_subr.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/usb/ehci.c#12 integrate .. //depot/projects/netperf_socket/sys/dev/usb/ohci.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/usb/uhci.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/vkbd/vkbd.c#1 branch .. //depot/projects/netperf_socket/sys/dev/vkbd/vkbd_var.h#1 branch .. //depot/projects/netperf_socket/sys/fs/deadfs/dead_vnops.c#3 integrate .. //depot/projects/netperf_socket/sys/fs/devfs/devfs_vnops.c#9 integrate .. //depot/projects/netperf_socket/sys/fs/fdescfs/fdesc_vfsops.c#8 integrate .. //depot/projects/netperf_socket/sys/fs/fdescfs/fdesc_vnops.c#3 integrate .. //depot/projects/netperf_socket/sys/fs/fifofs/fifo_vnops.c#13 integrate .. //depot/projects/netperf_socket/sys/fs/hpfs/hpfs_vnops.c#5 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfs_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/ntfs/ntfs_vnops.c#4 integrate .. //depot/projects/netperf_socket/sys/fs/udf/udf_vnops.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/unionfs/union_subr.c#4 integrate .. //depot/projects/netperf_socket/sys/fs/unionfs/union_vfsops.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/unionfs/union_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/geom/gate/g_gate.c#10 integrate .. //depot/projects/netperf_socket/sys/geom/uzip/g_uzip.c#4 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum.h#5 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_raid5.c#7 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_share.c#4 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_share.h#2 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_subr.c#8 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_bmap.c#4 integrate .. //depot/projects/netperf_socket/sys/i386/acpica/acpi_asus.c#12 delete .. //depot/projects/netperf_socket/sys/i386/acpica/acpi_panasonic.c#6 delete .. //depot/projects/netperf_socket/sys/i386/acpica/acpi_toshiba.c#11 delete .. //depot/projects/netperf_socket/sys/i386/conf/NOTES#31 integrate .. //depot/projects/netperf_socket/sys/i386/i386/busdma_machdep.c#8 integrate .. //depot/projects/netperf_socket/sys/i386/i386/genassym.c#4 integrate .. //depot/projects/netperf_socket/sys/i386/i386/identcpu.c#8 integrate .. //depot/projects/netperf_socket/sys/i386/i386/locore.s#4 integrate .. //depot/projects/netperf_socket/sys/i386/i386/machdep.c#15 integrate .. //depot/projects/netperf_socket/sys/i386/i386/mp_machdep.c#12 integrate .. //depot/projects/netperf_socket/sys/i386/i386/pmap.c#31 integrate .. //depot/projects/netperf_socket/sys/i386/i386/support.s#5 integrate .. //depot/projects/netperf_socket/sys/i386/i386/trap.c#8 integrate .. //depot/projects/netperf_socket/sys/i386/include/atomic.h#4 integrate .. //depot/projects/netperf_socket/sys/i386/include/cpu.h#6 integrate .. //depot/projects/netperf_socket/sys/i386/include/endian.h#4 integrate .. //depot/projects/netperf_socket/sys/i386/include/param.h#7 integrate .. //depot/projects/netperf_socket/sys/i386/linux/linux_sysvec.c#4 integrate .. //depot/projects/netperf_socket/sys/ia64/conf/GENERIC.hints#3 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/genassym.c#4 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/machdep.c#13 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/pmap.c#20 integrate .. //depot/projects/netperf_socket/sys/ia64/include/param.h#3 integrate .. //depot/projects/netperf_socket/sys/ia64/include/pte.h#4 integrate .. //depot/projects/netperf_socket/sys/isofs/cd9660/cd9660_bmap.c#4 integrate .. //depot/projects/netperf_socket/sys/kern/imgact_aout.c#4 integrate .. //depot/projects/netperf_socket/sys/kern/init_main.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/init_sysent.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/kern_descrip.c#22 integrate .. //depot/projects/netperf_socket/sys/kern/kern_event.c#15 integrate .. //depot/projects/netperf_socket/sys/kern/kern_exec.c#19 integrate .. //depot/projects/netperf_socket/sys/kern/kern_fork.c#21 integrate .. //depot/projects/netperf_socket/sys/kern/kern_intr.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/kern_kse.c#16 integrate .. //depot/projects/netperf_socket/sys/kern/kern_ntptime.c#4 integrate .. //depot/projects/netperf_socket/sys/kern/kern_proc.c#19 integrate .. //depot/projects/netperf_socket/sys/kern/kern_sig.c#23 integrate .. //depot/projects/netperf_socket/sys/kern/kern_switch.c#18 integrate .. //depot/projects/netperf_socket/sys/kern/kern_thr.c#15 integrate .. //depot/projects/netperf_socket/sys/kern/kern_thread.c#30 integrate .. //depot/projects/netperf_socket/sys/kern/sys_generic.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/sys_pipe.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/sys_socket.c#11 integrate .. //depot/projects/netperf_socket/sys/kern/syscalls.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/syscalls.master#13 integrate .. //depot/projects/netperf_socket/sys/kern/tty.c#19 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_syscalls.c#30 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_bio.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_cluster.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_default.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_mount.c#18 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_subr.c#28 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_syscalls.c#16 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_vnops.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/vnode_if.src#5 integrate .. //depot/projects/netperf_socket/sys/modules/Makefile#24 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/Makefile#6 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_asus/Makefile#4 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_panasonic/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_snc/Makefile#2 delete .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_sony/Makefile#1 branch .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_toshiba/Makefile#4 integrate .. //depot/projects/netperf_socket/sys/modules/sio/Makefile#4 integrate .. //depot/projects/netperf_socket/sys/modules/uart/Makefile#7 integrate .. //depot/projects/netperf_socket/sys/modules/vkbd/Makefile#1 branch .. //depot/projects/netperf_socket/sys/net/if.c#24 integrate .. //depot/projects/netperf_socket/sys/net/if.h#10 integrate .. //depot/projects/netperf_socket/sys/netgraph/atm/sscop/ng_sscop_cust.h#3 integrate .. //depot/projects/netperf_socket/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#5 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_cisco.c#5 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_iface.c#8 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_one2many.c#5 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_one2many.h#3 integrate .. //depot/projects/netperf_socket/sys/netinet/in.c#7 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_divert.c#18 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_fsm.h#3 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_input.c#22 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_subr.c#25 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_timer.c#6 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_bio.c#13 integrate .. //depot/projects/netperf_socket/sys/opencrypto/cryptodev.c#7 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/GENERIC#18 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/NOTES#19 integrate .. //depot/projects/netperf_socket/sys/pc98/i386/machdep.c#13 integrate .. //depot/projects/netperf_socket/sys/pci/if_sf.c#11 integrate .. //depot/projects/netperf_socket/sys/pci/if_sfreg.h#3 integrate .. //depot/projects/netperf_socket/sys/pci/if_sk.c#14 integrate .. //depot/projects/netperf_socket/sys/pci/if_skreg.h#5 integrate .. //depot/projects/netperf_socket/sys/powerpc/include/param.h#4 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/genassym.c#6 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/machdep.c#8 integrate .. //depot/projects/netperf_socket/sys/security/mac/mac_sysv_msg.c#1 branch .. //depot/projects/netperf_socket/sys/security/mac/mac_sysv_sem.c#1 branch .. //depot/projects/netperf_socket/sys/security/mac/mac_sysv_shm.c#1 branch .. //depot/projects/netperf_socket/sys/sparc64/conf/GENERIC#15 integrate .. //depot/projects/netperf_socket/sys/sparc64/conf/NOTES#9 integrate .. //depot/projects/netperf_socket/sys/sparc64/include/eeprom.h#4 integrate .. //depot/projects/netperf_socket/sys/sparc64/include/param.h#2 integrate .. //depot/projects/netperf_socket/sys/sparc64/isa/isa.c#5 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/eeprom.c#4 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/eeprom_ebus.c#6 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/eeprom_sbus.c#6 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/genassym.c#3 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/machdep.c#10 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/rtc.c#1 branch .. //depot/projects/netperf_socket/sys/sys/buf.h#8 integrate .. //depot/projects/netperf_socket/sys/sys/filedesc.h#6 integrate .. //depot/projects/netperf_socket/sys/sys/mac.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/mac_policy.h#8 integrate .. //depot/projects/netperf_socket/sys/sys/msg.h#3 integrate .. //depot/projects/netperf_socket/sys/sys/proc.h#30 integrate .. //depot/projects/netperf_socket/sys/sys/sem.h#3 integrate .. //depot/projects/netperf_socket/sys/sys/shm.h#3 integrate .. //depot/projects/netperf_socket/sys/sys/syscall.h#13 integrate .. //depot/projects/netperf_socket/sys/sys/syscall.mk#13 integrate .. //depot/projects/netperf_socket/sys/sys/sysproto.h#13 integrate .. //depot/projects/netperf_socket/sys/sys/systm.h#13 integrate .. //depot/projects/netperf_socket/sys/sys/user.h#10 integrate .. //depot/projects/netperf_socket/sys/sys/vnode.h#14 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_vfsops.c#14 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_vnops.c#10 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_bmap.c#4 integrate .. //depot/projects/netperf_socket/sys/vm/swap_pager.c#12 integrate .. //depot/projects/netperf_socket/sys/vm/vm_extern.h#8 integrate .. //depot/projects/netperf_socket/sys/vm/vm_glue.c#16 integrate .. //depot/projects/netperf_socket/sys/vm/vm_pageout.h#3 integrate .. //depot/projects/netperf_socket/sys/vm/vm_pager.c#6 integrate .. //depot/projects/netperf_socket/sys/vm/vnode_pager.c#9 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/genassym.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/genassym.c,v 1.44 2004/04/05 21:00:49 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/genassym.c,v 1.45 2004/11/20 02:28:14 das Exp $"); #include #include @@ -52,12 +52,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include ==== //depot/projects/netperf_socket/sys/alpha/alpha/interrupt.c#8 (text+ko) ==== @@ -33,7 +33,7 @@ #include /* 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.82 2004/07/20 06:32:32 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.83 2004/11/23 22:11:53 jhb Exp $"); #include #include @@ -474,7 +474,7 @@ /* * Only one processor drives the actual timer. */ - if (PCPU_GET(cpuid) == boot_cpu_id) { + if (PCPU_GET(cpuid) == 0) { #endif (*platform.clockintr)(framep); /* divide hz (1024) by 8 to get stathz (128) */ ==== //depot/projects/netperf_socket/sys/alpha/alpha/machdep.c#10 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.224 2004/11/05 19:16:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.225 2004/11/20 02:29:36 das Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -160,7 +160,6 @@ struct mtx icu_lock; -struct user *proc0uarea; vm_offset_t proc0kstack; char machine[] = "alpha"; @@ -848,11 +847,9 @@ proc_linkup(&proc0, &ksegrp0, &thread0); /* - * Init mapping for u page(s) for proc 0 + * Init mapping for kernel stack for proc 0 */ - proc0uarea = (struct user *)pmap_steal_memory(UAREA_PAGES * PAGE_SIZE); proc0kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE); - proc0.p_uarea = proc0uarea; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; @@ -861,7 +858,6 @@ * Setup the per-CPU data for the bootstrap cpu. */ { - /* This is not a 'struct user' */ size_t sz = round_page(KSTACK_PAGES * PAGE_SIZE); pcpup = (struct pcpu *) pmap_steal_memory(sz); pcpu_init(pcpup, 0, sz); ==== //depot/projects/netperf_socket/sys/alpha/alpha/mp_machdep.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.53 2004/11/05 19:16:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.54 2004/11/20 02:29:36 das Exp $"); #include "opt_kstack_pages.h" @@ -233,7 +233,7 @@ if (bootverbose) printf("smp_start_secondary: starting cpu %d\n", pal_id); - sz = round_page((UAREA_PAGES + KSTACK_PAGES) * PAGE_SIZE); + sz = KSTACK_PAGES * PAGE_SIZE; pcpu = malloc(sz, M_TEMP, M_NOWAIT); if (!pcpu) { printf("smp_start_secondary: can't allocate memory\n"); ==== //depot/projects/netperf_socket/sys/alpha/include/param.h#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/param.h,v 1.36 2004/09/02 18:59:14 scottl Exp $ */ +/* $FreeBSD: src/sys/alpha/include/param.h,v 1.37 2004/11/20 02:29:49 das Exp $ */ /* From: NetBSD: param.h,v 1.20 1997/09/19 13:52:53 leo Exp */ /* @@ -117,7 +117,6 @@ #define KSTACK_PAGES 2 /* pages of kstack (with pcb) */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ -#define UAREA_PAGES 1 /* pages of u-area */ /* ==== //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.60 2004/11/10 03:49:24 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.63 2004/11/21 06:28:09 scottl Exp $"); #include #include @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -87,6 +86,7 @@ struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; + int total_bpages; int free_bpages; int reserved_bpages; int active_bpages; @@ -128,15 +128,14 @@ static struct bus_dmamap nobounce_dmamap; static void init_bounce_pages(void *dummy); -static struct bounce_zone * alloc_bounce_zone(bus_dma_tag_t dmat); +static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); -static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, - bus_size_t len); +static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); /* * Return true if a match is made. @@ -147,18 +146,15 @@ * to check for a match, if there is no filter callback then assume a match. */ static __inline int -run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t len) +run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) { - bus_size_t bndy; int retval; retval = 0; - bndy = dmat->boundary; do { if (((paddr > dmat->lowaddr && paddr <= dmat->highaddr) - || ((paddr & (dmat->alignment - 1)) != 0) - || ((paddr & bndy) != ((paddr + len) & bndy))) + || ((paddr & (dmat->alignment - 1)) != 0)) && (dmat->filter == NULL || (*dmat->filter)(dmat->filterarg, paddr) != 0)) retval = 1; @@ -204,7 +200,8 @@ panic("driver error: busdma dflt_lock called"); } -#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 +#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 /* * Allocate a device specific dma_tag. */ @@ -278,11 +275,21 @@ if (newtag->parent != NULL) atomic_add_int(&parent->ref_count, 1); } - - if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) && + + if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) + || newtag->alignment > 1 || newtag->boundary > 0) + newtag->flags |= BUS_DMA_COULD_BOUNCE; + + if (((newtag->flags & BUS_DMA_COULD_BOUNCE) != 0) && (flags & BUS_DMA_ALLOCNOW) != 0) { + struct bounce_zone *bz; + /* Must bounce */ + if ((error = alloc_bounce_zone(newtag)) != 0) + return (error); + bz = newtag->bounce_zone; + if (lowaddr > bounce_lowaddr) { /* * Go through the pool and kill any pages @@ -291,10 +298,10 @@ panic("bus_dma_tag_create: page reallocation " "not implemented"); } - if (ptoa(total_bpages) < maxsize) { + if (ptoa(bz->total_bpages) < maxsize) { int pages; - pages = atop(maxsize) - total_bpages; + pages = atop(maxsize) - bz->total_bpages; /* Add pages to our bounce pool */ if (alloc_bounce_pages(newtag, pages) < pages) @@ -382,12 +389,16 @@ * exclusion region, a data alignment that is stricter than 1, and/or * an active address boundary. */ - if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) - || dmat->alignment > 1 || dmat->boundary > 0) { + if (dmat->flags & BUS_DMA_COULD_BOUNCE) { /* Must bounce */ int maxpages; + if (dmat->bounce_zone == NULL) { + if ((error = alloc_bounce_zone(dmat)) != 0) + return (error); + } + *mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF, M_NOWAIT | M_ZERO); if (*mapp == NULL) { @@ -568,8 +579,7 @@ map = &nobounce_dmamap; if ((map != &nobounce_dmamap && map->pagesneeded == 0) - && (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) - || dmat->boundary > 0 || dmat->alignment > 1)) { + && ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0)) { vm_offset_t vendaddr; CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " @@ -586,7 +596,7 @@ while (vaddr < vendaddr) { paddr = pmap_kextract(vaddr); - if (run_filter(dmat, paddr, 0) != 0) { + if (run_filter(dmat, paddr) != 0) { needbounce = 1; map->pagesneeded++; } @@ -647,7 +657,7 @@ sgsize = (baddr - curaddr); } - if (map->pagesneeded != 0 && run_filter(dmat, curaddr, sgsize)) + if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) curaddr = add_bounce_page(dmat, map, vaddr, sgsize); /* @@ -902,14 +912,24 @@ return (bz->sysctl_tree_top); } -static struct bounce_zone * +static int alloc_bounce_zone(bus_dma_tag_t dmat) { struct bounce_zone *bz; + /* Check to see if we already have a suitable zone */ + STAILQ_FOREACH(bz, &bounce_zone_list, links) { + if ((dmat->alignment <= bz->alignment) + && (dmat->boundary <= bz->boundary) + && (dmat->lowaddr >= bz->lowaddr)) { + dmat->bounce_zone = bz; + return (0); + } + } + if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) - return (NULL); + return (ENOMEM); STAILQ_INIT(&bz->bounce_page_list); bz->free_bpages = 0; @@ -922,6 +942,7 @@ busdma_zonecount++; snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); STAILQ_INSERT_TAIL(&bounce_zone_list, bz, links); + dmat->bounce_zone = bz; sysctl_ctx_init(&bz->sysctl_tree); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, @@ -929,11 +950,15 @@ CTLFLAG_RD, 0, ""); if (bz->sysctl_tree_top == NULL) { sysctl_ctx_free(&bz->sysctl_tree); - return (bz); + return (0); /* XXX error code? */ } SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "total_bpages", CTLFLAG_RD, &bz->total_bpages, 0, + "Totoal bounce pages"); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "free_bpages", CTLFLAG_RD, &bz->free_bpages, 0, "Free bounce pages"); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), @@ -962,7 +987,7 @@ SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "boundary", CTLFLAG_RD, &bz->boundary, 0, ""); - return (bz); + return (0); } static int @@ -972,21 +997,6 @@ int count; bz = dmat->bounce_zone; - if (bz == NULL) { - STAILQ_FOREACH(bz, &bounce_zone_list, links) { - if ((dmat->alignment <= bz->alignment) - && (dmat->boundary <= bz->boundary) - && (dmat->lowaddr >= bz->lowaddr)) - break; - } - - if (bz == NULL) { - if ((bz = alloc_bounce_zone(dmat)) == NULL) - return (ENOMEM); - } - dmat->bounce_zone = bz; - } - count = 0; while (numpages > 0) { struct bounce_page *bpage; @@ -1009,6 +1019,7 @@ mtx_lock(&bounce_lock); STAILQ_INSERT_TAIL(&bz->bounce_page_list, bpage, links); total_bpages++; + bz->total_bpages++; bz->free_bpages++; mtx_unlock(&bounce_lock); count++; ==== //depot/projects/netperf_socket/sys/amd64/amd64/genassym.c#5 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.154 2004/05/16 22:43:57 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.155 2004/11/20 02:30:59 das Exp $"); #include "opt_compat.h" #include "opt_kstack_pages.h" @@ -50,14 +50,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -67,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -76,7 +75,6 @@ ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); ASSYM(P_SFLAG, offsetof(struct proc, p_sflag)); -ASSYM(P_UAREA, offsetof(struct proc, p_uarea)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); @@ -88,7 +86,6 @@ ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); -ASSYM(UAREA_PAGES, UAREA_PAGES); ASSYM(KSTACK_PAGES, KSTACK_PAGES); ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(NPTEPG, NPTEPG); ==== //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#20 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.622 2004/10/28 12:16:03 simokawa Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.623 2004/11/20 02:29:23 das Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1114,9 +1114,6 @@ #error "have you forgotten the isa device?"; #endif - proc0.p_uarea = (struct user *)(physfree + KERNBASE); - bzero(proc0.p_uarea, UAREA_PAGES * PAGE_SIZE); - physfree += UAREA_PAGES * PAGE_SIZE; thread0.td_kstack = physfree + KERNBASE; bzero((void *)thread0.td_kstack, KSTACK_PAGES * PAGE_SIZE); physfree += KSTACK_PAGES * PAGE_SIZE; ==== //depot/projects/netperf_socket/sys/amd64/include/param.h#6 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/amd64/include/param.h,v 1.14 2004/09/02 18:59:14 scottl Exp $ + * $FreeBSD: src/sys/amd64/include/param.h,v 1.15 2004/11/20 02:29:49 das Exp $ */ /* @@ -125,7 +125,6 @@ #define KSTACK_PAGES 4 /* pages of kstack (with pcb) */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ -#define UAREA_PAGES 1 /* holds struct user WITHOUT PCB (see def.) */ /* ==== //depot/projects/netperf_socket/sys/arm/arm/busdma_machdep.c#6 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.5 2004/10/21 11:59:33 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.7 2004/11/16 00:57:44 cognet Exp $"); /* * MacPPC bus dma support routines @@ -97,11 +97,10 @@ * Check to see if the specified page is in an allowed DMA range. */ -static int +static __inline int bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t segs[], - bus_dmamap_t map, void *buf, bus_size_t buflen, struct thread *td, - int flags, vm_offset_t *lastaddrp, int *segp, - int first); + bus_dmamap_t map, void *buf, bus_size_t buflen, struct pmap *pmap, + int flags, vm_offset_t *lastaddrp, int *segp); static __inline struct arm32_dma_range * _bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, @@ -367,7 +366,7 @@ void *callback_arg, int flags) { vm_offset_t lastaddr = 0; - int error, nsegs = 0; + int error, nsegs = -1; #ifdef __GNUC__ bus_dma_segment_t dm_segments[dmat->nsegments]; #else @@ -379,8 +378,8 @@ map->buffer = buf; map->len = buflen; error = bus_dmamap_load_buffer(dmat, - dm_segments, map, buf, buflen, NULL, - flags, &lastaddr, &nsegs, 1); + dm_segments, map, buf, buflen, kernel_pmap, + flags, &lastaddr, &nsegs); if (error) (*callback)(callback_arg, NULL, 0, error); else @@ -395,27 +394,20 @@ * the starting segment on entrance, and the ending segment on exit. * first indicates if this is the first invocation of this function. */ -static int +static int __inline bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t segs[], - bus_dmamap_t map, void *buf, bus_size_t buflen, struct thread *td, - int flags, vm_offset_t *lastaddrp, int *segp, - int first) + bus_dmamap_t map, void *buf, bus_size_t buflen, struct pmap *pmap, + int flags, vm_offset_t *lastaddrp, int *segp) { bus_size_t sgsize; bus_addr_t curaddr, lastaddr, baddr, bmask; vm_offset_t vaddr = (vm_offset_t)buf; int seg; int error = 0; - pmap_t pmap; pd_entry_t *pde; pt_entry_t pte; pt_entry_t *ptep; - if (td != NULL) - pmap = vmspace_pmap(td->td_proc->p_vmspace); - else - pmap = pmap_kernel(); - lastaddr = *lastaddrp; bmask = ~(dmat->boundary - 1); @@ -496,27 +488,19 @@ * Insert chunk into a segment, coalescing with * the previous segment if possible. */ - if (first) { + if (seg >= 0 && curaddr == lastaddr && + (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && + (dmat->boundary == 0 || + (segs[seg].ds_addr & bmask) == + (curaddr & bmask))) { + segs[seg].ds_len += sgsize; + goto segdone; + } else { + if (++seg >= dmat->nsegments) + break; segs[seg].ds_addr = curaddr; segs[seg].ds_len = sgsize; - first = 0; - } else { - if (curaddr == lastaddr && - (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && - (dmat->boundary == 0 || - (segs[seg].ds_addr & bmask) == - (curaddr & bmask))) { - segs[seg].ds_len += sgsize; - goto segdone; - } - else { - if (++seg >= dmat->nsegments) - break; - segs[seg].ds_addr = curaddr; - segs[seg].ds_len = sgsize; - } } - if (error) break; segdone: @@ -549,7 +533,7 @@ #else bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; #endif - int nsegs = 0, error = 0; + int nsegs = -1, error = 0; M_ASSERTPKTHDR(m0); @@ -557,17 +541,14 @@ map->flags |= DMAMAP_MBUF | DMAMAP_COHERENT; map->buffer = m0; if (m0->m_pkthdr.len <= dmat->maxsize) { - int first = 1; vm_offset_t lastaddr = 0; struct mbuf *m; for (m = m0; m != NULL && error == 0; m = m->m_next) { - if (m->m_len > 0) { + if (m->m_len > 0) error = bus_dmamap_load_buffer(dmat, - dm_segments, map, m->m_data, m->m_len, NULL, - flags, &lastaddr, &nsegs, first); - first = 0; - } + dm_segments, map, m->m_data, m->m_len, + pmap_kernel(), flags, &lastaddr, &nsegs); } } else { error = EINVAL; @@ -599,10 +580,10 @@ #else bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; #endif - int nsegs, i, error, first; + int nsegs, i, error; bus_size_t resid; struct iovec *iov; - struct thread *td = NULL; + struct pmap *pmap; resid = uio->uio_resid; iov = uio->uio_iov; @@ -611,13 +592,14 @@ map->buffer = uio; if (uio->uio_segflg == UIO_USERSPACE) { - td = uio->uio_td; + pmap = vmspace_pmap(uio->uio_td->td_proc->p_vmspace); KASSERT(td != NULL, ("bus_dmamap_load_uio: USERSPACE but no proc")); - } + } else + pmap = kernel_pmap; - first = 1; - nsegs = error = 0; + error = 0; + nsegs = -1; for (i = 0; i < uio->uio_iovcnt && resid != 0 && !error; i++) { /* * Now at the first iovec to load. Load each iovec @@ -629,9 +611,7 @@ if (minlen > 0) { error = bus_dmamap_load_buffer(dmat, dm_segments, map, - addr, minlen, td, flags, &lastaddr, &nsegs, first); - - first = 0; + addr, minlen, pmap, flags, &lastaddr, &nsegs); resid -= minlen; } ==== //depot/projects/netperf_socket/sys/arm/arm/db_interface.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.2 2004/07/12 21:25:01 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.3 2004/11/21 18:11:39 cognet Exp $"); #include "opt_ddb.h" #include @@ -43,6 +43,9 @@ #include #include /* just for boothowto */ #include +#ifdef KDB >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Nov 24 15:58:38 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AF9216A4D0; Wed, 24 Nov 2004 15:58:37 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4446816A4CE for ; Wed, 24 Nov 2004 15:58:37 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FFBF43D1D for ; Wed, 24 Nov 2004 15:58:37 +0000 (GMT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAOFwbNK041792 for ; Wed, 24 Nov 2004 15:58:37 GMT (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAOFwaaJ041789 for perforce@freebsd.org; Wed, 24 Nov 2004 15:58:36 GMT (envelope-from areisse@nailabs.com) Date: Wed, 24 Nov 2004 15:58:36 GMT Message-Id: <200411241558.iAOFwaaJ041789@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 65787 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 15:58:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=65787 Change 65787 by areisse@areisse_tislabs on 2004/11/24 15:58:17 Begin merging checkpolicy changes from selinux version 2004081908. Affected files ... .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#7 integrate .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.h#3 integrate .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/genpolusers.c#1 branch .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/policy_parse.y#4 integrate .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/policy_scan.l#3 integrate .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/users.l#1 branch .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/users.y#1 branch .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/write.c#2 integrate Differences ... ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#7 (text+ko) ==== @@ -1,10 +1,21 @@ /* - * Author : Stephen Smalley (NAI Labs), + * Author : Stephen Smalley, + */ + +/* Updated: Karl MacMillan + * + * Added conditional policy language extensions + * + * Updated: James Morris + * + * Added IPv6 support. * - * The policy compiler was originally written while I was employed by NSA, - * but I have implemented a number of extensions and revisions since - * joining NAI Labs. + * Copyright (C) 2003 - 2004 Tresys Technology, LLC + * Copyright (C) 2003 Red Hat, Inc., James Morris + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2. */ /* FLASK */ @@ -27,6 +38,11 @@ * If '-d' is specified, then checkpolicy permits the user * to interactively test the security server functions with * the loaded policy configuration. + * + * If '-c' is specified, then the supplied parameter is used to + * determine which policy version to use for generating binary + * policy. This is for compatibility with older kernels. If any + * booleans or conditional rules are thrown away a warning is printed. */ #ifdef __FreeBSD__ @@ -59,6 +75,8 @@ extern queue_t id_queue; extern unsigned int policydb_errors; extern unsigned long policydb_lineno; +extern unsigned long source_lineno; +extern char source_file[]; extern unsigned int pass; extern FILE *yyin; @@ -68,6 +86,7 @@ char *txtfile = "policy.conf"; char *binfile = "policy"; +unsigned int policyvers = POLICYDB_VERSION_MAX; int selinux_enforcing = 1; int avc_ss_reset(__u32 seqno) @@ -77,15 +96,16 @@ void usage(char *progname) { - printf("usage: %s [-b] [-d] [-o output_file] [input_file]\n", progname); + printf("usage: %s [-b] [-d] [-c policyvers (%d-%d)] [-o output_file] [input_file]\n", + progname, POLICYDB_VERSION_MIN, POLICYDB_VERSION_MAX); exit(1); } static int print_sid(security_id_t sid, - context_struct_t * context, void *data) + context_struct_t * context __attribute__ ((unused)), void *data __attribute__ ((unused))) { security_context_t scontext; - unsigned int scontext_len; + size_t scontext_len; int rc; rc = security_sid_to_context(sid, &scontext, &scontext_len); @@ -112,7 +132,7 @@ return 0; } -static int type_attr_remove(hashtab_key_t key, hashtab_datum_t datum, void *p) +static int type_attr_remove(hashtab_key_t key __attribute__ ((unused)), hashtab_datum_t datum, void *p __attribute__ ((unused))) { type_datum_t *typdatum; @@ -249,14 +269,49 @@ } #endif -extern char *av_to_string(__u32 tclass, access_vector_t av); +static void cond_check_type_rules_list(cond_av_list_t *list) +{ + cond_av_list_t *cur = list; + + while (cur) { + if (cur->node->datum.specified & AVTAB_TYPE) { + if (avtab_search(&policydbp->te_avtab, &cur->node->key, AVTAB_TYPE)) { + fprintf(stderr, "conditional type rule for (%s, %s : %s) conflicts with entry in base policy; " + "conditional rule discarded.\n", policydbp->p_type_val_to_name[cur->node->key.source_type-1], + policydbp->p_type_val_to_name[cur->node->key.target_type-1], + policydbp->p_class_val_to_name[cur->node->key.target_class-1]); + cur->node->parse_context = (void*)0; + } else { + cur->node->parse_context = (void*)1; + } + } else { + cur->node->parse_context = (void*)1; + } + cur = cur->next; + } +} + +/* check for duplicate type rules - this has to be done after all of + * the parsing is finished because the conditional and base type rules + * are collected in the same pass */ +static void cond_check_type_rules(void) +{ + cond_list_t *node; + + for (node = policydbp->cond_list; node != NULL; node = node->next) { + cond_check_type_rules_list(node->true_list); + cond_check_type_rules_list(node->false_list); + } +} + +extern char *av_to_string(uint32_t tclass, access_vector_t av); -void check_assertion_helper(int stype, int ttype, ebitmap_t *tclasses, +void check_assertion_helper(unsigned int stype, unsigned int ttype, ebitmap_t *tclasses, access_vector_t *avp, unsigned long line) { avtab_key_t avkey; avtab_datum_t *avdatump; - int k; + unsigned int k; for (k = ebitmap_startbit(tclasses); k < ebitmap_length(tclasses); k++) { @@ -282,7 +337,7 @@ void check_assertions(void) { te_assert_t *a, *tmp; - int i, j; + unsigned int i, j; a = te_assertions; while (a) { @@ -308,6 +363,77 @@ } } +int display_bools() +{ + int i; + + for (i = 0; i < policydbp->p_bools.nprim; i++) { + printf("%s : %d\n", policydbp->p_bool_val_to_name[i], + policydbp->bool_val_to_struct[i]->state); + } + return 0; +} + +void display_expr(cond_expr_t *exp) +{ + + cond_expr_t *cur; + for (cur = exp; cur != NULL; cur = cur->next) { + switch (cur->expr_type) { + case COND_BOOL: + printf("%s ", policydbp->p_bool_val_to_name[cur->bool - 1]); + break; + case COND_NOT: + printf("! "); + break; + case COND_OR: + printf("|| "); + break; + case COND_AND: + printf("&& "); + break; + case COND_XOR: + printf("^ "); + break; + case COND_EQ: + printf("== "); + break; + case COND_NEQ: + printf("!= "); + break; + default: + printf("error!"); + break; + } + } +} + +int display_cond_expressions() +{ + cond_node_t *cur; + + for (cur = policydbp->cond_list; cur != NULL; cur = cur->next) { + printf("expression: "); + display_expr(cur->expr); + printf("current state: %d\n", cur->cur_state); + } + return 0; +} + +int change_bool(char *name, int state) +{ + cond_bool_datum_t *bool; + + bool = hashtab_search(policydbp->p_bools.table, name); + if (bool == NULL) { + printf("Could not find bool %s\n", name); + return -1; + } + bool->state = state; + evaluate_conds(policydbp); + return 0; +} + int main(int argc, char **argv) { security_class_t tclass; @@ -327,7 +453,7 @@ struct stat sb; size_t filelen; - while ((ch = getopt(argc, argv, "o:dbV")) != EOF) { + while ((ch = getopt(argc, argv, "o:dbVc:")) != EOF) { switch (ch) { case 'o': outfile = optarg; @@ -340,17 +466,39 @@ debug = 1; break; case 'V': -#ifdef CONFIG_SECURITY_SELINUX_MLS - printf("%d-mls\n", POLICYDB_VERSION); -#else - printf("%d\n", POLICYDB_VERSION); -#endif - exit(0); + show_version = 1; + break; + case 'c': { + long int n = strtol(optarg, NULL, 10); + if (errno) { + fprintf(stderr, "Invalid policyvers specified: %s\n", optarg); + usage(argv[0]); + exit(1); + } + if (n < POLICYDB_VERSION_MIN || n > POLICYDB_VERSION_MAX) { + fprintf(stderr, "policyvers value %ld not in range %d-%d\n", + n, POLICYDB_VERSION_MIN, POLICYDB_VERSION_MAX); + usage(argv[0]); + exit(1); + } + if (policyvers != n) + policyvers = n; + break; + } default: usage(argv[0]); } } + if (show_version) { +#ifdef CONFIG_SECURITY_SELINUX_MLS + printf("%d-mls (compatibility range %d-%d)\n", policyvers, POLICYDB_VERSION_MAX, POLICYDB_VERSION_MIN); +#else + printf("%d (compatibility range %d-%d)\n", policyvers, POLICYDB_VERSION_MAX, POLICYDB_VERSION_MIN); +#endif + exit(0); + } + if (optind != argc) { file = argv[optind++]; if (optind != argc) @@ -402,7 +550,7 @@ yyin = fopen(file, "r"); if (!yyin) { fprintf(stderr, "%s: unable to open %s\n", argv[0], - file); + file); exit(1); } @@ -423,6 +571,8 @@ } rewind(yyin); policydb_lineno = 1; + source_file[0] = '\0'; + source_lineno = 1; yyrestart(yyin); pass = 2; if (yyparse() || policydb_errors) { @@ -431,10 +581,19 @@ } queue_destroy(id_queue); + cond_check_type_rules(); + cond_optimize_lists(policydb.cond_list); + check_assertions(); if (policydb_errors) exit(1); + if (policyvers >= POLICYDB_VERSION_NLCLASS && + policydb.p_classes.nprim < SECCLASS_NETLINK_DNRT_SOCKET) { + fprintf(stderr, "%s: policy lacks new netlink classes, unable to generate policy version %d\n", argv[0], policyvers); + exit(1); + } + /* remove type attributes */ hashtab_map_remove_on_error(policydb.p_types.table, type_attr_remove, 0, 0); @@ -448,7 +607,7 @@ if (outfile) { printf("%s: writing binary representation (version %d) to %s\n", - argv[0], POLICYDB_VERSION, outfile); + argv[0], policyvers, outfile); outfp = fopen(outfile, "w"); if (!outfp) { perror(outfile); @@ -484,6 +643,9 @@ printf("c) Call fs_use\n"); printf("d) Call genfs_sid\n"); printf("e) Call get_user_sids\n"); + printf("f) display conditional bools\n"); + printf("g) display conditional expressions\n"); + printf("h) change a boolean value\n"); #ifdef EQUIVTYPES printf("z) Show equivalent types\n"); #endif @@ -730,14 +892,47 @@ printf("if_sid %d default_msg_sid %d\n", ssid, tsid); break; - case 'b': + case 'b': { + char *p; + int family, len; + struct in_addr addr4; + struct in6_addr addr6; + + printf("protocol family? "); + fgets(ans, sizeof(ans), stdin); + ans[strlen(ans) - 1] = 0; + if (!strcasecmp(ans, "ipv4")) + family = AF_INET; + else if (!strcasecmp(ans, "ipv6")) + family = AF_INET6; + else { + printf("unknown protocol family\n"); + break; + } + printf("node address? "); fgets(ans, sizeof(ans), stdin); ans[strlen(ans) - 1] = 0; + + if (family == AF_INET) { + p = (char *)&addr4; + len = sizeof(addr4); + } else { + p = (char *)&addr6; + len = sizeof(addr6); + } + + if (inet_pton(family, ans, p) < 1) { + printf("error parsing address\n"); + break; + } + + sepol_node_sid(family, p, len, &ssid); addr = inet_addr(ans); security_node_sid(AF_INET, &addr, sizeof addr, &ssid); printf("sid %d\n", ssid); break; + } case 'c': printf("fstype? "); fgets(ans, sizeof(ans), stdin); @@ -825,6 +1020,37 @@ break; } break; + case 'f': + display_bools(); + break; + case 'g': + display_cond_expressions(); + break; + case 'h': + printf("name? "); + fgets(ans, sizeof(ans), stdin); + ans[strlen(ans) - 1] = 0; + + name = malloc((strlen(ans) + 1) * sizeof(char)); + if (name == NULL) { + fprintf(stderr, "couldn't malloc string.\n"); + break; + } + strcpy(name, ans); + + + printf("state? "); + fgets(ans, sizeof(ans), stdin); + ans[strlen(ans) - 1] = 0; + + if (atoi(ans)) + state = 1; + else + state = 0; + + change_bool(name, state); + free(name); + break; #ifdef EQUIVTYPES case 'z': identify_equiv_types(); ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.h#3 (text+ko) ==== ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/policy_parse.y#4 (text+ko) ==== @@ -3,6 +3,16 @@ * Author : Stephen Smalley, */ +/* Updated: David Caplan, + * + * Added conditional policy language extensions + * + * Copyright (C) 2003 - 2004 Tresys Technology, LLC + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2. + */ + /* FLASK */ %{ @@ -20,12 +30,22 @@ #include "flask.h" #include "security.h" +/* + * We need the following so we have a valid error return code in yacc + * when we have a parse error for a conditional rule. We can't check + * for NULL (ie 0) because that is a potentially valid return. + */ +static cond_av_list_t *conditional_unused_error_code; +#define COND_ERR (cond_av_list_t *)&conditional_unused_error_code + #define TRUE 1 #define FALSE 0 policydb_t *policydbp; queue_t id_queue = 0; unsigned int pass; +char *curfile = 0; +unsigned int curline; extern unsigned long policydb_lineno; @@ -48,6 +68,7 @@ static int define_common_base(void); static int define_av_base(void); static int define_attrib(void); +static int define_typealias(void); static int define_type(int alias); static int define_compute_type(int which); static int define_te_avtab(int which); @@ -57,24 +78,38 @@ static int define_role_trans(void); static int define_role_allow(void); static int define_constraint(constraint_expr_t *expr); -static constraint_expr_t *define_cexpr(__u32 expr_type, void *arg1, void* arg2); +static int define_bool(); +static int define_conditional(cond_expr_t *expr,cond_av_list_t *t_list, cond_av_list_t *f_list ); +static cond_expr_t *define_cond_expr(uint32_t expr_type, void *arg1, void* arg2); +static cond_av_list_t *define_cond_pol_list(cond_av_list_t *avlist, cond_av_list_t *stmt); +static cond_av_list_t *define_cond_compute_type(int which); +static cond_av_list_t *define_cond_te_avtab(int which); +static cond_av_list_t *cond_list_append(cond_av_list_t *sl, avtab_key_t *key, avtab_datum_t *datum); +static void cond_reduce_insert_list(cond_av_list_t *new, cond_av_list_t **active, cond_av_list_t **inactive, int state ); +static uintptr_t define_cexpr(uint32_t expr_type, uintptr_t arg1, uintptr_t arg2); static int define_user(void); static int parse_security_context(context_struct_t *c); static int define_initial_sid_context(void); static int define_fs_use(int behavior); static int define_genfs_context(int has_type); -static int define_fs_context(int major, int minor); -static int define_port_context(int low, int high); +static int define_fs_context(unsigned int major, unsigned int minor); +static int define_port_context(unsigned int low, unsigned int high); static int define_netif_context(void); -static int define_node_context(int addr, int mask); +static int define_ipv4_node_context(unsigned int addr, unsigned int mask); +static int define_ipv6_node_context(void); %} %union { - int val; + unsigned int val; + uintptr_t valptr; void *ptr; } -%type role_def roles cexpr cexpr_prim op roleop +%type cond_expr cond_expr_prim cond_pol_list +%type cond_allow_def cond_auditallow_def cond_auditdeny_def cond_dontaudit_def +%type cond_transition_def cond_te_avtab_def cond_rule_def +%type role_def roles +%type cexpr cexpr_prim op roleop %type ipv4_addr_def number %token PATH @@ -86,10 +121,14 @@ %token SID %token ROLE %token ROLES +%token TYPEALIAS %token TYPE %token TYPES %token ALIAS %token ATTRIBUTE +%token BOOL +%token IF +%token ELSE %token TYPE_TRANSITION %token TYPE_MEMBER %token TYPE_CHANGE @@ -113,22 +152,26 @@ %token FSUSEXATTR FSUSETASK FSUSETRANS %token GENFSCON %token U1 U2 R1 R2 T1 T2 -%token NOT AND OR +%token NOT AND OR XOR +%token CTRUE CFALSE %token IDENTIFIER %token USER_IDENTIFIER %token NUMBER %token EQUALS %token NOTEQUAL +%token IPV6_ADDR %left OR +%left XOR %left AND %right NOT %left EQUALS NOTEQUAL %% -policy : classes initial_sids access_vectors +policy : classes initial_sids access_vectors { if (pass == 1) { if (policydb_index_classes(policydbp)) return -1; } } opt_mls te_rbac users opt_constraints - { if (pass == 2) { if (policydb_index_others(policydbp)) return -1;} } + { if (pass == 1) { if (policydb_index_bools(policydbp)) return -1;} + if (pass == 2) { if (policydb_index_others(policydbp, 1)) return -1;} } initial_sid_contexts opt_fs_contexts fs_uses opt_genfs_contexts net_contexts ; classes : class_def @@ -202,7 +245,7 @@ {if (define_level()) return -1;} | LEVEL identifier ';' {if (define_level()) return -1;} - ; + ; base_perms : opt_common_base av_base ; opt_common_base : common_base @@ -244,8 +287,11 @@ ; te_decl : attribute_def | type_def + | typealias_def + | bool_def | transition_def | te_avtab_def + | cond_stmt_def ; attribute_def : ATTRIBUTE identifier ';' { if (define_attrib()) return -1;} @@ -255,9 +301,105 @@ | TYPE identifier opt_attr_list ';' {if (define_type(0)) return -1;} ; +typealias_def : TYPEALIAS identifier alias_def ';' + {if (define_typealias()) return -1;} + ; opt_attr_list : ',' id_comma_list | ; +bool_def : BOOL identifier bool_val ';' + {if (define_bool()) return -1;} + ; +bool_val : CTRUE + { if (insert_id("T",0)) return -1; } + | CFALSE + { if (insert_id("F",0)) return -1; } + ; +cond_stmt_def : IF cond_expr '{' cond_pol_list '}' + { if (pass == 2) { if (define_conditional((cond_expr_t*)$2, (cond_av_list_t*)$4,(cond_av_list_t*) 0) < 0) return -1; }} + | IF cond_expr '{' cond_pol_list '}' ELSE '{' cond_pol_list '}' + { if (pass == 2) { if (define_conditional((cond_expr_t*)$2,(cond_av_list_t*)$4,(cond_av_list_t*)$8) < 0 ) return -1; }} + | IF cond_expr '{' cond_pol_list '}' ELSE '{' '}' + { if (pass == 2) { if (define_conditional((cond_expr_t*)$2,(cond_av_list_t*)$4,(cond_av_list_t*) 0) < 0 ) return -1; }} + | IF cond_expr '{' '}' ELSE '{' cond_pol_list '}' + { if (pass == 2) { if (define_conditional((cond_expr_t*)$2,(cond_av_list_t*) 0,(cond_av_list_t*) $7) < 0 ) return -1; }} + | IF cond_expr '{' '}' ELSE '{' '}' + /* do nothing */ + | IF cond_expr '{' '}' + /* do nothing */ + ; +cond_expr : '(' cond_expr ')' + { $$ = $2;} + | NOT cond_expr + { $$ = define_cond_expr(COND_NOT, $2, 0); + if ($$ == 0) return -1; } + | cond_expr AND cond_expr + { $$ = define_cond_expr(COND_AND, $1, $3); + if ($$ == 0) return -1; } + | cond_expr OR cond_expr + { $$ = define_cond_expr(COND_OR, $1, $3); + if ($$ == 0) return -1; } + | cond_expr XOR cond_expr + { $$ = define_cond_expr(COND_XOR, $1, $3); + if ($$ == 0) return -1; } + | cond_expr EQUALS cond_expr + { $$ = define_cond_expr(COND_EQ, $1, $3); + if ($$ == 0) return -1; } + | cond_expr NOTEQUAL cond_expr + { $$ = define_cond_expr(COND_NEQ, $1, $3); + if ($$ == 0) return -1; } + | cond_expr_prim + { $$ = $1; } + ; +cond_expr_prim : identifier + { $$ = define_cond_expr(COND_BOOL,0, 0); + if ($$ == COND_ERR) return -1; } + ; +cond_pol_list : cond_rule_def + { $$ = define_cond_pol_list((cond_av_list_t *) 0, (cond_av_list_t *)$1);} + | cond_pol_list cond_rule_def + { $$ = define_cond_pol_list((cond_av_list_t *)$1, (cond_av_list_t *)$2); } + ; +cond_rule_def : cond_transition_def + { $$ = $1; } + | cond_te_avtab_def + { $$ = $1; } + ; +cond_transition_def : TYPE_TRANSITION names names ':' names identifier ';' + { $$ = define_cond_compute_type(AVTAB_TRANSITION) ; + if ($$ == COND_ERR) return -1;} + | TYPE_MEMBER names names ':' names identifier ';' + { $$ = define_cond_compute_type(AVTAB_MEMBER) ; + if ($$ == COND_ERR) return -1;} + | TYPE_CHANGE names names ':' names identifier ';' + { $$ = define_cond_compute_type(AVTAB_CHANGE) ; + if ($$ == COND_ERR) return -1;} + ; +cond_te_avtab_def : cond_allow_def + { $$ = $1; } + | cond_auditallow_def + { $$ = $1; } + | cond_auditdeny_def + { $$ = $1; } + | cond_dontaudit_def + { $$ = $1; } + ; +cond_allow_def : ALLOW names names ':' names names ';' + { $$ = define_cond_te_avtab(AVTAB_ALLOWED) ; + if ($$ == COND_ERR) return -1; } + ; +cond_auditallow_def : AUDITALLOW names names ':' names names ';' + { $$ = define_cond_te_avtab(AVTAB_AUDITALLOW) ; + if ($$ == COND_ERR) return -1; } + ; +cond_auditdeny_def : AUDITDENY names names ':' names names ';' + { $$ = define_cond_te_avtab(AVTAB_AUDITDENY) ; + if ($$ == COND_ERR) return -1; } + ; +cond_dontaudit_def : DONTAUDIT names names ':' names names ';' + { $$ = define_cond_te_avtab(-AVTAB_AUDITDENY); + if ($$ == COND_ERR) return -1; } + ; transition_def : TYPE_TRANSITION names names ':' names identifier ';' {if (define_compute_type(AVTAB_TRANSITION)) return -1;} | TYPE_MEMBER names names ':' names identifier ';' @@ -331,64 +473,64 @@ { $$ = $1; } ; cexpr_prim : U1 op U2 - { $$ = define_cexpr(CEXPR_ATTR, (void*)CEXPR_USER, $2); + { $$ = define_cexpr(CEXPR_ATTR, CEXPR_USER, $2); if ($$ == 0) return -1; } | R1 roleop R2 - { $$ = define_cexpr(CEXPR_ATTR, (void*)CEXPR_ROLE, $2); + { $$ = define_cexpr(CEXPR_ATTR, CEXPR_ROLE, $2); if ($$ == 0) return -1; } | T1 op T2 - { $$ = define_cexpr(CEXPR_ATTR, (void*)CEXPR_TYPE, $2); + { $$ = define_cexpr(CEXPR_ATTR, CEXPR_TYPE, $2); if ($$ == 0) return -1; } | U1 op { if (insert_separator(1)) return -1; } user_names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)CEXPR_USER, $2); + { $$ = define_cexpr(CEXPR_NAMES, CEXPR_USER, $2); if ($$ == 0) return -1; } | U2 op { if (insert_separator(1)) return -1; } user_names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)(CEXPR_USER | CEXPR_TARGET), $2); + { $$ = define_cexpr(CEXPR_NAMES, (CEXPR_USER | CEXPR_TARGET), $2); if ($$ == 0) return -1; } | R1 op { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)CEXPR_ROLE, $2); + { $$ = define_cexpr(CEXPR_NAMES, CEXPR_ROLE, $2); if ($$ == 0) return -1; } | R2 op { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)(CEXPR_ROLE | CEXPR_TARGET), $2); + { $$ = define_cexpr(CEXPR_NAMES, (CEXPR_ROLE | CEXPR_TARGET), $2); if ($$ == 0) return -1; } | T1 op { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)CEXPR_TYPE, $2); + { $$ = define_cexpr(CEXPR_NAMES, CEXPR_TYPE, $2); if ($$ == 0) return -1; } | T2 op { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)(CEXPR_TYPE | CEXPR_TARGET), $2); + { $$ = define_cexpr(CEXPR_NAMES, (CEXPR_TYPE | CEXPR_TARGET), $2); if ($$ == 0) return -1; } | SAMEUSER - { $$ = define_cexpr(CEXPR_ATTR, (void*)CEXPR_USER, (void*)CEXPR_EQ); + { $$ = define_cexpr(CEXPR_ATTR, CEXPR_USER, CEXPR_EQ); if ($$ == 0) return -1; } | SOURCE ROLE { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)CEXPR_ROLE, (void*)CEXPR_EQ); + { $$ = define_cexpr(CEXPR_NAMES, CEXPR_ROLE, CEXPR_EQ); if ($$ == 0) return -1; } | TARGET ROLE { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)(CEXPR_ROLE | CEXPR_TARGET), (void*)CEXPR_EQ); + { $$ = define_cexpr(CEXPR_NAMES, (CEXPR_ROLE | CEXPR_TARGET), CEXPR_EQ); if ($$ == 0) return -1; } | ROLE roleop - { $$ = define_cexpr(CEXPR_ATTR, (void*)CEXPR_ROLE, (void*)$2); + { $$ = define_cexpr(CEXPR_ATTR, CEXPR_ROLE, $2); if ($$ == 0) return -1; } | SOURCE TYPE { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)CEXPR_TYPE, (void*)CEXPR_EQ); + { $$ = define_cexpr(CEXPR_NAMES, CEXPR_TYPE, CEXPR_EQ); if ($$ == 0) return -1; } | TARGET TYPE { if (insert_separator(1)) return -1; } names_push - { $$ = define_cexpr(CEXPR_NAMES, (void*)(CEXPR_TYPE | CEXPR_TARGET), (void*)CEXPR_EQ); + { $$ = define_cexpr(CEXPR_NAMES, (CEXPR_TYPE | CEXPR_TARGET), CEXPR_EQ); if ($$ == 0) return -1; } ; op : EQUALS - { $$ = (void*)CEXPR_EQ; } + { $$ = CEXPR_EQ; } | NOTEQUAL - { $$ = (void*)CEXPR_NEQ; } + { $$ = CEXPR_NEQ; } ; roleop : op { $$ = $1; } | DOM - { $$ = (void*)CEXPR_DOM; } + { $$ = CEXPR_DOM; } | DOMBY - { $$ = (void*)CEXPR_DOMBY; } + { $$ = CEXPR_DOMBY; } | INCOMP - { $$ = (void*)CEXPR_INCOMP; } + { $$ = CEXPR_INCOMP; } ; users : user_def | users user_def @@ -452,7 +594,9 @@ | node_contexts node_context_def ; node_context_def : NODECON ipv4_addr_def ipv4_addr_def security_context_def - {if (define_node_context($2,$3)) return -1;} + {if (define_ipv4_node_context($2,$3)) return -1;} + | NODECON ipv6_addr ipv6_addr security_context_def + {if (define_ipv6_node_context()) return -1;} ; fs_uses : fs_use_def | fs_uses fs_use_def @@ -524,6 +668,8 @@ | tilde nested_id_set { if (insert_id("~", 0)) return -1; if (insert_separator(0)) return -1; } + | identifier '-' { if (insert_id("-", 0)) return -1; } identifier + { if (insert_separator(0)) return -1; } ; tilde_push : tilde { if (insert_id("~", 1)) return -1; } @@ -550,7 +696,7 @@ ; nested_id_list : nested_id_element | nested_id_list nested_id_element ; -nested_id_element : identifier | nested_id_set +nested_id_element : identifier | '-' { if (insert_id("-", 0)) return -1; } identifier | nested_id_set ; identifier : IDENTIFIER { if (insert_id(yytext,0)) return -1; } @@ -578,7 +724,12 @@ number : NUMBER { $$ = strtoul(yytext,NULL,0); } ; +ipv6_addr : IPV6_ADDR + { if (insert_id(yytext,0)) return -1; } + ; %% +#define DEBUG 1 + static int insert_separator(int push) { int error; @@ -1410,16 +1561,12 @@ while ((base = queue_remove(id_queue))) { if (!strcmp(base, "read")) { perdatum->base_perms |= MLS_BASE_READ; - cladatum->mlsperms.read |= (1 << (perdatum->value - 1)); } else if (!strcmp(base, "write")) { perdatum->base_perms |= MLS_BASE_WRITE; - cladatum->mlsperms.write |= (1 << (perdatum->value - 1)); } else if (!strcmp(base, "readby")) { perdatum->base_perms |= MLS_BASE_READBY; - cladatum->mlsperms.readby |= (1 << (perdatum->value - 1)); } else if (!strcmp(base, "writeby")) { perdatum->base_perms |= MLS_BASE_WRITEBY; - cladatum->mlsperms.writeby |= (1 << (perdatum->value - 1)); } else if (strcmp(base, "none")) { sprintf(errormsg, "base permission %s is not defined", base); yyerror(errormsg); @@ -1432,6 +1579,9 @@ free(id); } + /* Set MLS base permission masks */ + hashtab_map(cladatum->permissions.table, common_base_set, cladatum); + return 0; #else yyerror("MLS base permission definition in non-MLS configuration"); @@ -1481,7 +1631,62 @@ return 0; } +static int define_typealias(void) +{ + char *id; + type_datum_t *t, *aliasdatum;; + int ret; + + + if (pass == 2) { + while ((id = queue_remove(id_queue))) + free(id); + return 0; + } + + id = (char *) queue_remove(id_queue); + if (!id) { + yyerror("no type name for typealias definition?"); + return -1; + } + t = hashtab_search(policydbp->p_types.table, id); + if (!t || t->isattr) { + sprintf(errormsg, "unknown type %s", id); + yyerror(errormsg); + free(id); + return -1; + } + + while ((id = queue_remove(id_queue))) { + aliasdatum = (type_datum_t *) malloc(sizeof(type_datum_t)); + if (!aliasdatum) { + yyerror("out of memory"); + return -1; + } + memset(aliasdatum, 0, sizeof(type_datum_t)); + aliasdatum->value = t->value; + + ret = hashtab_insert(policydbp->p_types.table, + (hashtab_key_t) id, (hashtab_datum_t) aliasdatum); + + if (ret == HASHTAB_PRESENT) { + sprintf(errormsg, "name conflict for type alias %s", id); + yyerror(errormsg); + free(aliasdatum); + free(id); + return -1; + } + if (ret == HASHTAB_OVERFLOW) { + yyerror("hash table overflow"); + free(aliasdatum); + free(id); + return -1; + } + } + return 0; +} + static int define_type(int alias) { char *id; @@ -1665,15 +1870,19 @@ static int set_types(ebitmap_t *set, - char *id) + ebitmap_t *negset, + char *id, + int *add) { type_datum_t *t; - int i; + unsigned int i; if (strcmp(id, "*") == 0) { - /* set all types */ - for (i = 0; i < policydbp->p_types.nprim; i++) - ebitmap_set_bit(set, i, TRUE); + /* set all types not in negset */ + for (i = 0; i < policydbp->p_types.nprim; i++) { + if (!ebitmap_get_bit(negset, i)) + ebitmap_set_bit(set, i, TRUE); + } free(id); return 0; } @@ -1690,6 +1899,12 @@ return 0; } + if (strcmp(id, "-") == 0) { + *add = 0; + free(id); + return 0; + } + t = hashtab_search(policydbp->p_types.table, id); if (!t) { sprintf(errormsg, "unknown type %s", id); @@ -1699,18 +1914,42 @@ } if (t->isattr) { - /* set all types with this attribute */ + /* set or clear all types with this attribute, + but do not set anything explicitly cleared previously */ for (i = ebitmap_startbit(&t->types); i < ebitmap_length(&t->types); i++) { if (!ebitmap_get_bit(&t->types, i)) continue; - ebitmap_set_bit(set, i, TRUE); + if (!(*add)) { + ebitmap_set_bit(set, i, FALSE); + ebitmap_set_bit(negset, i, TRUE); + } else if (!ebitmap_get_bit(negset, i)) { + ebitmap_set_bit(set, i, TRUE); +#if VERBOSE + } else { + char *name = type_val_to_name(i+1); + sprintf(errormsg, "ignoring %s due to prior -%s", name, name); + yywarn(errormsg); +#endif + } } } else { - /* set one type */ - ebitmap_set_bit(set, t->value - 1, TRUE); + /* set or clear one type, but do not set anything + explicitly cleared previously */ + if (!(*add)) { + ebitmap_set_bit(set, t->value - 1, FALSE); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Nov 24 18:51:13 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BAD5D16A4D0; Wed, 24 Nov 2004 18:51:12 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9505A16A4CE for ; Wed, 24 Nov 2004 18:51:12 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C80043D54 for ; Wed, 24 Nov 2004 18:51:12 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAOIpCCo054809 for ; Wed, 24 Nov 2004 18:51:12 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAOIpBoB054806 for perforce@freebsd.org; Wed, 24 Nov 2004 18:51:11 GMT (envelope-from sam@freebsd.org) Date: Wed, 24 Nov 2004 18:51:11 GMT Message-Id: <200411241851.iAOIpBoB054806@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65802 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 18:51:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=65802 Change 65802 by sam@sam_ebb on 2004/11/24 18:51:02 IFC @ 65801 Affected files ... .. //depot/projects/wifi/Makefile.inc1#5 integrate .. //depot/projects/wifi/bin/ps/ps.c#3 integrate .. //depot/projects/wifi/bin/rmdir/rmdir.c#2 integrate .. //depot/projects/wifi/etc/defaults/rc.conf#5 integrate .. //depot/projects/wifi/etc/ppp/ppp.conf#2 integrate .. //depot/projects/wifi/etc/rc.d/jail#2 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/kgdb.1#2 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/main.c#2 integrate .. //depot/projects/wifi/include/Makefile#3 integrate .. //depot/projects/wifi/lib/libc/gen/Makefile.inc#2 integrate .. //depot/projects/wifi/lib/libc/gen/ntp_gettime.c#2 delete .. //depot/projects/wifi/lib/libc/posix1e/mac.conf.5#2 integrate .. //depot/projects/wifi/lib/libc/regex/engine.c#2 integrate .. //depot/projects/wifi/lib/libkvm/kvm_proc.c#3 integrate .. //depot/projects/wifi/lib/libmagic/Makefile#2 integrate .. //depot/projects/wifi/libexec/ftpd/ftpcmd.y#3 integrate .. //depot/projects/wifi/libexec/ftpd/ftpd.c#6 integrate .. //depot/projects/wifi/libexec/ftpd/logwtmp.c#2 integrate .. //depot/projects/wifi/libexec/ftpd/popen.c#3 integrate .. //depot/projects/wifi/libexec/rtld-elf/arm/rtld_machdep.h#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#4 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/i386/proc-i386.sgml#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/pc98/proc-pc98.sgml#2 integrate .. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#3 integrate .. //depot/projects/wifi/release/picobsd/floppy.tree/etc/ppp/ppp.conf#2 integrate .. //depot/projects/wifi/release/picobsd/mfs_tree/etc/remote#2 integrate .. //depot/projects/wifi/share/examples/ppp/ppp.conf.sample#2 integrate .. //depot/projects/wifi/share/examples/ppp/ppp.conf.span-isp#2 integrate .. //depot/projects/wifi/share/examples/pppd/options.sample#2 integrate .. //depot/projects/wifi/share/examples/startslip/slip.sh#2 integrate .. //depot/projects/wifi/share/man/man4/Makefile#5 integrate .. //depot/projects/wifi/share/man/man4/altq.4#4 integrate .. //depot/projects/wifi/share/man/man4/amr.4#2 integrate .. //depot/projects/wifi/share/man/man4/hptmv.4#1 branch .. //depot/projects/wifi/share/man/man4/ixgb.4#3 integrate .. //depot/projects/wifi/share/man/man4/ng_one2many.4#2 integrate .. //depot/projects/wifi/share/man/man4/pcn.4#2 integrate .. //depot/projects/wifi/share/man/man4/re.4#2 integrate .. //depot/projects/wifi/share/man/man4/rl.4#2 integrate .. //depot/projects/wifi/share/man/man4/sk.4#2 integrate .. //depot/projects/wifi/share/man/man5/core.5#2 integrate .. //depot/projects/wifi/share/man/man5/make.conf.5#4 integrate .. //depot/projects/wifi/share/man/man7/ports.7#2 integrate .. //depot/projects/wifi/share/man/man9/Makefile#2 integrate .. //depot/projects/wifi/share/man/man9/mbuf_tags.9#2 integrate .. //depot/projects/wifi/share/man/man9/psignal.9#2 integrate .. //depot/projects/wifi/share/man/man9/signal.9#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/genassym.c#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/interrupt.c#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/machdep.c#3 integrate .. //depot/projects/wifi/sys/alpha/alpha/mp_machdep.c#3 integrate .. //depot/projects/wifi/sys/alpha/include/param.h#2 integrate .. //depot/projects/wifi/sys/amd64/amd64/busdma_machdep.c#4 integrate .. //depot/projects/wifi/sys/amd64/amd64/genassym.c#2 integrate .. //depot/projects/wifi/sys/amd64/amd64/machdep.c#3 integrate .. //depot/projects/wifi/sys/amd64/include/param.h#2 integrate .. //depot/projects/wifi/sys/arm/arm/db_interface.c#2 integrate .. //depot/projects/wifi/sys/arm/arm/db_trace.c#3 integrate .. //depot/projects/wifi/sys/arm/arm/exception.S#2 integrate .. //depot/projects/wifi/sys/arm/arm/genassym.c#3 integrate .. //depot/projects/wifi/sys/arm/arm/intr.c#3 integrate .. //depot/projects/wifi/sys/arm/arm/swtch.S#3 integrate .. //depot/projects/wifi/sys/arm/arm/trap.c#3 integrate .. //depot/projects/wifi/sys/arm/arm/undefined.c#2 integrate .. //depot/projects/wifi/sys/arm/arm/vm_machdep.c#3 integrate .. //depot/projects/wifi/sys/arm/include/cpufunc.h#3 integrate .. //depot/projects/wifi/sys/arm/include/db_machdep.h#2 integrate .. //depot/projects/wifi/sys/arm/include/kdb.h#2 integrate .. //depot/projects/wifi/sys/arm/include/param.h#3 integrate .. //depot/projects/wifi/sys/arm/sa11x0/assabet_machdep.c#2 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/iq31244_machdep.c#4 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/std.i80321#2 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/std.iq31244#2 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/uart_bus_i80321.c#2 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/uart_cpu_i80321.c#2 integrate .. //depot/projects/wifi/sys/boot/Makefile#2 integrate .. //depot/projects/wifi/sys/boot/efi/Makefile#2 integrate .. //depot/projects/wifi/sys/boot/efi/libefi/arch/ia64/ldscript.ia64#2 delete .. //depot/projects/wifi/sys/boot/efi/libefi/arch/ia64/start.S#2 delete .. //depot/projects/wifi/sys/boot/efi/loader/Makefile#2 delete .. //depot/projects/wifi/sys/boot/efi/loader/conf.c#2 delete .. //depot/projects/wifi/sys/boot/efi/loader/main.c#2 delete .. //depot/projects/wifi/sys/boot/efi/loader/version#2 delete .. //depot/projects/wifi/sys/boot/i386/boot0/boot0.S#3 integrate .. //depot/projects/wifi/sys/boot/i386/btx/btx/btx.S#2 integrate .. //depot/projects/wifi/sys/boot/ia64/Makefile#2 integrate .. //depot/projects/wifi/sys/boot/ia64/efi/Makefile#1 branch .. //depot/projects/wifi/sys/boot/ia64/efi/conf.c#1 branch .. //depot/projects/wifi/sys/boot/ia64/efi/ldscript.ia64#1 branch .. //depot/projects/wifi/sys/boot/ia64/efi/main.c#1 branch .. //depot/projects/wifi/sys/boot/ia64/efi/start.S#1 branch .. //depot/projects/wifi/sys/boot/ia64/efi/version#1 branch .. //depot/projects/wifi/sys/cam/cam_xpt.c#2 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_proto.h#2 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_syscall.h#2 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_syscalls.c#2 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_sysent.c#2 integrate .. //depot/projects/wifi/sys/compat/freebsd32/syscalls.master#2 integrate .. //depot/projects/wifi/sys/compat/pecoff/imgact_pecoff.c#2 integrate .. //depot/projects/wifi/sys/conf/NOTES#6 integrate .. //depot/projects/wifi/sys/conf/files#7 integrate .. //depot/projects/wifi/sys/conf/files.alpha#2 integrate .. //depot/projects/wifi/sys/conf/files.amd64#2 integrate .. //depot/projects/wifi/sys/conf/files.arm#2 integrate .. //depot/projects/wifi/sys/conf/files.i386#5 integrate .. //depot/projects/wifi/sys/conf/files.ia64#2 integrate .. //depot/projects/wifi/sys/conf/files.pc98#2 integrate .. //depot/projects/wifi/sys/conf/files.sparc64#4 integrate .. //depot/projects/wifi/sys/conf/kmod.mk#3 integrate .. //depot/projects/wifi/sys/contrib/pf/net/pf.c#4 integrate .. //depot/projects/wifi/sys/ddb/db_command.c#2 integrate .. //depot/projects/wifi/sys/ddb/db_ps.c#3 integrate .. //depot/projects/wifi/sys/ddb/db_run.c#2 integrate .. //depot/projects/wifi/sys/ddb/db_thread.c#3 integrate .. //depot/projects/wifi/sys/dev/aac/aac.c#2 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pci_link.c#2 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pcib.c#3 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pcib_acpi.c#4 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pcib_pci.c#2 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pcibvar.h#2 integrate .. //depot/projects/wifi/sys/dev/aic7xxx/aic79xx.c#2 integrate .. //depot/projects/wifi/sys/dev/aic7xxx/aic79xx.h#2 integrate .. //depot/projects/wifi/sys/dev/aic7xxx/aic7xxx.c#2 integrate .. //depot/projects/wifi/sys/dev/aic7xxx/aic_osm_lib.h#2 integrate .. //depot/projects/wifi/sys/dev/ata/ata-all.c#2 integrate .. //depot/projects/wifi/sys/dev/ata/ata-dma.c#2 integrate .. //depot/projects/wifi/sys/dev/ata/ata-lowlevel.c#2 integrate .. //depot/projects/wifi/sys/dev/bge/if_bge.c#4 integrate .. //depot/projects/wifi/sys/dev/ed/if_ed.c#3 integrate .. //depot/projects/wifi/sys/dev/fdc/fdc.c#4 integrate .. //depot/projects/wifi/sys/dev/fxp/if_fxp.c#2 integrate .. //depot/projects/wifi/sys/dev/hme/if_hme.c#2 integrate .. //depot/projects/wifi/sys/dev/hme/if_hme_pci.c#2 integrate .. //depot/projects/wifi/sys/dev/hme/if_hme_sbus.c#2 integrate .. //depot/projects/wifi/sys/dev/hme/if_hmevar.h#2 integrate .. //depot/projects/wifi/sys/dev/ic/ns16550.h#2 integrate .. //depot/projects/wifi/sys/dev/ic/sab82532.h#1 branch .. //depot/projects/wifi/sys/dev/ic/z8530.h#1 branch .. //depot/projects/wifi/sys/dev/mc146818/mc146818.c#1 branch .. //depot/projects/wifi/sys/dev/mc146818/mc146818reg.h#2 integrate .. //depot/projects/wifi/sys/dev/mc146818/mc146818var.h#1 branch .. //depot/projects/wifi/sys/dev/mk48txx/mk48txx.c#2 integrate .. //depot/projects/wifi/sys/dev/mk48txx/mk48txxreg.h#2 integrate .. //depot/projects/wifi/sys/dev/mk48txx/mk48txxvar.h#1 branch .. //depot/projects/wifi/sys/dev/uart/uart_bus_isa.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_cpu.h#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_cpu_alpha.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_cpu_amd64.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_cpu_i386.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_cpu_ia64.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_cpu_pc98.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_cpu_sparc64.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_dev_i8251.c#2 delete .. //depot/projects/wifi/sys/dev/uart/uart_dev_i8251.h#2 delete .. //depot/projects/wifi/sys/dev/uart/uart_dev_ns8250.c#3 integrate .. //depot/projects/wifi/sys/dev/uart/uart_dev_ns8250.h#2 delete .. //depot/projects/wifi/sys/dev/uart/uart_dev_sab82532.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_dev_sab82532.h#2 delete .. //depot/projects/wifi/sys/dev/uart/uart_dev_z8530.c#2 integrate .. //depot/projects/wifi/sys/dev/uart/uart_dev_z8530.h#2 delete .. //depot/projects/wifi/sys/fs/devfs/devfs_vnops.c#6 integrate .. //depot/projects/wifi/sys/fs/fifofs/fifo_vnops.c#4 integrate .. //depot/projects/wifi/sys/geom/gate/g_gate.c#2 integrate .. //depot/projects/wifi/sys/geom/uzip/g_uzip.c#2 integrate .. //depot/projects/wifi/sys/i386/i386/busdma_machdep.c#3 integrate .. //depot/projects/wifi/sys/i386/i386/genassym.c#2 integrate .. //depot/projects/wifi/sys/i386/i386/locore.s#2 integrate .. //depot/projects/wifi/sys/i386/i386/machdep.c#5 integrate .. //depot/projects/wifi/sys/i386/include/param.h#2 integrate .. //depot/projects/wifi/sys/i386/linux/linux_sysvec.c#2 integrate .. //depot/projects/wifi/sys/ia64/ia64/genassym.c#2 integrate .. //depot/projects/wifi/sys/ia64/ia64/machdep.c#2 integrate .. //depot/projects/wifi/sys/ia64/ia64/pmap.c#2 integrate .. //depot/projects/wifi/sys/ia64/include/param.h#2 integrate .. //depot/projects/wifi/sys/ia64/include/pte.h#2 integrate .. //depot/projects/wifi/sys/kern/imgact_aout.c#2 integrate .. //depot/projects/wifi/sys/kern/init_main.c#3 integrate .. //depot/projects/wifi/sys/kern/init_sysent.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_descrip.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_fork.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_intr.c#5 integrate .. //depot/projects/wifi/sys/kern/kern_kse.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_ntptime.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_proc.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_switch.c#3 integrate .. //depot/projects/wifi/sys/kern/kern_thr.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_thread.c#3 integrate .. //depot/projects/wifi/sys/kern/sys_generic.c#3 integrate .. //depot/projects/wifi/sys/kern/sys_pipe.c#4 integrate .. //depot/projects/wifi/sys/kern/sys_socket.c#3 integrate .. //depot/projects/wifi/sys/kern/syscalls.c#2 integrate .. //depot/projects/wifi/sys/kern/syscalls.master#2 integrate .. //depot/projects/wifi/sys/kern/vfs_bio.c#5 integrate .. //depot/projects/wifi/sys/kern/vfs_default.c#6 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#3 integrate .. //depot/projects/wifi/sys/kern/vfs_vnops.c#4 integrate .. //depot/projects/wifi/sys/modules/acpi/acpi_snc/Makefile#2 delete .. //depot/projects/wifi/sys/modules/sio/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/uart/Makefile#2 integrate .. //depot/projects/wifi/sys/net/if.c#4 integrate .. //depot/projects/wifi/sys/net/if.h#2 integrate .. //depot/projects/wifi/sys/netgraph/atm/sscop/ng_sscop_cust.h#3 integrate .. //depot/projects/wifi/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#2 integrate .. //depot/projects/wifi/sys/netgraph/ng_cisco.c#3 integrate .. //depot/projects/wifi/sys/netgraph/ng_iface.c#2 integrate .. //depot/projects/wifi/sys/netgraph/ng_one2many.c#2 integrate .. //depot/projects/wifi/sys/netgraph/ng_one2many.h#2 integrate .. //depot/projects/wifi/sys/netinet/in.c#3 integrate .. //depot/projects/wifi/sys/netinet/ip_divert.c#5 integrate .. //depot/projects/wifi/sys/netinet/tcp_fsm.h#2 integrate .. //depot/projects/wifi/sys/netinet/tcp_input.c#4 integrate .. //depot/projects/wifi/sys/netinet/tcp_subr.c#4 integrate .. //depot/projects/wifi/sys/netinet/tcp_timer.c#3 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_bio.c#4 integrate .. //depot/projects/wifi/sys/opencrypto/cryptodev.c#2 integrate .. //depot/projects/wifi/sys/pc98/i386/machdep.c#4 integrate .. //depot/projects/wifi/sys/pci/if_sf.c#3 integrate .. //depot/projects/wifi/sys/pci/if_sfreg.h#3 integrate .. //depot/projects/wifi/sys/pci/if_sk.c#4 integrate .. //depot/projects/wifi/sys/powerpc/include/param.h#2 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/genassym.c#2 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/machdep.c#2 integrate .. //depot/projects/wifi/sys/security/mac/mac_sysv_msg.c#1 branch .. //depot/projects/wifi/sys/security/mac/mac_sysv_sem.c#1 branch .. //depot/projects/wifi/sys/security/mac/mac_sysv_shm.c#1 branch .. //depot/projects/wifi/sys/sparc64/conf/GENERIC#3 integrate .. //depot/projects/wifi/sys/sparc64/conf/NOTES#3 integrate .. //depot/projects/wifi/sys/sparc64/include/eeprom.h#2 integrate .. //depot/projects/wifi/sys/sparc64/include/param.h#2 integrate .. //depot/projects/wifi/sys/sparc64/isa/isa.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/eeprom.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/eeprom_ebus.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/eeprom_sbus.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/genassym.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/machdep.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/rtc.c#1 branch .. //depot/projects/wifi/sys/sys/buf.h#6 integrate .. //depot/projects/wifi/sys/sys/filedesc.h#4 integrate .. //depot/projects/wifi/sys/sys/jail.h#2 integrate .. //depot/projects/wifi/sys/sys/mac.h#2 integrate .. //depot/projects/wifi/sys/sys/mac_policy.h#3 integrate .. //depot/projects/wifi/sys/sys/msg.h#3 integrate .. //depot/projects/wifi/sys/sys/proc.h#2 integrate .. //depot/projects/wifi/sys/sys/sem.h#3 integrate .. //depot/projects/wifi/sys/sys/shm.h#3 integrate .. //depot/projects/wifi/sys/sys/syscall.h#2 integrate .. //depot/projects/wifi/sys/sys/syscall.mk#2 integrate .. //depot/projects/wifi/sys/sys/sysproto.h#2 integrate .. //depot/projects/wifi/sys/sys/systm.h#4 integrate .. //depot/projects/wifi/sys/sys/user.h#2 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_vnops.c#4 integrate .. //depot/projects/wifi/sys/vm/swap_pager.c#4 integrate .. //depot/projects/wifi/sys/vm/vm_extern.h#2 integrate .. //depot/projects/wifi/sys/vm/vm_glue.c#4 integrate .. //depot/projects/wifi/sys/vm/vm_pageout.h#2 integrate .. //depot/projects/wifi/tools/debugscripts/dot.gdbinit#3 integrate .. //depot/projects/wifi/tools/debugscripts/gdbinit.i386#2 integrate .. //depot/projects/wifi/tools/debugscripts/gdbinit.kernel#2 integrate .. //depot/projects/wifi/tools/regression/lib/libc/locale/Makefile#2 integrate .. //depot/projects/wifi/tools/regression/lib/libc/locale/test-sgetrune.c#3 delete .. //depot/projects/wifi/tools/regression/lib/libc/locale/test-sgetrune.t#2 delete .. //depot/projects/wifi/tools/regression/lib/libc/locale/test-sputrune.c#3 delete .. //depot/projects/wifi/tools/regression/lib/libc/locale/test-sputrune.t#2 delete .. //depot/projects/wifi/tools/test/ppsapi/Makefile#3 integrate .. //depot/projects/wifi/tools/test/ppsapi/README#2 integrate .. //depot/projects/wifi/usr.bin/calendar/calendars/calendar.australia#2 integrate .. //depot/projects/wifi/usr.bin/fetch/fetch.c#2 integrate .. //depot/projects/wifi/usr.bin/file/Makefile#2 integrate .. //depot/projects/wifi/usr.bin/gcore/aoutcore.c#2 integrate .. //depot/projects/wifi/usr.bin/make/config.h#4 integrate .. //depot/projects/wifi/usr.bin/make/job.c#4 integrate .. //depot/projects/wifi/usr.bin/make/main.c#4 integrate .. //depot/projects/wifi/usr.bin/make/parse.c#2 integrate .. //depot/projects/wifi/usr.bin/ncal/Makefile#2 integrate .. //depot/projects/wifi/usr.bin/ncal/ncal.1#2 integrate .. //depot/projects/wifi/usr.bin/ncal/ncal.c#2 integrate .. //depot/projects/wifi/usr.sbin/acpi/acpiconf/acpiconf.c#3 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/Makefile#3 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/bthid_config.h#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/bthidd.c#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/bthidd.conf.sample#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/bthidd.h#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/client.c#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/hid.c#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/kbd.c#1 branch .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/kbd.h#1 branch .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/lexer.l#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/parser.y#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/server.c#2 integrate .. //depot/projects/wifi/usr.sbin/bluetooth/bthidd/session.c#2 integrate .. //depot/projects/wifi/usr.sbin/jail/Makefile#2 integrate .. //depot/projects/wifi/usr.sbin/jail/jail.c#2 integrate .. //depot/projects/wifi/usr.sbin/ppp/README.changes#2 integrate .. //depot/projects/wifi/usr.sbin/ppp/defs.h#2 integrate .. //depot/projects/wifi/usr.sbin/ppp/ppp.8.m4#2 integrate .. //depot/projects/wifi/usr.sbin/pppd/cbcp.c#3 integrate .. //depot/projects/wifi/usr.sbin/sysinstall/devices.c#2 integrate .. //depot/projects/wifi/usr.sbin/sysinstall/menus.c#3 integrate .. //depot/projects/wifi/usr.sbin/sysinstall/system.c#2 integrate .. //depot/projects/wifi/usr.sbin/syslogd/syslogd.8#3 integrate .. //depot/projects/wifi/usr.sbin/syslogd/syslogd.c#4 integrate Differences ... ==== //depot/projects/wifi/Makefile.inc1#5 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.456 2004/11/15 05:59:10 peter Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.458 2004/11/23 09:09:47 ru Exp $ # # Make command line options: # -DNO_DYNAMICROOT do not link /bin and /sbin dynamically @@ -393,6 +393,12 @@ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.for _t in obj depend all + cd ${.CURDIR}/kerberos5/tools; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} +.endfor +.endif .for _t in obj includes cd ${.CURDIR}/include; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} @@ -413,12 +419,6 @@ cd ${.CURDIR}/${_dir}; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} build-tools .endfor -.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) -.for _t in obj depend all - cd ${.CURDIR}/kerberos5/tools; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} -.endfor -.endif cd ${.CURDIR}; \ ${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries .for _t in obj depend all @@ -684,7 +684,7 @@ # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all - cd ${.CURDIR}/sys/modules/aic7xxx/aicasm; \ + cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ ${MAKE} -DNO_CPU_CFLAGS ${target} .endfor ==== //depot/projects/wifi/bin/ps/ps.c#3 (text+ko) ==== @@ -47,7 +47,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.108 2004/11/14 19:30:02 csjp Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.109 2004/11/19 16:11:54 csjp Exp $"); #include #include @@ -1179,16 +1179,13 @@ static int check_procfs(void) { - struct statfs *mntbuf; - size_t mntsize, i; + struct statfs mnt; - mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); - for (i = 0; i < mntsize; i++) - if (strcmp(mntbuf[i].f_mntonname, "/proc") == 0 && - strcmp(mntbuf[i].f_fstypename, "procfs") == 0) { - return (1); - } - return (0); + if (statfs("/proc", &mnt) < 0) + return (0); + if (strcmp(mnt.f_fstypename, "procfs") != 0) + return (0); + return (1); } static void ==== //depot/projects/wifi/bin/rmdir/rmdir.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/rmdir/rmdir.c,v 1.17 2004/05/16 20:41:11 ru Exp $"); +__FBSDID("$FreeBSD: src/bin/rmdir/rmdir.c,v 1.19 2004/11/20 00:41:08 ru Exp $"); #include #include @@ -78,15 +78,14 @@ usage(); for (errors = 0; *argv; argv++) { - if (pflag) { - errors |= rm_path(*argv); + if (rmdir(*argv) < 0) { + warn("%s", *argv); + errors = 1; } else { - if (rmdir(*argv) < 0) { - warn("%s", *argv); - errors = 1; - } if (vflag) printf("%s\n", *argv); + if (pflag) + errors |= rm_path(*argv); } } @@ -104,9 +103,11 @@ *++p = '\0'; while ((p = strrchr(path, '/')) != NULL) { /* Delete trailing slashes. */ - while (--p > path && *p == '/') + while (--p >= path && *p == '/') ; *++p = '\0'; + if (p == path) + break; if (rmdir(path) < 0) { warn("%s", path); ==== //depot/projects/wifi/etc/defaults/rc.conf#5 (text+ko) ==== @@ -13,7 +13,7 @@ # # All arguments must be in double or single quotes. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.231 2004/11/09 21:33:18 keramida Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.232 2004/11/23 20:09:58 mux Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -497,7 +497,9 @@ #jail_example_devfs_enable="NO" # mount devfs in the jail #jail_example_fdescfs_enable="NO" # mount fdescfs in the jail #jail_example_procfs_enable="NO" # mount procfs in jail +#jail_example_mount_enable="NO" # mount/umount jail's fs #jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail +#jail_example_fstab="" # fstab(5) for mount/umount ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ==== //depot/projects/wifi/etc/ppp/ppp.conf#2 (text+ko) ==== @@ -5,7 +5,7 @@ # # See /usr/share/examples/ppp/ for some examples # -# $FreeBSD: src/etc/ppp/ppp.conf,v 1.8 2001/06/21 15:42:26 brian Exp $ +# $FreeBSD: src/etc/ppp/ppp.conf,v 1.10 2004/11/19 17:12:56 obrien Exp $ ################################################################# default: @@ -13,9 +13,9 @@ ident user-ppp VERSION (built COMPILATIONDATE) # Ensure that "device" references the correct serial port - # for your modem. (cuaa0 = COM1, cuaa1 = COM2) + # for your modem. (cuad0 = COM1, cuad1 = COM2) # - set device /dev/cuaa1 + set device /dev/cuad1 set speed 115200 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ ==== //depot/projects/wifi/etc/rc.d/jail#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/jail,v 1.17 2004/10/07 13:55:26 mtm Exp $ +# $FreeBSD: src/etc/rc.d/jail,v 1.19 2004/11/24 10:44:39 mux Exp $ # # PROVIDE: jail @@ -45,11 +45,18 @@ eval jail_procfs=\"\$jail_${_j}_procfs_enable\" [ -z "${jail_procfs}" ] && jail_procfs="NO" + eval jail_mount=\"\$jail_${_j}_mount_enable\" + [ -z "${jail_mount}" ] && jail_mount="NO" + # "/etc/fstab.${_j}" will be used for {,u}mount(8) if none is specified. + eval jail_fstab=\"\$jail_${_j}_fstab\" + [ -z "${jail_fstab}" ] && jail_fstab="/etc/fstab.${_j}" + # Debugging aid # debug "$_j devfs enable: $jail_devfs" debug "$_j fdescfs enable: $jail_fdescfs" debug "$_j procfs enable: $jail_procfs" + debug "$_j mount enable: $jail_mount" debug "$_j hostname: $jail_hostname" debug "$_j ip: $jail_ip" debug "$_j root: $jail_rootdir" @@ -57,6 +64,7 @@ debug "$_j fdescdir: $jail_fdescdir" debug "$_j procdir: $jail_procdir" debug "$_j ruleset: $jail_ruleset" + debug "$_j fstab: $jail_fstab" } # set_sysctl rc_knob mib msg @@ -108,6 +116,10 @@ umount -f ${jail_procdir} >/dev/null 2>&1 fi fi + if checkyesno jail_mount; then + [ -f "${jail_fstab}" ] || warn "${jail_fstab} does not exist" + umount -a -F "${jail_fstab}" >/dev/null 2>&1 + fi } jail_start() @@ -127,6 +139,13 @@ for _jail in ${jail_list} do init_variables $_jail + if checkyesno jail_mount; then + info "Mounting fstab for jail ${_jail} (${jail_fstab})" + if [ ! -f "${jail_fstab}" ]; then + err 3 "$name: ${jail_fstab} does not exist" + fi + mount -a -F "${jail_fstab}" + fi if checkyesno jail_devfs; then info "Mounting devfs on ${jail_devdir}" devfs_mount_jail "${jail_devdir}" ${jail_ruleset} ==== //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/kgdb.1#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.1,v 1.2 2004/08/15 02:39:20 marcel Exp $ +.\" $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.1,v 1.4 2004/11/22 16:07:28 joerg Exp $ .Dd August 1, 2004 .Os .Dt KGDB 1 @@ -31,16 +31,83 @@ .Nd The kernel debugger .Sh SYNOPSIS .Nm -.Op Ar -v -.Op Ar -d crashdir -.Op Ar -c core | -n dumpnr | -r device -.Op Ar kernel [ Ar core ] +.Op Fl a +.Op Fl v +.Op Fl d Ar crashdir +.Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device +.Op Ar kernel Op Ar core .Sh DESCRIPTION The .Nm utility is a debugger based on .Xr gdb 1 that allows debugging of kernel core files. +.Pp +The options are as follows: +.Bl -tag -width ".Fl d Ar crashdir" +.It Fl a +Increase the annotation level. +An annotation level of 1 features the historical +.Fl fullname +option of +.Xr gdb 1 . +This is useful when running +.Nm +in Emacs. +.Fl v +Increase verbosity. +.It Fl d Ar crashdir +Use +.Ar crashdir +instead of the default, +.Pa /var/crash +to locate kernel core dump files in. +The name +.Pa vmcore. +plus the dump number will be appended to determine +the actual dump file name. +.It Fl c Ar core +Explicitly use +.Ar core +as the core dump file. +.It Fl n Ar dumpnr +Use the kernel core dump file numbered +.Ar dumpnr +for debugging. +.It Fl r Ar device +Use +.Ar device +to connect +.Nm +to for a remote debugging session. +.El +.Pp +The +.Fl c , +.Fl n , +and +.Fl r +options are mutually exclusive. +.Pp +Optionally, the name of the kernel symbol file and +the name of the core dump file can be supplied on the +command-line as positional arguments. +If no kernel symbol file name has been given, the +symbol file of the currently running kernel will be +used. +If no core dump file has been specified through either +of the options or the last command-line argument, +.Pa /dev/mem +will be opened to allow debugging the currenlty running +kernel. +.Sh FILES +.Bl -tag -width "Pa /var/crash" +.It Pa /dev/mem +Default memory image to open if no core dump file +has been specified. +.It Pa /var/crash +Default directory to locate kernel core dump files. +.El .Sh SEE ALSO .Xr gdb 1 .Sh HISTORY ==== //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/main.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.3 2004/09/03 07:11:42 brooks Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.4 2004/11/22 16:08:19 joerg Exp $"); #include #include @@ -80,7 +80,7 @@ { fprintf(stderr, - "usage: %s [-v] [-d crashdir] [-c core | -n dumpnr | -r device]\n" + "usage: %s [-a] [-v] [-d crashdir] [-c core | -n dumpnr | -r device]\n" "\t[kernel [core]]\n", getprogname()); exit(1); } @@ -218,8 +218,11 @@ if (s != NULL) strlcpy(crashdir, s, sizeof(crashdir)); - while ((ch = getopt(argc, argv, "c:d:n:r:v")) != -1) { + while ((ch = getopt(argc, argv, "ac:d:n:r:v")) != -1) { switch (ch) { + case 'a': + annotation_level++; + break; case 'c': /* use given core file. */ if (vmcore != NULL) { warnx("option %c: can only be specified once", ==== //depot/projects/wifi/include/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 1/4/94 -# $FreeBSD: src/include/Makefile,v 1.228 2004/11/10 22:21:07 markm Exp $ +# $FreeBSD: src/include/Makefile,v 1.229 2004/11/17 23:48:17 ru Exp $ # # Doing a "make install" builds /usr/include. @@ -105,7 +105,7 @@ .endif copies: -.for i in ${LDIRS} ${LSUBDIRS} crypto machine machine/pc +.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} altq crypto machine machine/pc .if exists(${DESTDIR}${INCLUDEDIR}/$i) cd ${DESTDIR}${INCLUDEDIR}/$i; \ for h in *.h; do \ ==== //depot/projects/wifi/lib/libc/gen/Makefile.inc#2 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 -# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.117 2004/08/24 13:00:55 tjr Exp $ +# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.118 2004/11/18 23:59:19 marks Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen @@ -19,7 +19,7 @@ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ - nlist.c nrand48.c ntp_gettime.c opendir.c \ + nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posixshm.c pselect.c \ psignal.c pw_scan.c pwcache.c \ raise.c readdir.c readpassphrase.c rewinddir.c \ ==== //depot/projects/wifi/lib/libc/posix1e/mac.conf.5#2 (text+ko) ==== @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/mac.conf.5,v 1.4 2003/05/24 19:50:43 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/mac.conf.5,v 1.5 2004/11/18 15:24:47 csjp Exp $ .\" .Dd April 19, 2003 .Dt MAC.CONF 5 @@ -45,12 +45,18 @@ .Ql # symbol. .Pp -Each declaration consists of a single line with two fields separated -by white space: the object class name, and a list of label elements -as used by the +Currently, the implementation supports two syntax styles for label +element declaration. The old (deprecated) syntax consists of a +single line with two fields separated by white space: the object +class name, and a list of label elements as used by the .Xr mac_prepare 3 library calls prior to an application invocation of a function from .Xr mac_get 3 . +.Pp +The newer more preferred syntax consists of three fields separated by +white space: the label group, object class name and a list of +label elements. +.Pp Label element names may optionally begin with a .Ql \&? symbol to indicate that a failure to retrieve the label element for @@ -67,7 +73,14 @@ .Bd -literal -offset indent # # Default label set to be used by simple MAC applications + +default_labels file ?biba,?lomac,?mls,?sebsd +default_labels ifnet ?biba,?lomac,?mls,?sebsd +default_labels process ?biba,?lomac,?mls,?partition,?sebsd +default_labels socket ?biba,?lomac,?mls + # +# Deprecated (old) syntax default_file_labels ?biba,?mls,?sebsd default_ifnet_labels ?biba,?mls,?sebsd ==== //depot/projects/wifi/lib/libc/regex/engine.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.14 2004/07/12 07:35:59 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.15 2004/11/21 03:14:32 tjr Exp $"); /* * The matching engine and friends. This file is #included by regexec.c @@ -331,7 +331,7 @@ NOTE("false alarm"); /* recycle starting later */ start = m->coldp + XMBRTOWC(NULL, m->coldp, - m->endp - m->coldp, &m->mbs, 0); + stop - m->coldp, &m->mbs, 0); assert(start <= stop); } @@ -807,7 +807,7 @@ if (p == m->endp) c = OUT; else - clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR); + clen = XMBRTOWC(&c, p, stop - p, &m->mbs, BADCHAR); if (EQ(st, fresh)) coldp = p; @@ -861,7 +861,7 @@ assert(coldp != NULL); m->coldp = coldp; if (ISSET(st, stopst)) - return(p+XMBRTOWC(NULL, p, m->endp - p, &m->mbs, 0)); + return(p+XMBRTOWC(NULL, p, stop - p, &m->mbs, 0)); else return(NULL); } @@ -913,7 +913,7 @@ c = OUT; clen = 0; } else - clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR); + clen = XMBRTOWC(&c, p, stop - p, &m->mbs, BADCHAR); /* is there an EOL and/or BOL between lastc and c? */ flagch = '\0'; ==== //depot/projects/wifi/lib/libkvm/kvm_proc.c#3 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.83 2004/11/13 14:30:34 csjp Exp $"); +__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.84 2004/11/20 02:28:26 das Exp $"); /* * Proc traversal interface for kvm. ps and w are (probably) the exclusive @@ -201,7 +201,7 @@ * gather kinfo_proc */ kp->ki_paddr = p; - kp->ki_addr = proc.p_uarea; + kp->ki_addr = 0; /* XXX uarea */ /* kp->ki_kstack = proc.p_thread.td_kstack; XXXKSE */ kp->ki_args = proc.p_args; kp->ki_tracep = proc.p_tracevp; ==== //depot/projects/wifi/lib/libmagic/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libmagic/Makefile,v 1.4 2004/10/18 22:18:23 ru Exp $ +# $FreeBSD: src/lib/libmagic/Makefile,v 1.5 2004/11/19 04:04:14 obrien Exp $ # Copyright (c) David E. O'Brien, 2000-2004 CONTRDIR= ${.CURDIR}/../../contrib/file @@ -10,6 +10,7 @@ SRCS= apprentice.c apptype.c ascmagic.c compress.c fsmagic.c funcs.c \ is_tar.c magic.c print.c readelf.c softmagic.c +INCS= magic.h MAGICPATH?= /usr/share/misc ==== //depot/projects/wifi/libexec/ftpd/ftpcmd.y#3 (text+ko) ==== @@ -44,10 +44,11 @@ #if 0 static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94"; #endif -static const char rcsid[] = - "$FreeBSD: src/libexec/ftpd/ftpcmd.y,v 1.60 2004/11/13 13:15:47 yar Exp $"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD: src/libexec/ftpd/ftpcmd.y,v 1.64 2004/11/18 13:46:29 yar Exp $"); + #include #include #include @@ -183,7 +184,7 @@ | PORT check_login SP host_port CRLF { if (epsvall) { - reply(501, "no PORT allowed after EPSV ALL"); + reply(501, "No PORT allowed after EPSV ALL."); goto port_done; } if (!$2) @@ -206,7 +207,7 @@ | LPRT check_login SP host_long_port CRLF { if (epsvall) { - reply(501, "no LPRT allowed after EPSV ALL"); + reply(501, "No LPRT allowed after EPSV ALL."); goto lprt_done; } if (!$2) @@ -236,7 +237,7 @@ int i; if (epsvall) { - reply(501, "no EPRT allowed after EPSV ALL"); + reply(501, "No EPRT allowed after EPSV ALL."); goto eprt_done; } if (!$2) @@ -329,14 +330,14 @@ | PASV check_login CRLF { if (epsvall) - reply(501, "no PASV allowed after EPSV ALL"); + reply(501, "No PASV allowed after EPSV ALL."); else if ($2) passive(); } | LPSV check_login CRLF { if (epsvall) - reply(501, "no LPSV allowed after EPSV ALL"); + reply(501, "No LPSV allowed after EPSV ALL."); else if ($2) long_passive("LPSV", PF_UNSPEC); } @@ -363,8 +364,7 @@ | EPSV check_login_epsv SP ALL CRLF { if ($2) { - reply(200, - "EPSV ALL command successful."); + reply(200, "EPSV ALL command successful."); epsvall++; } } @@ -416,7 +416,7 @@ switch ($4) { case STRU_F: - reply(200, "STRU F ok."); + reply(200, "STRU F accepted."); break; default: @@ -430,7 +430,7 @@ switch ($4) { case MODE_S: - reply(200, "MODE S ok."); + reply(200, "MODE S accepted."); break; default: @@ -453,7 +453,7 @@ | RETR check_login SP pathname CRLF { if (noretr || (guest && noguestretr)) - reply(500, "RETR command is disabled"); + reply(500, "RETR command disabled."); else if ($2 && $4 != NULL) retrieve(NULL, $4); @@ -626,7 +626,7 @@ if ($4) { oldmask = umask(0); (void) umask(oldmask); - reply(200, "Current UMASK is %03o", oldmask); + reply(200, "Current UMASK is %03o.", oldmask); } } | SITE SP UMASK check_login SP octal_number CRLF @@ -635,11 +635,11 @@ if ($4) { if (($6 == -1) || ($6 > 0777)) { - reply(501, "Bad UMASK value"); + reply(501, "Bad UMASK value."); } else { oldmask = umask($6); reply(200, - "UMASK set to %03o (was %03o)", + "UMASK set to %03o (was %03o).", $6, oldmask); } } @@ -648,7 +648,7 @@ { if ($4 && ($8 != NULL)) { if (($6 == -1 ) || ($6 > 0777)) - reply(501, "Bad mode value"); + reply(501, "Bad mode value."); else if (chmod($8, $6) < 0) perror_reply(550, $8); else @@ -661,7 +661,7 @@ { if ($3) reply(200, - "Current IDLE time limit is %d seconds; max %d", + "Current IDLE time limit is %d seconds; max %d.", timeout, maxtimeout); } | SITE SP check_login IDLE SP NUMBER CRLF @@ -669,13 +669,13 @@ if ($3) { if ($6.i < 30 || $6.i > maxtimeout) { reply(501, - "Maximum IDLE time must be between 30 and %d seconds", + "Maximum IDLE time must be between 30 and %d seconds.", maxtimeout); } else { timeout = $6.i; (void) alarm(timeout); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Nov 24 23:37:04 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD00D16A4D0; Wed, 24 Nov 2004 23:37:03 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3F4E16A4CF for ; Wed, 24 Nov 2004 23:37:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F50743D39 for ; Wed, 24 Nov 2004 23:37:02 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAONb263071039 for ; Wed, 24 Nov 2004 23:37:02 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAONb12o071036 for perforce@freebsd.org; Wed, 24 Nov 2004 23:37:01 GMT (envelope-from davidxu@freebsd.org) Date: Wed, 24 Nov 2004 23:37:01 GMT Message-Id: <200411242337.iAONb12o071036@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 65816 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 23:37:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=65816 Change 65816 by davidxu@davidxu_alona on 2004/11/24 23:36:20 IFC Affected files ... .. //depot/projects/davidxu_thread/src/Makefile.inc1#2 integrate .. //depot/projects/davidxu_thread/src/bin/rmdir/rmdir.c#2 integrate .. //depot/projects/davidxu_thread/src/etc/defaults/periodic.conf#2 integrate .. //depot/projects/davidxu_thread/src/etc/defaults/rc.conf#2 integrate .. //depot/projects/davidxu_thread/src/etc/periodic/security/520.pfdenied#1 branch .. //depot/projects/davidxu_thread/src/etc/periodic/security/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/etc/rc.d/jail#2 integrate .. //depot/projects/davidxu_thread/src/gnu/usr.bin/gdb/kgdb/kgdb.1#2 integrate .. //depot/projects/davidxu_thread/src/gnu/usr.bin/gdb/kgdb/main.c#2 integrate .. //depot/projects/davidxu_thread/src/lib/libc/regex/engine.c#2 integrate .. //depot/projects/davidxu_thread/src/lib/libkvm/kvm_proc.c#2 integrate .. //depot/projects/davidxu_thread/src/libexec/ftpd/ftpd.c#2 integrate .. //depot/projects/davidxu_thread/src/libexec/rtld-elf/arm/rtld_machdep.h#2 integrate .. //depot/projects/davidxu_thread/src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#2 integrate .. //depot/projects/davidxu_thread/src/release/doc/share/misc/dev.archlist.txt#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/altq.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/amr.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/dc.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/em.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/fxp.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/hptmv.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/ixgb.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/ng_one2many.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/nge.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/re.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/rl.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/sf.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/sis.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/ste.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/vge.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/vr.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man5/core.5#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man5/periodic.conf.5#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man9/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man9/mbuf_tags.9#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man9/signal.9#2 integrate .. //depot/projects/davidxu_thread/src/sys/alpha/alpha/genassym.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/alpha/alpha/interrupt.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/alpha/alpha/machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/alpha/alpha/mp_machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/alpha/include/param.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/amd64/amd64/busdma_machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/amd64/amd64/genassym.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/amd64/amd64/machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/amd64/include/param.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/db_interface.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/db_trace.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/exception.S#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/genassym.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/intr.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/swtch.S#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/undefined.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/arm/vm_machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/include/cpufunc.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/include/db_machdep.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/include/kdb.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/include/param.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/sa11x0/assabet_machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/xscale/i80321/iq31244_machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/xscale/i80321/uart_bus_i80321.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/arm/xscale/i80321/uart_cpu_i80321.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/boot/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/sys/boot/efi/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/sys/boot/efi/libefi/arch/ia64/ldscript.ia64#2 delete .. //depot/projects/davidxu_thread/src/sys/boot/efi/libefi/arch/ia64/start.S#2 delete .. //depot/projects/davidxu_thread/src/sys/boot/efi/loader/Makefile#2 delete .. //depot/projects/davidxu_thread/src/sys/boot/efi/loader/conf.c#2 delete .. //depot/projects/davidxu_thread/src/sys/boot/efi/loader/main.c#2 delete .. //depot/projects/davidxu_thread/src/sys/boot/efi/loader/version#2 delete .. //depot/projects/davidxu_thread/src/sys/boot/i386/boot0/boot0.S#2 integrate .. //depot/projects/davidxu_thread/src/sys/boot/i386/btx/btx/btx.S#2 integrate .. //depot/projects/davidxu_thread/src/sys/boot/ia64/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/sys/boot/ia64/efi/Makefile#1 branch .. //depot/projects/davidxu_thread/src/sys/boot/ia64/efi/conf.c#1 branch .. //depot/projects/davidxu_thread/src/sys/boot/ia64/efi/ldscript.ia64#1 branch .. //depot/projects/davidxu_thread/src/sys/boot/ia64/efi/main.c#1 branch .. //depot/projects/davidxu_thread/src/sys/boot/ia64/efi/start.S#1 branch .. //depot/projects/davidxu_thread/src/sys/boot/ia64/efi/version#1 branch .. //depot/projects/davidxu_thread/src/sys/compat/pecoff/imgact_pecoff.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/NOTES#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/files#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/files.alpha#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/files.amd64#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/files.arm#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/files.i386#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/files.ia64#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/files.pc98#2 integrate .. //depot/projects/davidxu_thread/src/sys/conf/kmod.mk#2 integrate .. //depot/projects/davidxu_thread/src/sys/contrib/pf/net/pf.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ddb/db_command.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ddb/db_ps.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ddb/db_run.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ddb/db_thread.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/aac/aac.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/acpica/acpi_pci_link.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/acpica/acpi_pcib.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/acpica/acpi_pcib_acpi.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/acpica/acpi_pcib_pci.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/acpica/acpi_pcibvar.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/ata/ata-all.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/ata/ata-lowlevel.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/bge/if_bge.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/ed/if_ed.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/fdc/fdc.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/hme/if_hme.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/hme/if_hme_pci.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/hme/if_hme_sbus.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/hme/if_hmevar.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/ic/ns16550.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/ic/sab82532.h#1 branch .. //depot/projects/davidxu_thread/src/sys/dev/ic/z8530.h#1 branch .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_cpu_pc98.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_i8251.c#2 delete .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_i8251.h#2 delete .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_ns8250.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_ns8250.h#2 delete .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_sab82532.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_sab82532.h#2 delete .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_z8530.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/dev/uart/uart_dev_z8530.h#2 delete .. //depot/projects/davidxu_thread/src/sys/geom/gate/g_gate.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/geom/uzip/g_uzip.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/i386/i386/busdma_machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/i386/i386/genassym.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/i386/i386/locore.s#2 integrate .. //depot/projects/davidxu_thread/src/sys/i386/i386/machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/i386/include/param.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/i386/linux/linux_sysvec.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ia64/ia64/genassym.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ia64/ia64/machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ia64/ia64/pmap.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/ia64/include/param.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/ia64/include/pte.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/imgact_aout.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/init_main.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/kern_descrip.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/kern_fork.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/kern_kse.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/kern_proc.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/kern_switch.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/kern_thr.c#5 integrate .. //depot/projects/davidxu_thread/src/sys/kern/kern_thread.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/sys_pipe.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/modules/sio/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/sys/modules/uart/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/sys/net/if.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/netgraph/ng_cisco.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/netgraph/ng_iface.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/netgraph/ng_one2many.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/netgraph/ng_one2many.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/netinet/tcp_fsm.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/netinet/tcp_input.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/netinet/tcp_subr.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/netinet/tcp_timer.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/pc98/i386/machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/powerpc/include/param.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/powerpc/powerpc/genassym.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/powerpc/powerpc/machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/sparc64/include/param.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/sparc64/sparc64/genassym.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/sparc64/sparc64/machdep.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/sys/jail.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/sys/proc.h#3 integrate .. //depot/projects/davidxu_thread/src/sys/sys/systm.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/sys/user.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/vm/swap_pager.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/vm/vm_contig.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/vm/vm_extern.h#2 integrate .. //depot/projects/davidxu_thread/src/sys/vm/vm_glue.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/vm/vm_pageout.h#2 integrate .. //depot/projects/davidxu_thread/src/tools/debugscripts/gdbinit.i386#2 integrate .. //depot/projects/davidxu_thread/src/tools/debugscripts/gdbinit.kernel#2 integrate .. //depot/projects/davidxu_thread/src/tools/regression/lib/libc/locale/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/tools/regression/lib/libc/locale/test-sgetrune.c#2 delete .. //depot/projects/davidxu_thread/src/tools/regression/lib/libc/locale/test-sgetrune.t#2 delete .. //depot/projects/davidxu_thread/src/tools/regression/lib/libc/locale/test-sputrune.c#2 delete .. //depot/projects/davidxu_thread/src/tools/regression/lib/libc/locale/test-sputrune.t#2 delete .. //depot/projects/davidxu_thread/src/usr.bin/calendar/calendars/calendar.australia#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/gcore/aoutcore.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/make/job.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/make/main.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/ncal/Makefile#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/ncal/ncal.1#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/ncal/ncal.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.sbin/acpi/acpiconf/acpiconf.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.sbin/pppd/cbcp.c#2 integrate Differences ... ==== //depot/projects/davidxu_thread/src/Makefile.inc1#2 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.456 2004/11/15 05:59:10 peter Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.458 2004/11/23 09:09:47 ru Exp $ # # Make command line options: # -DNO_DYNAMICROOT do not link /bin and /sbin dynamically @@ -393,6 +393,12 @@ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.for _t in obj depend all + cd ${.CURDIR}/kerberos5/tools; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} +.endfor +.endif .for _t in obj includes cd ${.CURDIR}/include; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} @@ -413,12 +419,6 @@ cd ${.CURDIR}/${_dir}; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} build-tools .endfor -.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) -.for _t in obj depend all - cd ${.CURDIR}/kerberos5/tools; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} -.endfor -.endif cd ${.CURDIR}; \ ${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries .for _t in obj depend all @@ -684,7 +684,7 @@ # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all - cd ${.CURDIR}/sys/modules/aic7xxx/aicasm; \ + cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ ${MAKE} -DNO_CPU_CFLAGS ${target} .endfor ==== //depot/projects/davidxu_thread/src/bin/rmdir/rmdir.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/rmdir/rmdir.c,v 1.18 2004/11/20 00:12:08 ru Exp $"); +__FBSDID("$FreeBSD: src/bin/rmdir/rmdir.c,v 1.19 2004/11/20 00:41:08 ru Exp $"); #include #include @@ -103,9 +103,11 @@ *++p = '\0'; while ((p = strrchr(path, '/')) != NULL) { /* Delete trailing slashes. */ - while (--p > path && *p == '/') + while (--p >= path && *p == '/') ; *++p = '\0'; + if (p == path) + break; if (rmdir(path) < 0) { warn("%s", path); ==== //depot/projects/davidxu_thread/src/etc/defaults/periodic.conf#2 (text+ko) ==== @@ -10,7 +10,7 @@ # values set in this file. This eases the upgrade path when defaults # are changed and new features are added. # -# $FreeBSD: src/etc/defaults/periodic.conf,v 1.30 2004/09/23 02:00:51 jkoshy Exp $ +# $FreeBSD: src/etc/defaults/periodic.conf,v 1.31 2004/11/24 18:41:53 mlaier Exp $ # # What files override these defaults ? @@ -150,6 +150,9 @@ # 510.ipfdenied daily_status_security_ipfdenied_enable="YES" +# 520.pfdenied +daily_status_security_pfdenied_enable="YES" + # 550.ipfwlimit daily_status_security_ipfwlimit_enable="YES" ==== //depot/projects/davidxu_thread/src/etc/defaults/rc.conf#2 (text+ko) ==== @@ -13,7 +13,7 @@ # # All arguments must be in double or single quotes. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.231 2004/11/09 21:33:18 keramida Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.232 2004/11/23 20:09:58 mux Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -497,7 +497,9 @@ #jail_example_devfs_enable="NO" # mount devfs in the jail #jail_example_fdescfs_enable="NO" # mount fdescfs in the jail #jail_example_procfs_enable="NO" # mount procfs in jail +#jail_example_mount_enable="NO" # mount/umount jail's fs #jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail +#jail_example_fstab="" # fstab(5) for mount/umount ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ==== //depot/projects/davidxu_thread/src/etc/periodic/security/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/periodic/security/Makefile,v 1.3 2002/10/25 15:23:26 thomas Exp $ +# $FreeBSD: src/etc/periodic/security/Makefile,v 1.4 2004/11/24 18:41:53 mlaier Exp $ FILES= 100.chksetuid \ 200.chkmounts \ @@ -6,6 +6,7 @@ 400.passwdless \ 500.ipfwdenied \ 510.ipfdenied \ + 520.pfdenied \ 550.ipfwlimit \ 600.ip6fwdenied \ 650.ip6fwlimit \ ==== //depot/projects/davidxu_thread/src/etc/rc.d/jail#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/jail,v 1.17 2004/10/07 13:55:26 mtm Exp $ +# $FreeBSD: src/etc/rc.d/jail,v 1.19 2004/11/24 10:44:39 mux Exp $ # # PROVIDE: jail @@ -45,11 +45,18 @@ eval jail_procfs=\"\$jail_${_j}_procfs_enable\" [ -z "${jail_procfs}" ] && jail_procfs="NO" + eval jail_mount=\"\$jail_${_j}_mount_enable\" + [ -z "${jail_mount}" ] && jail_mount="NO" + # "/etc/fstab.${_j}" will be used for {,u}mount(8) if none is specified. + eval jail_fstab=\"\$jail_${_j}_fstab\" + [ -z "${jail_fstab}" ] && jail_fstab="/etc/fstab.${_j}" + # Debugging aid # debug "$_j devfs enable: $jail_devfs" debug "$_j fdescfs enable: $jail_fdescfs" debug "$_j procfs enable: $jail_procfs" + debug "$_j mount enable: $jail_mount" debug "$_j hostname: $jail_hostname" debug "$_j ip: $jail_ip" debug "$_j root: $jail_rootdir" @@ -57,6 +64,7 @@ debug "$_j fdescdir: $jail_fdescdir" debug "$_j procdir: $jail_procdir" debug "$_j ruleset: $jail_ruleset" + debug "$_j fstab: $jail_fstab" } # set_sysctl rc_knob mib msg @@ -108,6 +116,10 @@ umount -f ${jail_procdir} >/dev/null 2>&1 fi fi + if checkyesno jail_mount; then + [ -f "${jail_fstab}" ] || warn "${jail_fstab} does not exist" + umount -a -F "${jail_fstab}" >/dev/null 2>&1 + fi } jail_start() @@ -127,6 +139,13 @@ for _jail in ${jail_list} do init_variables $_jail + if checkyesno jail_mount; then + info "Mounting fstab for jail ${_jail} (${jail_fstab})" + if [ ! -f "${jail_fstab}" ]; then + err 3 "$name: ${jail_fstab} does not exist" + fi + mount -a -F "${jail_fstab}" + fi if checkyesno jail_devfs; then info "Mounting devfs on ${jail_devdir}" devfs_mount_jail "${jail_devdir}" ${jail_ruleset} ==== //depot/projects/davidxu_thread/src/gnu/usr.bin/gdb/kgdb/kgdb.1#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.1,v 1.2 2004/08/15 02:39:20 marcel Exp $ +.\" $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.1,v 1.4 2004/11/22 16:07:28 joerg Exp $ .Dd August 1, 2004 .Os .Dt KGDB 1 @@ -31,16 +31,83 @@ .Nd The kernel debugger .Sh SYNOPSIS .Nm -.Op Ar -v -.Op Ar -d crashdir -.Op Ar -c core | -n dumpnr | -r device -.Op Ar kernel [ Ar core ] +.Op Fl a +.Op Fl v +.Op Fl d Ar crashdir +.Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device +.Op Ar kernel Op Ar core .Sh DESCRIPTION The .Nm utility is a debugger based on .Xr gdb 1 that allows debugging of kernel core files. +.Pp +The options are as follows: +.Bl -tag -width ".Fl d Ar crashdir" +.It Fl a +Increase the annotation level. +An annotation level of 1 features the historical +.Fl fullname +option of +.Xr gdb 1 . +This is useful when running +.Nm +in Emacs. +.Fl v +Increase verbosity. +.It Fl d Ar crashdir +Use +.Ar crashdir +instead of the default, +.Pa /var/crash +to locate kernel core dump files in. +The name +.Pa vmcore. +plus the dump number will be appended to determine +the actual dump file name. +.It Fl c Ar core +Explicitly use +.Ar core +as the core dump file. +.It Fl n Ar dumpnr +Use the kernel core dump file numbered +.Ar dumpnr +for debugging. +.It Fl r Ar device +Use +.Ar device +to connect +.Nm +to for a remote debugging session. +.El +.Pp +The +.Fl c , +.Fl n , +and +.Fl r +options are mutually exclusive. +.Pp +Optionally, the name of the kernel symbol file and +the name of the core dump file can be supplied on the +command-line as positional arguments. +If no kernel symbol file name has been given, the +symbol file of the currently running kernel will be +used. +If no core dump file has been specified through either +of the options or the last command-line argument, +.Pa /dev/mem +will be opened to allow debugging the currenlty running +kernel. +.Sh FILES +.Bl -tag -width "Pa /var/crash" +.It Pa /dev/mem +Default memory image to open if no core dump file +has been specified. +.It Pa /var/crash +Default directory to locate kernel core dump files. +.El .Sh SEE ALSO .Xr gdb 1 .Sh HISTORY ==== //depot/projects/davidxu_thread/src/gnu/usr.bin/gdb/kgdb/main.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.3 2004/09/03 07:11:42 brooks Exp $"); +__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.4 2004/11/22 16:08:19 joerg Exp $"); #include #include @@ -80,7 +80,7 @@ { fprintf(stderr, - "usage: %s [-v] [-d crashdir] [-c core | -n dumpnr | -r device]\n" + "usage: %s [-a] [-v] [-d crashdir] [-c core | -n dumpnr | -r device]\n" "\t[kernel [core]]\n", getprogname()); exit(1); } @@ -218,8 +218,11 @@ if (s != NULL) strlcpy(crashdir, s, sizeof(crashdir)); - while ((ch = getopt(argc, argv, "c:d:n:r:v")) != -1) { + while ((ch = getopt(argc, argv, "ac:d:n:r:v")) != -1) { switch (ch) { + case 'a': + annotation_level++; + break; case 'c': /* use given core file. */ if (vmcore != NULL) { warnx("option %c: can only be specified once", ==== //depot/projects/davidxu_thread/src/lib/libc/regex/engine.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.14 2004/07/12 07:35:59 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.15 2004/11/21 03:14:32 tjr Exp $"); /* * The matching engine and friends. This file is #included by regexec.c @@ -331,7 +331,7 @@ NOTE("false alarm"); /* recycle starting later */ start = m->coldp + XMBRTOWC(NULL, m->coldp, - m->endp - m->coldp, &m->mbs, 0); + stop - m->coldp, &m->mbs, 0); assert(start <= stop); } @@ -807,7 +807,7 @@ if (p == m->endp) c = OUT; else - clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR); + clen = XMBRTOWC(&c, p, stop - p, &m->mbs, BADCHAR); if (EQ(st, fresh)) coldp = p; @@ -861,7 +861,7 @@ assert(coldp != NULL); m->coldp = coldp; if (ISSET(st, stopst)) - return(p+XMBRTOWC(NULL, p, m->endp - p, &m->mbs, 0)); + return(p+XMBRTOWC(NULL, p, stop - p, &m->mbs, 0)); else return(NULL); } @@ -913,7 +913,7 @@ c = OUT; clen = 0; } else - clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR); + clen = XMBRTOWC(&c, p, stop - p, &m->mbs, BADCHAR); /* is there an EOL and/or BOL between lastc and c? */ flagch = '\0'; ==== //depot/projects/davidxu_thread/src/lib/libkvm/kvm_proc.c#2 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.83 2004/11/13 14:30:34 csjp Exp $"); +__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.84 2004/11/20 02:28:26 das Exp $"); /* * Proc traversal interface for kvm. ps and w are (probably) the exclusive @@ -201,7 +201,7 @@ * gather kinfo_proc */ kp->ki_paddr = p; - kp->ki_addr = proc.p_uarea; + kp->ki_addr = 0; /* XXX uarea */ /* kp->ki_kstack = proc.p_thread.td_kstack; XXXKSE */ kp->ki_args = proc.p_args; kp->ki_tracep = proc.p_tracevp; ==== //depot/projects/davidxu_thread/src/libexec/ftpd/ftpd.c#2 (text+ko) ==== @@ -46,7 +46,7 @@ #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.192 2004/11/18 14:15:32 yar Exp $"); +__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.197 2004/11/22 11:10:04 yar Exp $"); /* * FTP server. @@ -174,7 +174,7 @@ } *thishost, *firsthost; #endif -char remotehost[MAXHOSTNAMELEN]; +char remotehost[NI_MAXHOST]; char *ident = NULL; static char ttyline[20]; @@ -597,7 +597,8 @@ #ifndef VIRTUAL_HOSTING if ((hostname = malloc(MAXHOSTNAMELEN)) == NULL) fatalerror("Ran out of memory."); - (void) gethostname(hostname, MAXHOSTNAMELEN - 1); + if (gethostname(hostname, MAXHOSTNAMELEN - 1) < 0) + hostname[0] = '\0'; hostname[MAXHOSTNAMELEN - 1] = '\0'; #endif if (hostinfo) @@ -648,7 +649,7 @@ */ if ((hostname = malloc(MAXHOSTNAMELEN)) == NULL) fatalerror("Ran out of memory."); - if (gethostname(hostname, MAXHOSTNAMELEN) < 0) + if (gethostname(hostname, MAXHOSTNAMELEN - 1) < 0) hostname[0] = '\0'; hostname[MAXHOSTNAMELEN - 1] = '\0'; if ((hrp = malloc(sizeof(struct ftphost))) == NULL) @@ -865,7 +866,7 @@ for (hi = hrp->hostinfo; hi != NULL; hi = hi->ai_next) { if (memcmp(su, hi->ai_addr, hi->ai_addrlen) == 0) { thishost = hrp; - break; + goto found; } #ifdef INET6 /* XXX IPv4 mapped IPv6 addr consideraton */ @@ -874,12 +875,13 @@ &((struct sockaddr_in *)hi->ai_addr)->sin_addr, sizeof(struct in_addr)) == 0)) { thishost = hrp; - break; + goto found; } #endif } hrp = hrp->next; } +found: su->su_port = port; /* setup static variables as appropriate */ hostname = thishost->hostname; @@ -1296,13 +1298,9 @@ if (rval == 0) { e = pam_acct_mgmt(pamh, 0); - if (e == PAM_NEW_AUTHTOK_REQD) { - e = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); - if (e != PAM_SUCCESS) { - syslog(LOG_ERR, "pam_chauthtok: %s", pam_strerror(pamh, e)); - rval = 1; - } - } else if (e != PAM_SUCCESS) { + if (e != PAM_SUCCESS) { + syslog(LOG_ERR, "pam_acct_mgmt: %s", + pam_strerror(pamh, e)); rval = 1; } } @@ -1397,11 +1395,12 @@ (void) umask(defumask); #ifdef LOGIN_CAP if ((lc = login_getpwclass(pw)) != NULL) { - char remote_ip[MAXHOSTNAMELEN]; + char remote_ip[NI_MAXHOST]; - getnameinfo((struct sockaddr *)&his_addr, his_addr.su_len, + if (getnameinfo((struct sockaddr *)&his_addr, his_addr.su_len, remote_ip, sizeof(remote_ip) - 1, NULL, 0, - NI_NUMERICHOST); + NI_NUMERICHOST)) + *remote_ip = 0; remote_ip[sizeof(remote_ip) - 1] = 0; if (!auth_hostok(lc, remotehost, remote_ip)) { syslog(LOG_INFO|LOG_AUTH, @@ -1587,6 +1586,8 @@ syslog(LOG_INFO, "FTP LOGIN FROM %s as %s", remotehost, pw->pw_name); } + if (guest || dochroot) + syslog(LOG_INFO, "session root changed to %s", chrootdir); #ifdef LOGIN_CAP login_close(lc); #endif @@ -1931,11 +1932,16 @@ do { file = getdatasock(mode); if (file == NULL) { - char hostbuf[BUFSIZ], portbuf[BUFSIZ]; - getnameinfo((struct sockaddr *)&data_source, - data_source.su_len, hostbuf, sizeof(hostbuf) - 1, - portbuf, sizeof(portbuf), - NI_NUMERICHOST|NI_NUMERICSERV); + char hostbuf[NI_MAXHOST], portbuf[NI_MAXSERV]; + + if (getnameinfo((struct sockaddr *)&data_source, + data_source.su_len, + hostbuf, sizeof(hostbuf) - 1, + portbuf, sizeof(portbuf) - 1, + NI_NUMERICHOST|NI_NUMERICSERV)) + *hostbuf = *portbuf = 0; + hostbuf[sizeof(hostbuf) - 1] = 0; + portbuf[sizeof(portbuf) - 1] = 0; reply(425, "Can't create data socket (%s,%s): %s.", hostbuf, portbuf, strerror(errno)); return (NULL); @@ -2257,6 +2263,7 @@ printf(" Connected to %s", remotehost); if (!getnameinfo((struct sockaddr *)&his_addr, his_addr.su_len, hname, sizeof(hname) - 1, NULL, 0, NI_NUMERICHOST)) { + hname[sizeof(hname) - 1] = 0; if (strcmp(hname, remotehost) != 0) printf(" (%s)", hname); } @@ -2362,6 +2369,7 @@ if (!getnameinfo((struct sockaddr *)&tmp, tmp.su_len, hname, sizeof(hname) - 1, NULL, 0, NI_NUMERICHOST)) { + hname[sizeof(hname) - 1] = 0; printf(" %s |%d|%s|%d|\r\n", ispassive ? "EPSV" : "EPRT", af, hname, htons(tmp.su_port)); @@ -2568,9 +2576,14 @@ static void dolog(struct sockaddr *who) { - int error; + char who_name[NI_MAXHOST]; realhostname_sa(remotehost, sizeof(remotehost) - 1, who, who->sa_len); + remotehost[sizeof(remotehost) - 1] = 0; + if (getnameinfo(who, who->sa_len, + who_name, sizeof(who_name) - 1, NULL, 0, NI_NUMERICHOST)) + *who_name = 0; + who_name[sizeof(who_name) - 1] = 0; #ifdef SETPROCTITLE #ifdef VIRTUAL_HOSTING @@ -2587,19 +2600,12 @@ if (logging) { #ifdef VIRTUAL_HOSTING if (thishost != firsthost) - syslog(LOG_INFO, "connection from %s (to %s)", - remotehost, hostname); + syslog(LOG_INFO, "connection from %s (%s) to %s", + remotehost, who_name, hostname); else #endif - { - char who_name[MAXHOSTNAMELEN]; - - error = getnameinfo(who, who->sa_len, - who_name, sizeof(who_name) - 1, - NULL, 0, NI_NUMERICHOST); - syslog(LOG_INFO, "connection from %s (%s)", remotehost, - error == 0 ? who_name : ""); - } + syslog(LOG_INFO, "connection from %s (%s)", + remotehost, who_name); } } @@ -3165,12 +3171,9 @@ if (logging <= 1) return; - /* If either filename isn't absolute, get current dir for log message. */ - if ((file1 && file1[0] != '/') || (file2 && file2[0] != '/')) { - if (getcwd(wd, sizeof(wd) - 1) == NULL) - strcpy(wd, strerror(errno)); - } else - wd[0] = '\0'; + + if (getcwd(wd, sizeof(wd) - 1) == NULL) + strcpy(wd, strerror(errno)); appendf(&msg, "%s", cmd); if (file1) @@ -3179,10 +3182,10 @@ appendf(&msg, " %s", file2); if (cnt >= 0) appendf(&msg, " = %jd bytes", (intmax_t)cnt); - if (wd[0]) - appendf(&msg, " (wd: %s)", wd); + appendf(&msg, " (wd: %s", wd); if (guest || dochroot) - appendf(&msg, " (chroot: %s)", chrootdir); + appendf(&msg, "; chrooted"); + appendf(&msg, ")"); syslog(LOG_INFO, "%s", msg); free(msg); } ==== //depot/projects/davidxu_thread/src/libexec/rtld-elf/arm/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/arm/rtld_machdep.h,v 1.2 2004/09/23 23:04:52 cognet Exp $ + * $FreeBSD: src/libexec/rtld-elf/arm/rtld_machdep.h,v 1.3 2004/11/23 16:32:34 cognet Exp $ */ #ifndef RTLD_MACHDEP_H @@ -70,4 +70,15 @@ void _rtld_bind_start(void); extern void *__tls_get_addr(tls_index *ti); + +static __inline u_int32_t +atomic_cmpset_32(volatile u_int32_t *p, u_int32_t cmpval, u_int32_t newval) +{ + + if (*p == cmpval) { + *p = newval; + return (1); + } + return (0); +} #endif ==== //depot/projects/davidxu_thread/src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#2 (text+ko) ==== @@ -29,7 +29,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.261 2004/11/08 19:50:44 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.262 2004/11/20 02:46:02 brueffer Exp $ Supported Devices @@ -195,8 +195,7 @@ driver) - The hptmv(4) driver supports the HighPoint - RocketRAID 182x SATA controllers. + &hwlist.hptmv; &hwlist.ips; ==== //depot/projects/davidxu_thread/src/release/doc/share/misc/dev.archlist.txt#2 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.44 2004/11/08 19:50:44 brueffer Exp $ +# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.45 2004/11/20 02:44:47 brueffer Exp $ # # @@ -69,6 +69,7 @@ fwohci i386,sparc64,ia64,amd64 gem sparc64 hifn i386,pc98,amd64 +hptmv i386 ida i386 ie i386 iir i386,ia64,amd64 ==== //depot/projects/davidxu_thread/src/share/man/man4/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.293 2004/11/19 18:24:51 obrien Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.294 2004/11/24 20:31:30 brueffer Exp $ MAN= aac.4 \ acpi.4 \ @@ -432,6 +432,7 @@ MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 MLINKS+=udav.4 if_udav.4 +MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 ==== //depot/projects/davidxu_thread/src/share/man/man4/altq.4#2 (text+ko) ==== @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/altq.4,v 1.5 2004/11/12 18:13:54 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/altq.4,v 1.6 2004/11/21 02:42:09 mlaier Exp $ .\" -.Dd November 12, 2004 +.Dd November 21, 2004 .Dt ALTQ 4 .Os .Sh NAME @@ -112,6 +112,7 @@ .Xr bfe 4 , .Xr bge 4 , .Xr dc 4 , +.Xr ed 4 , .Xr em 4 , .Xr fxp 4 , .Xr hme 4 , ==== //depot/projects/davidxu_thread/src/share/man/man4/amr.4#2 (text+ko) ==== @@ -21,9 +21,9 @@ .\" (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/share/man/man4/amr.4,v 1.21 2004/07/14 21:58:17 simon Exp $ +.\" $FreeBSD: src/share/man/man4/amr.4,v 1.23 2004/11/23 10:56:45 simon Exp $ .\" -.Dd July 14, 2004 +.Dd November 23, 2004 .Dt AMR 4 .Os .Sh NAME @@ -89,6 +89,10 @@ .It Dell PERC 4/Di .It +Dell PERC 4e/Di +.It +Dell PERC 4e/Si +.It HP NetRAID-1/Si .It HP NetRAID-3/Si (D4943A) ==== //depot/projects/davidxu_thread/src/share/man/man4/dc.4#2 (text+ko) ==== @@ -28,9 +28,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/dc.4,v 1.31 2004/09/05 00:19:32 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/dc.4,v 1.32 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd August 15, 2004 +.Dd November 24, 2004 .Dt DC 4 .Os .Sh NAME @@ -335,6 +335,7 @@ .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Rs ==== //depot/projects/davidxu_thread/src/share/man/man4/em.4#2 (text+ko) ==== @@ -29,9 +29,9 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD: src/share/man/man4/em.4,v 1.15 2004/11/08 19:52:21 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/em.4,v 1.16 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd September 5, 2004 +.Dd November 24, 2004 .Dt EM 4 .Os .Sh NAME @@ -186,6 +186,7 @@ .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY ==== //depot/projects/davidxu_thread/src/share/man/man4/fxp.4#2 (text+ko) ==== @@ -23,9 +23,9 @@ .\" (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/share/man/man4/fxp.4,v 1.32 2004/07/04 14:17:41 simon Exp $ +.\" $FreeBSD: src/share/man/man4/fxp.4,v 1.33 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd July 4, 2004 >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Nov 25 00:37:15 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F97916A4D0; Thu, 25 Nov 2004 00:37:15 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D97A16A4CE for ; Thu, 25 Nov 2004 00:37:15 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E97F43D2F for ; Thu, 25 Nov 2004 00:37:15 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAP0bESD073571 for ; Thu, 25 Nov 2004 00:37:14 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAP0bEMP073568 for perforce@freebsd.org; Thu, 25 Nov 2004 00:37:14 GMT (envelope-from sam@freebsd.org) Date: Thu, 25 Nov 2004 00:37:14 GMT Message-Id: <200411250037.iAP0bEMP073568@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65817 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 00:37:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=65817 Change 65817 by sam@sam_ebb on 2004/11/25 00:36:19 there's no reason to print tsc/rsc for wep keys Affected files ... .. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#19 edit Differences ... ==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#19 (text+ko) ==== @@ -1142,9 +1142,11 @@ for (i = 0; i < keylen; i++) printf("%02x", ik->ik_keydata[i]); printf(">"); - if (ik->ik_keyrsc != 0 || verbose) + if (ik->ik_type != IEEE80211_CIPHER_WEP && + (ik->ik_keyrsc != 0 || verbose)) printf(" rsc %llu", ik->ik_keyrsc); - if (ik->ik_keytsc != 0 || verbose) + if (ik->ik_type != IEEE80211_CIPHER_WEP && + (ik->ik_keytsc != 0 || verbose)) printf(" tsc %llu", ik->ik_keytsc); if (ik->ik_flags != 0 && verbose) { const char *sep = " "; From owner-p4-projects@FreeBSD.ORG Thu Nov 25 19:06:05 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 57B6616A4D0; Thu, 25 Nov 2004 19:06:05 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 317FE16A4CE for ; Thu, 25 Nov 2004 19:06:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEB1843D55 for ; Thu, 25 Nov 2004 19:06:04 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAPJ64Bs046125 for ; Thu, 25 Nov 2004 19:06:04 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAPJ642X046121 for perforce@freebsd.org; Thu, 25 Nov 2004 19:06:04 GMT (envelope-from marcel@freebsd.org) Date: Thu, 25 Nov 2004 19:06:04 GMT Message-Id: <200411251906.iAPJ642X046121@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 65864 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 19:06:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=65864 Change 65864 by marcel@marcel_nfs on 2004/11/25 19:05:53 IFC @65861 Affected files ... .. //depot/projects/uart/alpha/alpha/interrupt.c#4 integrate .. //depot/projects/uart/arm/arm/intr.c#3 integrate .. //depot/projects/uart/arm/xscale/i80321/uart_bus_i80321.c#2 integrate .. //depot/projects/uart/arm/xscale/i80321/uart_cpu_i80321.c#2 integrate .. //depot/projects/uart/boot/Makefile#4 integrate .. //depot/projects/uart/boot/efi/Makefile#2 integrate .. //depot/projects/uart/boot/efi/libefi/arch/ia64/ldscript.ia64#4 delete .. //depot/projects/uart/boot/efi/libefi/arch/ia64/start.S#3 delete .. //depot/projects/uart/boot/efi/loader/Makefile#3 delete .. //depot/projects/uart/boot/efi/loader/conf.c#2 delete .. //depot/projects/uart/boot/efi/loader/main.c#5 delete .. //depot/projects/uart/boot/efi/loader/version#2 delete .. //depot/projects/uart/boot/i386/boot0/boot0.S#3 integrate .. //depot/projects/uart/boot/i386/btx/btx/btx.S#2 integrate .. //depot/projects/uart/boot/ia64/Makefile#3 integrate .. //depot/projects/uart/boot/ia64/efi/Makefile#1 branch .. //depot/projects/uart/boot/ia64/efi/conf.c#1 branch .. //depot/projects/uart/boot/ia64/efi/ldscript.ia64#1 branch .. //depot/projects/uart/boot/ia64/efi/main.c#1 branch .. //depot/projects/uart/boot/ia64/efi/start.S#1 branch .. //depot/projects/uart/boot/ia64/efi/version#1 branch .. //depot/projects/uart/conf/files.alpha#8 integrate .. //depot/projects/uart/conf/files.amd64#9 integrate .. //depot/projects/uart/conf/files.arm#2 integrate .. //depot/projects/uart/conf/files.i386#13 integrate .. //depot/projects/uart/conf/files.ia64#11 integrate .. //depot/projects/uart/conf/files.pc98#10 integrate .. //depot/projects/uart/contrib/pf/net/pf.c#3 integrate .. //depot/projects/uart/ddb/db_command.c#5 integrate .. //depot/projects/uart/ddb/db_thread.c#3 integrate .. //depot/projects/uart/dev/acpica/acpi_pci_link.c#5 integrate .. //depot/projects/uart/dev/acpica/acpi_pcib.c#7 integrate .. //depot/projects/uart/dev/acpica/acpi_pcib_acpi.c#7 integrate .. //depot/projects/uart/dev/acpica/acpi_pcib_pci.c#5 integrate .. //depot/projects/uart/dev/acpica/acpi_pcibvar.h#3 integrate .. //depot/projects/uart/dev/ata/ata-all.c#10 integrate .. //depot/projects/uart/dev/ata/ata-lowlevel.c#13 integrate .. //depot/projects/uart/dev/hme/if_hme.c#6 integrate .. //depot/projects/uart/dev/hme/if_hme_pci.c#8 integrate .. //depot/projects/uart/dev/hme/if_hme_sbus.c#7 integrate .. //depot/projects/uart/dev/hme/if_hmevar.h#3 integrate .. //depot/projects/uart/dev/mlx/mlx_disk.c#4 integrate .. //depot/projects/uart/dev/mlx/mlxreg.h#2 integrate .. //depot/projects/uart/fs/nullfs/null_vfsops.c#4 integrate .. //depot/projects/uart/fs/nwfs/nwfs_vfsops.c#4 integrate .. //depot/projects/uart/fs/smbfs/smbfs_vfsops.c#6 integrate .. //depot/projects/uart/fs/umapfs/umap_vfsops.c#4 integrate .. //depot/projects/uart/geom/gate/g_gate.c#2 integrate .. //depot/projects/uart/kern/init_sysent.c#6 integrate .. //depot/projects/uart/kern/sys_pipe.c#14 integrate .. //depot/projects/uart/kern/syscalls.c#6 integrate .. //depot/projects/uart/kern/syscalls.master#6 integrate .. //depot/projects/uart/kern/vfs_mount.c#9 integrate .. //depot/projects/uart/net/if.c#8 integrate .. //depot/projects/uart/netgraph/ng_cisco.c#4 integrate .. //depot/projects/uart/netgraph/ng_iface.c#3 integrate .. //depot/projects/uart/netgraph/ng_one2many.c#4 integrate .. //depot/projects/uart/netgraph/ng_one2many.h#3 integrate .. //depot/projects/uart/netinet/tcp_input.c#8 integrate .. //depot/projects/uart/netinet/tcp_subr.c#7 integrate .. //depot/projects/uart/netinet/tcp_timer.c#5 integrate .. //depot/projects/uart/sys/jail.h#3 integrate .. //depot/projects/uart/sys/mount.h#5 integrate .. //depot/projects/uart/ufs/ffs/ffs_vfsops.c#9 integrate .. //depot/projects/uart/ufs/ufs/ufs_extern.h#3 integrate .. //depot/projects/uart/ufs/ufs/ufs_vfsops.c#3 integrate .. //depot/projects/uart/vm/vm_contig.c#10 integrate Differences ... ==== //depot/projects/uart/alpha/alpha/interrupt.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ #include /* 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.82 2004/07/20 06:32:32 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.83 2004/11/23 22:11:53 jhb Exp $"); #include #include @@ -474,7 +474,7 @@ /* * Only one processor drives the actual timer. */ - if (PCPU_GET(cpuid) == boot_cpu_id) { + if (PCPU_GET(cpuid) == 0) { #endif (*platform.clockintr)(framep); /* divide hz (1024) by 8 to get stathz (128) */ ==== //depot/projects/uart/arm/arm/intr.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.4 2004/11/12 21:49:05 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.5 2004/11/23 16:31:16 cognet Exp $"); #include #include #include @@ -139,17 +139,16 @@ continue; ih = TAILQ_FIRST(&ithd->it_handlers); if (ih && ih->ih_flags & IH_FAST) { + oldirqstate = disable_interrupts(I32_bit); TAILQ_FOREACH(ih, &ithd->it_handlers, ih_next) { ih->ih_handler(ih->ih_argument ? ih->ih_argument : frame); } + restore_interrupts(oldirqstate); arm_unmask_irqs(1 << i); - } else if (ih) { - oldirqstate = enable_interrupts(I32_bit); + } else if (ih) ithread_schedule(ithd); - restore_interrupts(oldirqstate); - } irqnb |= arm_get_irqnb(frame); } td->td_intr_nesting_level--; ==== //depot/projects/uart/arm/xscale/i80321/uart_bus_i80321.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_bus_i80321.c,v 1.1 2004/09/23 22:45:36 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_bus_i80321.c,v 1.2 2004/11/23 16:30:50 cognet Exp $"); #include #include @@ -59,7 +59,6 @@ sizeof(struct uart_softc), }; -extern struct uart_class uart_i8251_class; extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; static int uart_i80321_probe(device_t dev) @@ -68,7 +67,7 @@ sc = device_get_softc(dev); sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); - sc->sc_class = &uart_i8251_class; + sc->sc_class = &uart_ns8250_class; bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); return(uart_bus_probe(dev, 0, 0, 0, 0)); } ==== //depot/projects/uart/arm/xscale/i80321/uart_cpu_i80321.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_cpu_i80321.c,v 1.1 2004/09/23 22:45:36 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_cpu_i80321.c,v 1.2 2004/11/23 16:30:50 cognet Exp $"); #include #include @@ -55,7 +55,7 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - di->ops = uart_i8251_ops; + di->ops = uart_ns8250_ops; di->bas.chan = 0; di->bas.bst = &obio_bs_tag; di->bas.regshft = 0; ==== //depot/projects/uart/boot/Makefile#4 (text+ko) ==== @@ -1,10 +1,15 @@ -# $FreeBSD: src/sys/boot/Makefile,v 1.24 2004/08/16 15:45:24 marius Exp $ +# $FreeBSD: src/sys/boot/Makefile,v 1.25 2004/11/23 05:52:00 marcel Exp $ .if !defined(NOFORTH) # Build the add-in FORTH interpreter. SUBDIR+= ficl .endif +# Build EFI library. +.if ${MACHINE_ARCH} == "ia64" +SUBDIR+= efi +.endif + # Build Open Firmware library. .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" SUBDIR+= ofw @@ -19,9 +24,4 @@ #SUBDIR+= arc #.endif -# Build EFI executable on ia64. -.if ${MACHINE_ARCH} == "ia64" -SUBDIR+= efi -.endif - .include ==== //depot/projects/uart/boot/efi/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/sys/boot/efi/Makefile,v 1.1 2001/06/09 16:49:48 dfr Exp $ +# $FreeBSD: src/sys/boot/efi/Makefile,v 1.2 2004/11/23 06:04:51 marcel Exp $ -SUBDIR= libefi loader +SUBDIR= libefi .include ==== //depot/projects/uart/boot/i386/boot0/boot0.S#3 (text+ko) ==== @@ -13,13 +13,13 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot0/boot0.S,v 1.11 2004/11/06 06:13:13 keramida Exp $ + * $FreeBSD: src/sys/boot/i386/boot0/boot0.S,v 1.12 2004/11/24 15:39:04 jhb Exp $ */ /* A 512-byte boot manager. */ #ifdef SIO /* ... using a serial console on COM1. */ -#endif /* SIO */ +#endif .set NHRDRV,0x475 # Number of hard drives .set ORIGIN,0x600 # Execution address @@ -92,13 +92,13 @@ jmp main-LOAD+ORIGIN # To relocated code main: -#ifdef SIO +#if defined(SIO) && COMSPEED != 0 /* * Initialize the serial port. bioscom preserves the driver number in DX. */ movw COMSPEED,%ax # defined by Makefile callw bioscom -#endif /* SIO */ +#endif /* * Check what flags were loaded with us, specifically if a predefined drive * number should be used. If what the bios gives us is bad, use the '0' in @@ -235,18 +235,18 @@ xorb %ah,%ah # BIOS: Get int $0x16 # keypress movb %ah,%al # Scan code -#else /* SIO */ +#else movb $0x02,%ah # BIOS: Receive call bioscom -#endif /* SIO */ +#endif /* * If it's CR act as if timed out. */ #ifndef SIO cmpb $KEY_ENTER,%al # Enter pressed? -#else /* SIO */ +#else cmpb $ASCII_CR,%al # Enter pressed? -#endif /* SIO */ +#endif je main.9 # Yes /* * Otherwise check if legal. If not ask again. @@ -256,9 +256,9 @@ cmpb $0x4,%al # F1..F5? jna main.12 # Yes subb $(KEY_1 - KEY_F1),%al # Less #1 scan code -#else /* SIO */ +#else subb $'1',%al # Less '1' ascii character -#endif /* SIO */ +#endif cmpb $0x4,%al # #1..#5? ja main.10 # No /* @@ -326,7 +326,7 @@ #ifndef SIO movb $'F',%al # Display callw putchr # 'F' -#endif /* SIO */ +#endif movb $'1',%al # Prepare addb %dl,%al # digit jmp putstr.1 # Display the rest ==== //depot/projects/uart/boot/i386/btx/btx/btx.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.37 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.38 2004/11/24 14:54:33 jhb Exp $ */ /* @@ -975,8 +975,9 @@ .set SIO_FMT,SIOFMT # 8N1 .set SIO_DIV,(115200/SIOSPD) # 115200 / SPD +/* * void sio_init(void) - + */ sio_init: movw $SIO_PRT+0x3,%dx # Data format reg movb $SIO_FMT|0x80,%al # Set format outb %al,(%dx) # and DLAB @@ -992,15 +993,17 @@ outb %al,(%dx) # DTR incl %edx # Line status reg +/* * void sio_flush(void) - + */ sio_flush.0: call sio_getc.1 # Get character sio_flush: call sio_ischar # Check for character jnz sio_flush.0 # Till none ret # To caller +/* * void sio_putc(int c) - + */ sio_putc: movw $SIO_PRT+0x5,%dx # Line status reg xor %ecx,%ecx # Timeout movb $0x40,%ch # counter @@ -1013,16 +1016,18 @@ outb %al,(%dx) # Write character sio_putc.2: ret $0x4 # To caller +/* * int sio_getc(void) - + */ sio_getc: call sio_ischar # Character available? jz sio_getc # No sio_getc.1: subb $0x5,%dl # Receiver buffer reg inb (%dx),%al # Read character ret # To caller +/* * int sio_ischar(void) - + */ sio_ischar: movw $SIO_PRT+0x5,%dx # Line status register xorl %eax,%eax # Zero inb (%dx),%al # Received data ==== //depot/projects/uart/boot/ia64/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/sys/boot/ia64/Makefile,v 1.3 2004/09/24 04:21:14 marcel Exp $ +# $FreeBSD: src/sys/boot/ia64/Makefile,v 1.4 2004/11/23 06:03:03 marcel Exp $ -SUBDIR= ski +SUBDIR= efi ski .include ==== //depot/projects/uart/conf/files.alpha#8 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.alpha,v 1.114 2004/08/01 11:40:51 markm Exp $ +# $FreeBSD: src/sys/conf/files.alpha,v 1.115 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -179,7 +179,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/ppc/ppc.c optional ppc ==== //depot/projects/uart/conf/files.amd64#9 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.50 2004/09/28 07:29:54 markm Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.51 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -123,7 +123,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/mem/memutil.c optional mem ==== //depot/projects/uart/conf/files.arm#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files.arm,v 1.3 2004/05/14 23:42:54 cognet Exp $ +# $FreeBSD: src/sys/conf/files.arm,v 1.4 2004/11/22 22:20:50 cognet Exp $ arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard @@ -29,6 +29,7 @@ arm/arm/intr.c standard arm/arm/locore.S standard no-obj arm/arm/machdep.c standard +arm/arm/mem.c optional mem arm/arm/nexus.c optional nexus arm/arm/nexus_io.c optional nexus arm/arm/nexus_io_asm.S optional nexus ==== //depot/projects/uart/conf/files.i386#13 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.508 2004/11/15 05:54:14 imp Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.509 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -157,7 +157,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/kbd/kbd.c optional vt ==== //depot/projects/uart/conf/files.ia64#11 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.ia64,v 1.73 2004/09/25 04:27:44 marcel Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.74 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -55,7 +55,6 @@ dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/ppc/ppc.c optional ppc isa ==== //depot/projects/uart/conf/files.pc98#10 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.306 2004/08/30 23:03:56 peter Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.307 2004/11/23 00:00:43 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -105,7 +105,6 @@ dev/fb/fb.c optional gdc dev/fb/splash.c optional splash dev/fe/if_fe_cbus.c optional fe isa -dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/kbd/kbd.c optional pckbd ==== //depot/projects/uart/contrib/pf/net/pf.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.22 2004/11/08 20:24:52 ru Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.23 2004/11/24 00:43:34 dhartmei Exp $ */ /* $OpenBSD: pf.c,v 1.433.2.2 2004/07/17 03:22:34 brad Exp $ */ /* add $OpenBSD: pf.c,v 1.448 2004/05/11 07:34:11 dhartmei Exp $ */ @@ -2329,7 +2329,7 @@ saddr, pd->af); break; case PF_IN: - if (r->rpool.cur->addr.type == PF_ADDR_DYNIFTL){ + if (r->src.addr.type == PF_ADDR_DYNIFTL) { if (pd->af == AF_INET) { if (r->src.addr.p.dyn-> pfid_acnt4 < 1) ==== //depot/projects/uart/ddb/db_command.c#5 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_command.c,v 1.57 2004/07/21 05:55:51 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_command.c,v 1.58 2004/11/23 23:11:47 rwatson Exp $"); #include #include @@ -630,6 +630,7 @@ { struct thread *td; db_expr_t radix; + pid_t pid; int t; /* @@ -662,5 +663,10 @@ } } else td = kdb_thread; + if (td->td_proc != NULL) + pid = td->td_proc->p_pid; + else + pid = -1; + db_printf("Tracing pid %d tid %ld td %p\n", pid, (long)td->td_tid, td); db_trace_thread(td, count); } ==== //depot/projects/uart/ddb/db_thread.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_thread.c,v 1.2 2004/11/01 22:15:14 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_thread.c,v 1.3 2004/11/23 23:07:12 rwatson Exp $"); #include #include @@ -41,7 +41,12 @@ void db_print_thread(void) { - db_printf("[thread %ld]\n", (long)kdb_thread->td_tid); + pid_t pid; + + pid = -1; + if (kdb_thread->td_proc != NULL) + pid = kdb_thread->td_proc->p_pid; + db_printf("[thread pid %d tid %ld ]\n", pid, (long)kdb_thread->td_tid); } void ==== //depot/projects/uart/dev/acpica/acpi_pci_link.c#5 (text+ko) ==== @@ -25,17 +25,22 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.33 2004/09/25 06:15:56 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.34 2004/11/23 22:26:44 jhb Exp $"); #include "opt_acpi.h" #include +#include #include -#include +#include +#include +#include #include "acpi.h" #include #include +#include +#include #include #include "pcib_if.h" @@ -43,1119 +48,714 @@ #define _COMPONENT ACPI_BUS ACPI_MODULE_NAME("PCI_LINK") -TAILQ_HEAD(acpi_pci_link_entries, acpi_pci_link_entry); -static struct acpi_pci_link_entries acpi_pci_link_entries; ACPI_SERIAL_DECL(pci_link, "ACPI PCI link"); -TAILQ_HEAD(acpi_prt_entries, acpi_prt_entry); -static struct acpi_prt_entries acpi_prt_entries; +#define NUM_ISA_INTERRUPTS 16 +#define NUM_ACPI_INTERRUPTS 256 + +/* + * An ACPI PCI link device may contain multiple links. Each link has its + * own ACPI resource. _PRT entries specify which link is being used via + * the Source Index. + */ + +struct link; + +struct acpi_pci_link_softc { + int pl_num_links; + struct link *pl_links; +}; + +struct link { + struct acpi_pci_link_softc *l_sc; + uint8_t l_bios_irq; + uint8_t l_irq; + uint8_t l_initial_irq; + int l_res_index; + int l_num_irqs; + int *l_irqs; + int l_references; + int l_routed:1; + int l_isa_irq:1; + ACPI_RESOURCE l_prs_template; +}; + +struct link_res_request { + struct acpi_pci_link_softc *sc; + int count; +}; + +MALLOC_DEFINE(M_PCI_LINK, "PCI Link", "ACPI PCI Link structures"); -static int irq_penalty[MAX_ACPI_INTERRUPTS]; +static int pci_link_interrupt_weights[NUM_ACPI_INTERRUPTS]; +static int pci_link_bios_isa_irqs; -static int acpi_pci_link_is_valid_irq(struct acpi_pci_link_entry *link, - UINT8 irq); -static void acpi_pci_link_update_irq_penalty(device_t dev, int busno); -static void acpi_pci_link_set_bootdisabled_priority(void); -static void acpi_pci_link_fixup_bootdisabled_link(void); +static char *pci_link_ids[] = { "PNP0C0F", NULL }; /* - * PCI link object management + * Fetch the short name associated with an ACPI handle and save it in the + * passed in buffer. */ - -static void -acpi_pci_link_dump_polarity(UINT32 ActiveHighLow) +static ACPI_STATUS +acpi_short_name(ACPI_HANDLE handle, char *buffer, size_t buflen) { + ACPI_BUFFER buf; - switch (ActiveHighLow) { - case ACPI_ACTIVE_HIGH: - printf("high,"); - break; - case ACPI_ACTIVE_LOW: - printf("low,"); - break; - default: - printf("unknown,"); - break; - } + buf.Length = buflen; + buf.Pointer = buffer; + return (AcpiGetName(handle, ACPI_SINGLE_NAME, &buf)); } -static void -acpi_pci_link_dump_trigger(UINT32 EdgeLevel) +static int +acpi_pci_link_probe(device_t dev) { + char descr[64], name[10]; - switch (EdgeLevel) { - case ACPI_EDGE_SENSITIVE: - printf("edge,"); - break; - case ACPI_LEVEL_SENSITIVE: - printf("level,"); - break; - default: - printf("unknown,"); - break; + /* + * We explicitly do not check _STA since not all systems set it to + * sensible values. + */ + if (!acpi_disabled("pci_link") && + ACPI_ID_PROBE(device_get_parent(dev), dev, pci_link_ids) != NULL) { + if (ACPI_FAILURE(acpi_short_name(acpi_get_handle(dev), name, + sizeof(name)))) + device_set_desc(dev, "ACPI PCI Link"); + else { + snprintf(descr, sizeof(descr), "ACPI PCI Link %s", + name); + device_set_desc_copy(dev, descr); + } + return (0); } + return (ENXIO); } -static void -acpi_pci_link_dump_sharemode(UINT32 SharedExclusive) +static ACPI_STATUS +acpi_count_resources(ACPI_RESOURCE *res, void *context) { + int *count; - switch (SharedExclusive) { - case ACPI_EXCLUSIVE: - printf("exclusive"); - break; - case ACPI_SHARED: - printf("sharable"); - break; - default: - printf("unknown"); - break; - } + count = (int *)context; + (*count)++; + return (AE_OK); } -static void -acpi_pci_link_entry_dump(struct acpi_prt_entry *entry) +static ACPI_STATUS +link_add_crs(ACPI_RESOURCE *res, void *context) { - UINT8 i; - ACPI_RESOURCE_IRQ *Irq; - ACPI_RESOURCE_EXT_IRQ *ExtIrq; - struct acpi_pci_link_entry *link; + struct link_res_request *req; + struct link *link; - if (entry == NULL || entry->pci_link == NULL) - return; - link = entry->pci_link; - - printf("%s irq%c%2d: ", acpi_name(link->handle), - (link->flags & ACPI_LINK_ROUTED) ? '*' : ' ', link->current_irq); - - printf("["); - if (link->number_of_interrupts) - printf("%2d", link->interrupts[0]); - for (i = 1; i < link->number_of_interrupts; i++) - printf("%3d", link->interrupts[i]); - printf("] %2d+ ", link->initial_irq); - - switch (link->possible_resources.Id) { + ACPI_SERIAL_ASSERT(pci_link); + req = (struct link_res_request *)context; + link = &req->sc->pl_links[req->count]; + req->count++; + switch (res->Id) { case ACPI_RSTYPE_IRQ: - Irq = &link->possible_resources.Data.Irq; - acpi_pci_link_dump_polarity(Irq->ActiveHighLow); - acpi_pci_link_dump_trigger(Irq->EdgeLevel); - acpi_pci_link_dump_sharemode(Irq->SharedExclusive); - break; case ACPI_RSTYPE_EXT_IRQ: - ExtIrq = &link->possible_resources.Data.ExtendedIrq; - acpi_pci_link_dump_polarity(ExtIrq->ActiveHighLow); - acpi_pci_link_dump_trigger(ExtIrq->EdgeLevel); - acpi_pci_link_dump_sharemode(ExtIrq->SharedExclusive); + if (res->Id == ACPI_RSTYPE_IRQ) { + if (res->Data.Irq.NumberOfInterrupts > 0) { + KASSERT(res->Data.Irq.NumberOfInterrupts == 1, + ("%s: too many interrupts", __func__)); + link->l_irq = res->Data.Irq.Interrupts[0]; + } + } else if (res->Data.ExtendedIrq.NumberOfInterrupts > 0) { + KASSERT(res->Data.ExtendedIrq.NumberOfInterrupts == 1, + ("%s: too many interrupts", __func__)); + link->l_irq = res->Data.ExtendedIrq.Interrupts[0]; + } + + /* + * An IRQ of zero means that the link isn't routed. + */ + if (link->l_irq == 0) + link->l_irq = PCI_INVALID_IRQ; break; } - - printf(" %d.%d.%d\n", entry->busno, - (int)(ACPI_ADR_PCI_SLOT(entry->prt.Address)), - (int)entry->prt.Pin); + return (AE_OK); } +/* + * Populate the set of possible IRQs for each device. + */ static ACPI_STATUS -acpi_pci_link_get_object_status(ACPI_HANDLE handle, UINT32 *sta) +link_add_prs(ACPI_RESOURCE *res, void *context) { - ACPI_DEVICE_INFO *devinfo; - ACPI_BUFFER buf; - ACPI_STATUS error; + struct link_res_request *req; + struct link *link; + UINT32 *irqs; + int i; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - - if (handle == NULL || sta == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid argument\n")); - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - buf.Pointer = NULL; - buf.Length = ACPI_ALLOCATE_BUFFER; - error = AcpiGetObjectInfo(handle, &buf); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't get object info %s - %s\n", - acpi_name(handle), AcpiFormatException(error))); - return_ACPI_STATUS (error); - } - - devinfo = (ACPI_DEVICE_INFO *)buf.Pointer; - if ((devinfo->Valid & ACPI_VALID_HID) == 0 || - strcmp(devinfo->HardwareId.Value, "PNP0C0F") != 0) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid hardware ID - %s\n", - acpi_name(handle))); - AcpiOsFree(buf.Pointer); - return_ACPI_STATUS (AE_TYPE); - } - - if ((devinfo->Valid & ACPI_VALID_STA) != 0) { - *sta = devinfo->CurrentStatus; - } else { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "invalid status - %s\n", - acpi_name(handle))); - *sta = 0; - } - - AcpiOsFree(buf.Pointer); - return_ACPI_STATUS (AE_OK); -} - -static ACPI_STATUS -acpi_pci_link_get_irq_resources(ACPI_RESOURCE *resources, - UINT8 *number_of_interrupts, UINT8 interrupts[]) -{ - UINT8 count; - UINT8 i; - UINT32 NumberOfInterrupts; - UINT32 *Interrupts; - - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - - if (resources == NULL || number_of_interrupts == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid argument\n")); - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - *number_of_interrupts = 0; - NumberOfInterrupts = 0; - Interrupts = NULL; - - if (resources->Id == ACPI_RSTYPE_START_DPF) - resources = ACPI_NEXT_RESOURCE(resources); - - if (resources->Id != ACPI_RSTYPE_IRQ && - resources->Id != ACPI_RSTYPE_EXT_IRQ) { - printf("acpi link get: resource %d is not an IRQ\n", - resources->Id); - return_ACPI_STATUS (AE_TYPE); - } - - switch (resources->Id) { + ACPI_SERIAL_ASSERT(pci_link); + req = (struct link_res_request *)context; + link = &req->sc->pl_links[req->count]; + req->count++; + switch (res->Id) { case ACPI_RSTYPE_IRQ: - NumberOfInterrupts = resources->Data.Irq.NumberOfInterrupts; - Interrupts = resources->Data.Irq.Interrupts; - break; case ACPI_RSTYPE_EXT_IRQ: - NumberOfInterrupts = - resources->Data.ExtendedIrq.NumberOfInterrupts; - Interrupts = resources->Data.ExtendedIrq.Interrupts; - break; - } - if (NumberOfInterrupts == 0) - return_ACPI_STATUS (AE_NULL_ENTRY); + /* + * Stash a copy of the resource for later use when doing + * _SRS. + */ + bcopy(res, &link->l_prs_template, sizeof(ACPI_RESOURCE)); + if (res->Id == ACPI_RSTYPE_IRQ) { + link->l_num_irqs = res->Data.Irq.NumberOfInterrupts; + irqs = res->Data.Irq.Interrupts; + } else { + link->l_num_irqs = + res->Data.ExtendedIrq.NumberOfInterrupts; + irqs = res->Data.ExtendedIrq.Interrupts; + } + if (link->l_num_irqs == 0) + break; - count = 0; - for (i = 0; i < NumberOfInterrupts; i++) { - if (i >= MAX_POSSIBLE_INTERRUPTS) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "too many IRQs (%d)\n", - i)); - break; + /* + * Save a list of the valid IRQs. Also, if all of the + * valid IRQs are ISA IRQs, then mark this link as + * routed via an ISA interrupt. + */ + link->l_isa_irq = 1; + link->l_irqs = malloc(sizeof(int) * link->l_num_irqs, + M_PCI_LINK, M_WAITOK | M_ZERO); + for (i = 0; i < link->l_num_irqs; i++) { + link->l_irqs[i] = irqs[i]; + if (irqs[1] >= NUM_ISA_INTERRUPTS) + link->l_isa_irq = 0; } - if (Interrupts[i] == 0) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "invalid IRQ %d\n", - Interrupts[i])); - continue; - } - interrupts[count] = Interrupts[i]; - count++; + break; } - *number_of_interrupts = count; - - return_ACPI_STATUS (AE_OK); + return (AE_OK); } -static ACPI_STATUS -acpi_pci_link_get_current_irq(struct acpi_pci_link_entry *link, UINT8 *irq) +static int +link_valid_irq(struct link *link, int irq) { - ACPI_STATUS error; - ACPI_BUFFER buf; - ACPI_RESOURCE *resources; - UINT8 number_of_interrupts; - UINT8 interrupts[MAX_POSSIBLE_INTERRUPTS];; + int i; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(pci_link); - if (link == NULL || irq == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid argument\n")); - return_ACPI_STATUS (AE_BAD_PARAMETER); - } + /* Invalid interrupts are never valid. */ + if (!PCI_INTERRUPT_VALID(irq)) + return (0); - *irq = 0; - buf.Pointer = NULL; - buf.Length = ACPI_ALLOCATE_BUFFER; - error = AcpiGetCurrentResources(link->handle, &buf); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't get PCI interrupt link device _CRS %s - %s\n", - acpi_name(link->handle), AcpiFormatException(error))); - return_ACPI_STATUS (error); - } - if (buf.Pointer == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't allocate memory - %s\n", - acpi_name(link->handle))); - return_ACPI_STATUS (AE_NO_MEMORY); - } >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Nov 26 22:27:19 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4146816A4D0; Fri, 26 Nov 2004 22:27:19 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE46B16A4CE for ; Fri, 26 Nov 2004 22:27:18 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82DB443D31 for ; Fri, 26 Nov 2004 22:27:18 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAQMRIMx051779 for ; Fri, 26 Nov 2004 22:27:18 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAQMRFN1051776 for perforce@freebsd.org; Fri, 26 Nov 2004 22:27:15 GMT (envelope-from marcel@freebsd.org) Date: Fri, 26 Nov 2004 22:27:15 GMT Message-Id: <200411262227.iAQMRFN1051776@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 65907 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 22:27:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=65907 Change 65907 by marcel@marcel_nfs on 2004/11/26 22:26:16 IFC @65904 Affected files ... .. //depot/projects/ia64/Makefile#41 integrate .. //depot/projects/ia64/Makefile.inc1#97 integrate .. //depot/projects/ia64/UPDATING#72 integrate .. //depot/projects/ia64/bin/pax/tar.c#8 integrate .. //depot/projects/ia64/bin/ps/Makefile#11 integrate .. //depot/projects/ia64/bin/ps/ps.c#18 integrate .. //depot/projects/ia64/bin/rcp/Makefile#7 integrate .. //depot/projects/ia64/bin/rm/rm.1#9 integrate .. //depot/projects/ia64/bin/rm/rm.c#13 integrate .. //depot/projects/ia64/bin/rmdir/rmdir.c#7 integrate .. //depot/projects/ia64/bin/sh/sh.1#26 integrate .. //depot/projects/ia64/bin/stty/key.c#5 integrate .. //depot/projects/ia64/contrib/gcc/gcc.1#6 integrate .. //depot/projects/ia64/contrib/pf/man/pf.conf.5#6 integrate .. //depot/projects/ia64/crypto/openssh/CREDITS#5 integrate .. //depot/projects/ia64/crypto/openssh/ChangeLog#8 integrate .. //depot/projects/ia64/crypto/openssh/FREEBSD-upgrade#7 integrate .. //depot/projects/ia64/crypto/openssh/INSTALL#6 integrate .. //depot/projects/ia64/crypto/openssh/Makefile.in#7 integrate .. //depot/projects/ia64/crypto/openssh/OVERVIEW#4 integrate .. //depot/projects/ia64/crypto/openssh/README#7 integrate .. //depot/projects/ia64/crypto/openssh/README.platform#2 integrate .. //depot/projects/ia64/crypto/openssh/README.privsep#6 integrate .. //depot/projects/ia64/crypto/openssh/acconfig.h#9 integrate .. //depot/projects/ia64/crypto/openssh/auth-krb5.c#10 integrate .. //depot/projects/ia64/crypto/openssh/auth-pam.c#11 integrate .. //depot/projects/ia64/crypto/openssh/auth-pam.h#8 integrate .. //depot/projects/ia64/crypto/openssh/auth-passwd.c#10 integrate .. //depot/projects/ia64/crypto/openssh/auth-rsa.c#6 integrate .. //depot/projects/ia64/crypto/openssh/auth.c#9 integrate .. //depot/projects/ia64/crypto/openssh/auth.h#10 integrate .. //depot/projects/ia64/crypto/openssh/auth1.c#12 integrate .. //depot/projects/ia64/crypto/openssh/auth2-chall.c#8 integrate .. //depot/projects/ia64/crypto/openssh/auth2-gss.c#3 integrate .. //depot/projects/ia64/crypto/openssh/auth2-none.c#4 integrate .. //depot/projects/ia64/crypto/openssh/auth2-pubkey.c#4 integrate .. //depot/projects/ia64/crypto/openssh/auth2.c#12 integrate .. //depot/projects/ia64/crypto/openssh/authfd.c#10 integrate .. //depot/projects/ia64/crypto/openssh/authfile.c#10 integrate .. //depot/projects/ia64/crypto/openssh/buildpkg.sh.in#1 branch .. //depot/projects/ia64/crypto/openssh/canohost.c#10 integrate .. //depot/projects/ia64/crypto/openssh/channels.c#12 integrate .. //depot/projects/ia64/crypto/openssh/channels.h#8 integrate .. //depot/projects/ia64/crypto/openssh/cipher.c#10 integrate .. //depot/projects/ia64/crypto/openssh/cipher.h#5 integrate .. //depot/projects/ia64/crypto/openssh/clientloop.c#9 integrate .. //depot/projects/ia64/crypto/openssh/clientloop.h#5 integrate .. //depot/projects/ia64/crypto/openssh/compat.h#9 integrate .. //depot/projects/ia64/crypto/openssh/config.guess#5 integrate .. //depot/projects/ia64/crypto/openssh/config.h#7 integrate .. //depot/projects/ia64/crypto/openssh/config.sub#5 integrate .. //depot/projects/ia64/crypto/openssh/configure.ac#8 integrate .. //depot/projects/ia64/crypto/openssh/contrib/Makefile#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/README#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/aix/README#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/aix/buildbff.sh#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/aix/inventory.sh#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/aix/pam.conf#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/caldera/openssh.spec#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/caldera/ssh-host-keygen#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/caldera/sshd.init#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/caldera/sshd.pam#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/cygwin/Makefile#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/cygwin/README#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/cygwin/ssh-host-config#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/cygwin/ssh-user-config#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/findssl.sh#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/gnome-ssh-askpass1.c#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/gnome-ssh-askpass2.c#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/hpux/README#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/hpux/egd#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/hpux/egd.rc#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/hpux/sshd#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/hpux/sshd.rc#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/redhat/gnome-ssh-askpass.csh#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/redhat/gnome-ssh-askpass.sh#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/redhat/openssh.spec#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/redhat/sshd.init#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/redhat/sshd.pam#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/solaris/README#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/solaris/buildpkg.sh#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/solaris/opensshd.in#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/ssh-copy-id#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/ssh-copy-id.1#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/sshd.pam.freebsd#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/sshd.pam.generic#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/suse/openssh.spec#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/suse/rc.config.sshd#2 delete .. //depot/projects/ia64/crypto/openssh/contrib/suse/rc.sshd#2 delete .. //depot/projects/ia64/crypto/openssh/defines.h#8 integrate .. //depot/projects/ia64/crypto/openssh/dh.c#8 integrate .. //depot/projects/ia64/crypto/openssh/dh.h#3 integrate .. //depot/projects/ia64/crypto/openssh/dns.c#3 integrate .. //depot/projects/ia64/crypto/openssh/envpass.sh#1 branch .. //depot/projects/ia64/crypto/openssh/gss-serv-krb5.c#4 integrate .. //depot/projects/ia64/crypto/openssh/includes.h#9 integrate .. //depot/projects/ia64/crypto/openssh/kex.c#7 integrate .. //depot/projects/ia64/crypto/openssh/kex.h#6 integrate .. //depot/projects/ia64/crypto/openssh/kexdhc.c#2 integrate .. //depot/projects/ia64/crypto/openssh/kexdhs.c#2 integrate .. //depot/projects/ia64/crypto/openssh/key.c#10 integrate .. //depot/projects/ia64/crypto/openssh/log.c#8 integrate .. //depot/projects/ia64/crypto/openssh/log.h#9 integrate .. //depot/projects/ia64/crypto/openssh/loginrec.c#8 integrate .. //depot/projects/ia64/crypto/openssh/logintest.c#3 integrate .. //depot/projects/ia64/crypto/openssh/mdoc2man.awk#3 integrate .. //depot/projects/ia64/crypto/openssh/misc.c#8 integrate .. //depot/projects/ia64/crypto/openssh/misc.h#5 integrate .. //depot/projects/ia64/crypto/openssh/moduli.c#3 integrate .. //depot/projects/ia64/crypto/openssh/moduli.h#2 delete .. //depot/projects/ia64/crypto/openssh/monitor.c#10 integrate .. //depot/projects/ia64/crypto/openssh/monitor_fdpass.c#4 integrate .. //depot/projects/ia64/crypto/openssh/monitor_mm.c#5 integrate .. //depot/projects/ia64/crypto/openssh/monitor_wrap.c#8 integrate .. //depot/projects/ia64/crypto/openssh/monitor_wrap.h#7 integrate .. //depot/projects/ia64/crypto/openssh/myproposal.h#7 integrate .. //depot/projects/ia64/crypto/openssh/nchan.c#5 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/Makefile.in#6 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/bsd-arc4random.c#5 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/bsd-closefrom.c#1 branch .. //depot/projects/ia64/crypto/openssh/openbsd-compat/bsd-misc.c#6 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/bsd-misc.h#6 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/fake-rfc2553.h#4 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/getrrsetbyname.c#3 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/openbsd-compat.h#6 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/port-aix.c#5 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/port-aix.h#6 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/sys-queue.h#4 integrate .. //depot/projects/ia64/crypto/openssh/openbsd-compat/xmmap.c#3 integrate .. //depot/projects/ia64/crypto/openssh/opensshd.init.in#1 branch .. //depot/projects/ia64/crypto/openssh/packet.c#10 integrate .. //depot/projects/ia64/crypto/openssh/packet.h#6 integrate .. //depot/projects/ia64/crypto/openssh/pathnames.h#6 integrate .. //depot/projects/ia64/crypto/openssh/progressmeter.c#4 integrate .. //depot/projects/ia64/crypto/openssh/readconf.c#11 integrate .. //depot/projects/ia64/crypto/openssh/readconf.h#8 integrate .. //depot/projects/ia64/crypto/openssh/readpass.c#5 integrate .. //depot/projects/ia64/crypto/openssh/readpass.h#4 delete .. //depot/projects/ia64/crypto/openssh/regress/Makefile#6 integrate .. //depot/projects/ia64/crypto/openssh/regress/README.regress#4 integrate .. //depot/projects/ia64/crypto/openssh/regress/dynamic-forward.sh#3 integrate .. //depot/projects/ia64/crypto/openssh/regress/envpass.sh#1 branch .. //depot/projects/ia64/crypto/openssh/regress/login-timeout.sh#2 integrate .. //depot/projects/ia64/crypto/openssh/regress/multiplex.sh#1 branch .. //depot/projects/ia64/crypto/openssh/regress/reexec.sh#1 branch .. //depot/projects/ia64/crypto/openssh/regress/scp-ssh-wrapper.sh#1 branch .. //depot/projects/ia64/crypto/openssh/regress/scp.sh#1 branch .. //depot/projects/ia64/crypto/openssh/regress/test-exec.sh#5 integrate .. //depot/projects/ia64/crypto/openssh/regress/try-ciphers.sh#4 integrate .. //depot/projects/ia64/crypto/openssh/rijndael.c#7 integrate .. //depot/projects/ia64/crypto/openssh/scard-opensc.c#4 integrate .. //depot/projects/ia64/crypto/openssh/scard.c#5 integrate .. //depot/projects/ia64/crypto/openssh/scp.1#9 integrate .. //depot/projects/ia64/crypto/openssh/scp.c#9 integrate .. //depot/projects/ia64/crypto/openssh/servconf.c#13 integrate .. //depot/projects/ia64/crypto/openssh/servconf.h#7 integrate .. //depot/projects/ia64/crypto/openssh/serverloop.c#10 integrate .. //depot/projects/ia64/crypto/openssh/session.c#21 integrate .. //depot/projects/ia64/crypto/openssh/session.h#9 integrate .. //depot/projects/ia64/crypto/openssh/sftp-client.c#10 integrate .. //depot/projects/ia64/crypto/openssh/sftp-server.c#9 integrate .. //depot/projects/ia64/crypto/openssh/sftp.1#9 integrate .. //depot/projects/ia64/crypto/openssh/sftp.c#10 integrate .. //depot/projects/ia64/crypto/openssh/ssh-add.c#9 integrate .. //depot/projects/ia64/crypto/openssh/ssh-agent.1#7 integrate .. //depot/projects/ia64/crypto/openssh/ssh-agent.c#12 integrate .. //depot/projects/ia64/crypto/openssh/ssh-gss.h#3 integrate .. //depot/projects/ia64/crypto/openssh/ssh-keygen.1#7 integrate .. //depot/projects/ia64/crypto/openssh/ssh-keygen.c#9 integrate .. //depot/projects/ia64/crypto/openssh/ssh-keyscan.1#5 integrate .. //depot/projects/ia64/crypto/openssh/ssh-keyscan.c#10 integrate .. //depot/projects/ia64/crypto/openssh/ssh-keysign.c#6 integrate .. //depot/projects/ia64/crypto/openssh/ssh-rand-helper.c#6 integrate .. //depot/projects/ia64/crypto/openssh/ssh.1#10 integrate .. //depot/projects/ia64/crypto/openssh/ssh.c#11 integrate .. //depot/projects/ia64/crypto/openssh/ssh1.h#3 integrate .. //depot/projects/ia64/crypto/openssh/ssh_config#16 integrate .. //depot/projects/ia64/crypto/openssh/ssh_config.5#12 integrate .. //depot/projects/ia64/crypto/openssh/sshconnect.c#10 integrate .. //depot/projects/ia64/crypto/openssh/sshconnect1.c#7 integrate .. //depot/projects/ia64/crypto/openssh/sshconnect2.c#12 integrate .. //depot/projects/ia64/crypto/openssh/sshd.8#12 integrate .. //depot/projects/ia64/crypto/openssh/sshd.c#13 integrate .. //depot/projects/ia64/crypto/openssh/sshd_config#18 integrate .. //depot/projects/ia64/crypto/openssh/sshd_config.5#14 integrate .. //depot/projects/ia64/crypto/openssh/sshlogin.c#10 integrate .. //depot/projects/ia64/crypto/openssh/sshpty.c#10 integrate .. //depot/projects/ia64/crypto/openssh/sshpty.h#3 integrate .. //depot/projects/ia64/crypto/openssh/sshtty.c#5 integrate .. //depot/projects/ia64/crypto/openssh/sshtty.h#4 delete .. //depot/projects/ia64/crypto/openssh/tildexpand.c#4 integrate .. //depot/projects/ia64/crypto/openssh/tildexpand.h#3 delete .. //depot/projects/ia64/crypto/openssh/ttymodes.h#4 integrate .. //depot/projects/ia64/crypto/openssh/version.c#4 integrate .. //depot/projects/ia64/crypto/openssh/version.h#17 integrate .. //depot/projects/ia64/etc/defaults/pccard.conf#29 integrate .. //depot/projects/ia64/etc/defaults/periodic.conf#14 integrate .. //depot/projects/ia64/etc/defaults/rc.conf#56 integrate .. //depot/projects/ia64/etc/devd.conf#14 integrate .. //depot/projects/ia64/etc/mtree/BIND.chroot.dist#2 integrate .. //depot/projects/ia64/etc/namedb/named.conf#8 integrate .. //depot/projects/ia64/etc/network.subr#11 integrate .. //depot/projects/ia64/etc/periodic/security/520.pfdenied#1 branch .. //depot/projects/ia64/etc/periodic/security/Makefile#4 integrate .. //depot/projects/ia64/etc/ppp/ppp.conf#2 integrate .. //depot/projects/ia64/etc/rc.d/Makefile#31 integrate .. //depot/projects/ia64/etc/rc.d/initdiskless#15 integrate .. //depot/projects/ia64/etc/rc.d/jail#12 integrate .. //depot/projects/ia64/etc/rc.d/moused#7 integrate .. //depot/projects/ia64/etc/rc.d/netif#10 integrate .. //depot/projects/ia64/etc/rc.d/ramdisk-own#3 integrate .. //depot/projects/ia64/etc/rc.d/serial#8 integrate .. //depot/projects/ia64/etc/rc.d/swap1#8 integrate .. //depot/projects/ia64/etc/rc.d/tmp#4 integrate .. //depot/projects/ia64/etc/rc.d/var#4 integrate .. //depot/projects/ia64/etc/rc.d/vinum#4 delete .. //depot/projects/ia64/etc/rc.subr#20 integrate .. //depot/projects/ia64/etc/usbd.conf#5 integrate .. //depot/projects/ia64/games/fortune/datfiles/fortunes2#26 integrate .. //depot/projects/ia64/gnu/usr.bin/cc/Makefile#10 integrate .. //depot/projects/ia64/gnu/usr.bin/cc/c++filt/Makefile#9 integrate .. //depot/projects/ia64/gnu/usr.bin/gdb/arch/i386/Makefile#2 integrate .. //depot/projects/ia64/gnu/usr.bin/gdb/kgdb/kgdb.1#2 integrate .. //depot/projects/ia64/gnu/usr.bin/gdb/kgdb/main.c#3 integrate .. //depot/projects/ia64/gnu/usr.bin/gdb/libgdb/Makefile#4 integrate .. //depot/projects/ia64/gnu/usr.bin/gdb/libgdb/fbsd-threads.c#3 integrate .. //depot/projects/ia64/gnu/usr.bin/grep/grep.1#9 integrate .. //depot/projects/ia64/include/Makefile#43 integrate .. //depot/projects/ia64/kerberos5/usr.bin/ksu/Makefile#6 integrate .. //depot/projects/ia64/lib/Makefile#49 integrate .. //depot/projects/ia64/lib/libarchive/Makefile#8 integrate .. //depot/projects/ia64/lib/libarchive/archive_private.h#6 integrate .. //depot/projects/ia64/lib/libarchive/archive_read_extract.c#7 integrate .. //depot/projects/ia64/lib/libarchive/archive_string.h#4 integrate .. //depot/projects/ia64/lib/libarchive/archive_string_sprintf.c#6 integrate .. //depot/projects/ia64/lib/libarchive/archive_write.3#4 integrate .. //depot/projects/ia64/lib/libarchive/archive_write.c#6 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_set_compression_bzip2.c#5 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_set_compression_gzip.c#6 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_set_compression_none.c#5 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_set_format_cpio.c#4 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_set_format_pax.c#6 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_set_format_shar.c#5 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_set_format_ustar.c#5 integrate .. //depot/projects/ia64/lib/libbegemot/Makefile#2 integrate .. //depot/projects/ia64/lib/libc/Makefile#17 integrate .. //depot/projects/ia64/lib/libc/arm/Makefile.inc#1 branch .. //depot/projects/ia64/lib/libc/arm/SYS.h#2 integrate .. //depot/projects/ia64/lib/libc/arm/gen/_ctx_start.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/gen/_setjmp.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/gen/alloca.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/gen/divsi3.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/gen/makecontext.c#2 integrate .. //depot/projects/ia64/lib/libc/arm/gen/setjmp.S#3 integrate .. //depot/projects/ia64/lib/libc/arm/gen/signalcontext.c#2 integrate .. //depot/projects/ia64/lib/libc/arm/gen/sigsetjmp.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/string/ffs.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/string/memcmp.S#3 integrate .. //depot/projects/ia64/lib/libc/arm/string/memmove.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/string/memset.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/string/strcmp.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/string/strncmp.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/sys/Makefile.inc#2 integrate .. //depot/projects/ia64/lib/libc/arm/sys/brk.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/sys/cerror.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/sys/fork.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/sys/getcontext.S#2 delete .. //depot/projects/ia64/lib/libc/arm/sys/pipe.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/sys/ptrace.S#2 integrate .. //depot/projects/ia64/lib/libc/arm/sys/sbrk.S#2 integrate .. //depot/projects/ia64/lib/libc/gen/Makefile.inc#29 integrate .. //depot/projects/ia64/lib/libc/gen/getnetgrent.c#7 integrate .. //depot/projects/ia64/lib/libc/gen/ntp_gettime.c#3 delete .. //depot/projects/ia64/lib/libc/gen/syslog.c#10 integrate .. //depot/projects/ia64/lib/libc/i386/gen/_set_tp.c#2 integrate .. //depot/projects/ia64/lib/libc/i386/net/htonl.S#5 integrate .. //depot/projects/ia64/lib/libc/i386/net/ntohl.S#5 integrate .. //depot/projects/ia64/lib/libc/i386/sys/Makefile.inc#7 integrate .. //depot/projects/ia64/lib/libc/i386/sys/_amd64_get_fsbase.c#1 branch .. //depot/projects/ia64/lib/libc/i386/sys/_amd64_get_gsbase.c#1 branch .. //depot/projects/ia64/lib/libc/i386/sys/_amd64_set_fsbase.c#1 branch .. //depot/projects/ia64/lib/libc/i386/sys/_amd64_set_gsbase.c#1 branch .. //depot/projects/ia64/lib/libc/net/rcmd.c#5 integrate .. //depot/projects/ia64/lib/libc/posix1e/mac.conf.5#4 integrate .. //depot/projects/ia64/lib/libc/regex/engine.c#5 integrate .. //depot/projects/ia64/lib/libc/rpc/netnamer.c#5 integrate .. //depot/projects/ia64/lib/libc/stdlib/rand.3#4 integrate .. //depot/projects/ia64/lib/libc/stdtime/strftime.3#9 integrate .. //depot/projects/ia64/lib/libc/stdtime/strftime.c#7 integrate .. //depot/projects/ia64/lib/libc/sys/read.2#10 integrate .. //depot/projects/ia64/lib/libc/sys/stat.2#11 integrate .. //depot/projects/ia64/lib/libdisk/chunk.c#15 integrate .. //depot/projects/ia64/lib/libdisk/disk.c#24 integrate .. //depot/projects/ia64/lib/libdisk/open_disk.c#6 integrate .. //depot/projects/ia64/lib/libkvm/kvm_getprocs.3#7 integrate .. //depot/projects/ia64/lib/libkvm/kvm_proc.c#26 integrate .. //depot/projects/ia64/lib/libmagic/Makefile#3 integrate .. //depot/projects/ia64/lib/libpam/modules/pam_unix/Makefile#8 integrate .. //depot/projects/ia64/lib/libpthread/arch/amd64/amd64/pthread_md.c#4 integrate .. //depot/projects/ia64/lib/libpthread/arch/arm/arm/context.S#2 integrate .. //depot/projects/ia64/lib/libpthread/arch/arm/arm/pthread_md.c#3 integrate .. //depot/projects/ia64/lib/libpthread/arch/arm/include/atomic_ops.h#2 integrate .. //depot/projects/ia64/lib/libpthread/arch/arm/include/pthread_md.h#4 integrate .. //depot/projects/ia64/lib/libpthread/arch/i386/i386/pthread_md.c#3 integrate .. //depot/projects/ia64/lib/libpthread/arch/i386/include/pthread_md.h#9 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mutex.c#15 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_private.h#34 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#29 integrate .. //depot/projects/ia64/lib/librpcsvc/Makefile#5 integrate .. //depot/projects/ia64/lib/libthr/arch/i386/i386/_setcurthread.c#13 integrate .. //depot/projects/ia64/lib/libwrap/Makefile#7 integrate .. //depot/projects/ia64/lib/libxpg4/Makefile#4 delete .. //depot/projects/ia64/lib/libxpg4/fakelib.c#3 delete .. //depot/projects/ia64/libexec/Makefile#23 integrate .. //depot/projects/ia64/libexec/ftpd/ftpcmd.y#20 integrate .. //depot/projects/ia64/libexec/ftpd/ftpd.c#30 integrate .. //depot/projects/ia64/libexec/ftpd/logwtmp.c#5 integrate .. //depot/projects/ia64/libexec/ftpd/popen.c#5 integrate .. //depot/projects/ia64/libexec/rtld-aout/Makefile#2 integrate .. //depot/projects/ia64/libexec/rtld-elf/Makefile#13 integrate .. //depot/projects/ia64/libexec/rtld-elf/alpha/lockdflt.c#3 delete .. //depot/projects/ia64/libexec/rtld-elf/amd64/lockdflt.c#3 delete .. //depot/projects/ia64/libexec/rtld-elf/arm/lockdflt.c#2 delete .. //depot/projects/ia64/libexec/rtld-elf/arm/rtld_machdep.h#3 integrate .. //depot/projects/ia64/libexec/rtld-elf/i386/lockdflt.c#5 delete .. //depot/projects/ia64/libexec/rtld-elf/i386/reloc.c#6 integrate .. //depot/projects/ia64/libexec/rtld-elf/ia64/lockdflt.c#3 delete .. //depot/projects/ia64/libexec/rtld-elf/powerpc/lockdflt.c#2 delete .. //depot/projects/ia64/libexec/rtld-elf/powerpc/reloc.c#5 integrate .. //depot/projects/ia64/libexec/rtld-elf/powerpc/rtld_machdep.h#4 integrate .. //depot/projects/ia64/libexec/rtld-elf/rtld.c#28 integrate .. //depot/projects/ia64/libexec/rtld-elf/rtld_lock.c#3 integrate .. //depot/projects/ia64/libexec/rtld-elf/sparc64/lockdflt.c#4 delete .. //depot/projects/ia64/release/Makefile#86 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml#31 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#85 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/i386/proc-i386.sgml#10 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/pc98/proc-pc98.sgml#4 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#146 integrate .. //depot/projects/ia64/release/doc/ja_JP.eucJP/hardware/common/dev.sgml#21 integrate .. //depot/projects/ia64/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml#7 integrate .. //depot/projects/ia64/release/doc/share/misc/dev.archlist.txt#6 integrate .. //depot/projects/ia64/release/doc/share/sgml/release.ent#17 integrate .. //depot/projects/ia64/release/picobsd/bridge/PICOBSD#5 integrate .. //depot/projects/ia64/release/picobsd/floppy.tree/etc/ppp/ppp.conf#2 integrate .. //depot/projects/ia64/release/picobsd/mfs_tree/etc/remote#2 integrate .. //depot/projects/ia64/release/picobsd/tinyware/login/Makefile#3 integrate .. //depot/projects/ia64/rescue/librescue/Makefile#5 integrate .. //depot/projects/ia64/rescue/rescue/Makefile#20 integrate .. //depot/projects/ia64/sbin/Makefile#41 integrate .. //depot/projects/ia64/sbin/ccdconfig/ccdconfig.8#12 integrate .. //depot/projects/ia64/sbin/comcontrol/comcontrol.8#5 integrate .. //depot/projects/ia64/sbin/devfs/devfs.8#8 integrate .. //depot/projects/ia64/sbin/devfs/rule.c#4 integrate .. //depot/projects/ia64/sbin/fdisk/fdisk.c#22 integrate .. //depot/projects/ia64/sbin/geom/class/concat/gconcat.8#3 integrate .. //depot/projects/ia64/sbin/geom/class/label/glabel.8#2 integrate .. //depot/projects/ia64/sbin/geom/class/mirror/gmirror.8#3 integrate .. //depot/projects/ia64/sbin/geom/class/nop/gnop.8#3 integrate .. //depot/projects/ia64/sbin/geom/class/raid3/graid3.8#3 integrate .. //depot/projects/ia64/sbin/geom/class/stripe/gstripe.8#4 integrate .. //depot/projects/ia64/sbin/geom/core/geom.8#4 integrate .. //depot/projects/ia64/sbin/gpt/create.c#7 integrate .. //depot/projects/ia64/sbin/gpt/gpt.8#4 integrate .. //depot/projects/ia64/sbin/gpt/migrate.c#10 integrate .. //depot/projects/ia64/sbin/gvinum/gvinum.c#2 integrate .. //depot/projects/ia64/sbin/ifconfig/ifconfig.8#26 integrate .. //depot/projects/ia64/sbin/init/Makefile#5 integrate .. //depot/projects/ia64/sbin/ipfw/ipfw.8#39 integrate .. //depot/projects/ia64/sbin/ipfw/ipfw2.c#39 integrate .. //depot/projects/ia64/sbin/mdconfig/mdconfig.8#16 integrate .. //depot/projects/ia64/sbin/mdconfig/mdconfig.c#17 integrate .. //depot/projects/ia64/sbin/mount/getmntopts.c#5 integrate .. //depot/projects/ia64/sbin/mount/mntopts.h#6 integrate .. //depot/projects/ia64/sbin/mount_cd9660/mount_cd9660.8#10 integrate .. //depot/projects/ia64/sbin/mount_cd9660/mount_cd9660.c#9 integrate .. //depot/projects/ia64/sbin/mount_ufs/Makefile#1 branch .. //depot/projects/ia64/sbin/mount_ufs/mount_ufs.c#1 branch .. //depot/projects/ia64/sbin/route/route.8#9 integrate .. //depot/projects/ia64/sbin/slattach/slattach.8#6 integrate .. //depot/projects/ia64/sbin/vinum/Makefile#5 delete .. //depot/projects/ia64/sbin/vinum/commands.c#15 delete .. //depot/projects/ia64/sbin/vinum/list.c#9 delete .. //depot/projects/ia64/sbin/vinum/v.c#8 delete .. //depot/projects/ia64/sbin/vinum/vext.h#8 delete .. //depot/projects/ia64/sbin/vinum/vinum.8#15 delete .. //depot/projects/ia64/secure/lib/libssh/Makefile#14 integrate .. //depot/projects/ia64/secure/usr.sbin/sshd/Makefile#18 integrate .. //depot/projects/ia64/share/examples/etc/make.conf#43 integrate .. //depot/projects/ia64/share/examples/netgraph/bluetooth/rc.bluetooth#2 integrate .. //depot/projects/ia64/share/examples/ppp/ppp.conf.sample#6 integrate .. //depot/projects/ia64/share/examples/ppp/ppp.conf.span-isp#3 integrate .. //depot/projects/ia64/share/examples/pppd/options.sample#2 integrate .. //depot/projects/ia64/share/examples/startslip/slip.sh#2 integrate .. //depot/projects/ia64/share/man/man4/Makefile#76 integrate .. //depot/projects/ia64/share/man/man4/acpi_video.4#3 integrate .. //depot/projects/ia64/share/man/man4/altq.4#2 integrate .. //depot/projects/ia64/share/man/man4/amr.4#8 integrate .. //depot/projects/ia64/share/man/man4/ath.4#19 integrate .. //depot/projects/ia64/share/man/man4/dc.4#10 integrate .. //depot/projects/ia64/share/man/man4/em.4#11 integrate .. //depot/projects/ia64/share/man/man4/fxp.4#10 integrate .. //depot/projects/ia64/share/man/man4/gdb.4#3 integrate .. //depot/projects/ia64/share/man/man4/gx.4#8 delete .. //depot/projects/ia64/share/man/man4/hptmv.4#1 branch .. //depot/projects/ia64/share/man/man4/ixgb.4#4 integrate .. //depot/projects/ia64/share/man/man4/man4.i386/acpi_asus.4#3 integrate .. //depot/projects/ia64/share/man/man4/man4.i386/acpi_panasonic.4#2 integrate .. //depot/projects/ia64/share/man/man4/miibus.4#7 integrate .. //depot/projects/ia64/share/man/man4/mouse.4#3 integrate .. //depot/projects/ia64/share/man/man4/ng_one2many.4#7 integrate .. //depot/projects/ia64/share/man/man4/ngatmbase.4#1 branch .. //depot/projects/ia64/share/man/man4/nge.4#7 integrate .. //depot/projects/ia64/share/man/man4/pcn.4#6 integrate .. //depot/projects/ia64/share/man/man4/polling.4#13 integrate .. //depot/projects/ia64/share/man/man4/re.4#9 integrate .. //depot/projects/ia64/share/man/man4/rl.4#12 integrate .. //depot/projects/ia64/share/man/man4/route.4#7 integrate .. //depot/projects/ia64/share/man/man4/sf.4#4 integrate .. //depot/projects/ia64/share/man/man4/sis.4#6 integrate .. //depot/projects/ia64/share/man/man4/sk.4#7 integrate .. //depot/projects/ia64/share/man/man4/ste.4#6 integrate .. //depot/projects/ia64/share/man/man4/tcp.4#20 integrate .. //depot/projects/ia64/share/man/man4/uftdi.4#4 integrate .. //depot/projects/ia64/share/man/man4/vge.4#3 integrate .. //depot/projects/ia64/share/man/man4/vinumdebug.4#2 delete .. //depot/projects/ia64/share/man/man4/vkbd.4#1 branch .. //depot/projects/ia64/share/man/man4/vlan.4#9 integrate .. //depot/projects/ia64/share/man/man4/vr.4#7 integrate .. //depot/projects/ia64/share/man/man4/witness.4#4 integrate .. //depot/projects/ia64/share/man/man5/core.5#6 integrate .. //depot/projects/ia64/share/man/man5/make.conf.5#49 integrate .. //depot/projects/ia64/share/man/man5/periodic.conf.5#15 integrate .. //depot/projects/ia64/share/man/man5/rc.conf.5#57 integrate .. //depot/projects/ia64/share/man/man5/remote.5#5 integrate .. //depot/projects/ia64/share/man/man7/ports.7#13 integrate .. //depot/projects/ia64/share/man/man7/tuning.7#23 integrate .. //depot/projects/ia64/share/man/man9/Makefile#47 integrate .. //depot/projects/ia64/share/man/man9/condvar.9#6 integrate .. //depot/projects/ia64/share/man/man9/get_cyclecount.9#2 integrate .. //depot/projects/ia64/share/man/man9/mbuf_tags.9#3 integrate .. //depot/projects/ia64/share/man/man9/psignal.9#2 integrate .. //depot/projects/ia64/share/man/man9/signal.9#7 integrate .. //depot/projects/ia64/share/misc/bsd-family-tree#21 integrate .. //depot/projects/ia64/share/mk/bsd.cpu.mk#25 integrate .. //depot/projects/ia64/share/mk/bsd.libnames.mk#27 integrate .. //depot/projects/ia64/share/mk/bsd.prog.mk#21 integrate .. //depot/projects/ia64/share/mk/sys.mk#18 integrate .. //depot/projects/ia64/share/numericdef/eu_ES.ISO8859-1.src#2 integrate .. //depot/projects/ia64/sys/alpha/alpha/db_trace.c#10 integrate .. //depot/projects/ia64/sys/alpha/alpha/genassym.c#11 integrate .. //depot/projects/ia64/sys/alpha/alpha/interrupt.c#18 integrate .. //depot/projects/ia64/sys/alpha/alpha/machdep.c#45 integrate .. //depot/projects/ia64/sys/alpha/alpha/mp_machdep.c#19 integrate .. //depot/projects/ia64/sys/alpha/conf/GENERIC#32 integrate .. //depot/projects/ia64/sys/alpha/conf/NOTES#9 integrate .. //depot/projects/ia64/sys/alpha/include/param.h#10 integrate .. //depot/projects/ia64/sys/alpha/include/pcpu.h#3 integrate .. //depot/projects/ia64/sys/alpha/include/smp.h#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/busdma_machdep.c#12 integrate .. //depot/projects/ia64/sys/amd64/amd64/db_trace.c#8 integrate .. //depot/projects/ia64/sys/amd64/amd64/genassym.c#12 integrate .. //depot/projects/ia64/sys/amd64/amd64/intr_machdep.c#4 integrate .. //depot/projects/ia64/sys/amd64/amd64/machdep.c#26 integrate .. //depot/projects/ia64/sys/amd64/amd64/mp_machdep.c#11 integrate .. //depot/projects/ia64/sys/amd64/conf/GENERIC#21 integrate .. //depot/projects/ia64/sys/amd64/include/param.h#11 integrate .. //depot/projects/ia64/sys/amd64/pci/pci_bus.c#11 integrate .. //depot/projects/ia64/sys/arm/arm/bcopy_page.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/bcopyinout.S#3 integrate .. //depot/projects/ia64/sys/arm/arm/bcopyinout_xscale.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/blockio.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/bus_space_asm_generic.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/busdma_machdep.c#6 integrate .. //depot/projects/ia64/sys/arm/arm/copystr.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc.c#4 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_arm3.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_arm67.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_arm7tdmi.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_arm8.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_arm9.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_armv4.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_ixp12x0.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_sa1.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_sa11x0.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/cpufunc_asm_xscale.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/critical.c#2 integrate .. //depot/projects/ia64/sys/arm/arm/db_interface.c#3 integrate .. //depot/projects/ia64/sys/arm/arm/db_trace.c#5 integrate .. //depot/projects/ia64/sys/arm/arm/elf_machdep.c#4 integrate .. //depot/projects/ia64/sys/arm/arm/exception.S#4 integrate .. //depot/projects/ia64/sys/arm/arm/fiq_subr.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/fusu.S#3 integrate .. //depot/projects/ia64/sys/arm/arm/genassym.c#3 integrate .. //depot/projects/ia64/sys/arm/arm/identcpu.c#3 integrate .. //depot/projects/ia64/sys/arm/arm/in_cksum_arm.S#3 integrate .. //depot/projects/ia64/sys/arm/arm/intr.c#4 integrate .. //depot/projects/ia64/sys/arm/arm/irq_dispatch.S#3 integrate .. //depot/projects/ia64/sys/arm/arm/locore.S#5 integrate .. //depot/projects/ia64/sys/arm/arm/machdep.c#4 integrate .. //depot/projects/ia64/sys/arm/arm/mem.c#1 branch .. //depot/projects/ia64/sys/arm/arm/nexus_io_asm.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/pmap.c#5 integrate .. //depot/projects/ia64/sys/arm/arm/setcpsr.S#2 integrate .. //depot/projects/ia64/sys/arm/arm/support.S#4 integrate .. //depot/projects/ia64/sys/arm/arm/swtch.S#4 integrate .. //depot/projects/ia64/sys/arm/arm/trap.c#3 integrate .. //depot/projects/ia64/sys/arm/arm/undefined.c#2 integrate .. //depot/projects/ia64/sys/arm/arm/vm_machdep.c#4 integrate .. //depot/projects/ia64/sys/arm/conf/IQ31244#3 integrate .. //depot/projects/ia64/sys/arm/conf/SIMICS#4 integrate .. //depot/projects/ia64/sys/arm/include/asm.h#3 integrate .. //depot/projects/ia64/sys/arm/include/atomic.h#2 integrate .. //depot/projects/ia64/sys/arm/include/cpu.h#3 integrate .. //depot/projects/ia64/sys/arm/include/cpuconf.h#2 integrate .. //depot/projects/ia64/sys/arm/include/cpufunc.h#3 integrate .. //depot/projects/ia64/sys/arm/include/db_machdep.h#3 integrate .. //depot/projects/ia64/sys/arm/include/endian.h#6 integrate .. //depot/projects/ia64/sys/arm/include/kdb.h#2 integrate .. //depot/projects/ia64/sys/arm/include/memdev.h#1 branch .. //depot/projects/ia64/sys/arm/include/param.h#6 integrate .. //depot/projects/ia64/sys/arm/include/pcpu.h#2 integrate .. //depot/projects/ia64/sys/arm/include/pmap.h#4 integrate .. //depot/projects/ia64/sys/arm/include/reg.h#2 integrate .. //depot/projects/ia64/sys/arm/sa11x0/assabet_machdep.c#6 integrate .. //depot/projects/ia64/sys/arm/xscale/i80321/i80321.c#2 integrate .. //depot/projects/ia64/sys/arm/xscale/i80321/iq31244_machdep.c#2 integrate .. //depot/projects/ia64/sys/arm/xscale/i80321/std.i80321#2 integrate .. //depot/projects/ia64/sys/arm/xscale/i80321/std.iq31244#2 integrate .. //depot/projects/ia64/sys/arm/xscale/i80321/uart_bus_i80321.c#2 integrate .. //depot/projects/ia64/sys/arm/xscale/i80321/uart_cpu_i80321.c#2 integrate .. //depot/projects/ia64/sys/boot/Makefile#13 integrate .. //depot/projects/ia64/sys/boot/common/commands.c#6 integrate .. //depot/projects/ia64/sys/boot/efi/Makefile#2 integrate .. //depot/projects/ia64/sys/boot/efi/libefi/arch/ia64/ldscript.ia64#5 delete .. //depot/projects/ia64/sys/boot/efi/libefi/arch/ia64/start.S#7 delete .. //depot/projects/ia64/sys/boot/efi/loader/Makefile#17 delete .. //depot/projects/ia64/sys/boot/efi/loader/conf.c#8 delete .. //depot/projects/ia64/sys/boot/efi/loader/main.c#21 delete .. //depot/projects/ia64/sys/boot/efi/loader/version#7 delete .. //depot/projects/ia64/sys/boot/forth/beastie.4th#7 integrate .. //depot/projects/ia64/sys/boot/forth/loader.conf#24 integrate .. //depot/projects/ia64/sys/boot/forth/loader.conf.5#9 integrate .. //depot/projects/ia64/sys/boot/i386/boot0/boot0.S#4 integrate .. //depot/projects/ia64/sys/boot/i386/btx/btx/btx.S#4 integrate .. //depot/projects/ia64/sys/boot/i386/libi386/biossmap.c#3 integrate .. //depot/projects/ia64/sys/boot/ia64/Makefile#3 integrate .. //depot/projects/ia64/sys/boot/ia64/efi/Makefile#1 branch .. //depot/projects/ia64/sys/boot/ia64/efi/conf.c#1 branch .. //depot/projects/ia64/sys/boot/ia64/efi/ldscript.ia64#1 branch .. //depot/projects/ia64/sys/boot/ia64/efi/main.c#1 branch .. //depot/projects/ia64/sys/boot/ia64/efi/start.S#1 branch .. //depot/projects/ia64/sys/boot/ia64/efi/version#1 branch .. //depot/projects/ia64/sys/cam/cam_xpt.c#21 integrate .. //depot/projects/ia64/sys/coda/coda_vnops.c#14 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_proto.h#9 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_syscall.h#9 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_syscalls.c#9 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_sysent.c#9 integrate .. //depot/projects/ia64/sys/compat/freebsd32/syscalls.master#9 integrate .. //depot/projects/ia64/sys/compat/linprocfs/linprocfs.c#32 integrate .. //depot/projects/ia64/sys/compat/linux/linux_file.c#20 integrate .. //depot/projects/ia64/sys/compat/pecoff/imgact_pecoff.c#19 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_filio.c#16 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_misc.c#29 integrate .. //depot/projects/ia64/sys/conf/NOTES#84 integrate .. //depot/projects/ia64/sys/conf/files#121 integrate .. //depot/projects/ia64/sys/conf/files.alpha#29 integrate .. //depot/projects/ia64/sys/conf/files.amd64#23 integrate .. //depot/projects/ia64/sys/conf/files.arm#2 integrate .. //depot/projects/ia64/sys/conf/files.i386#58 integrate .. //depot/projects/ia64/sys/conf/files.ia64#57 integrate .. //depot/projects/ia64/sys/conf/files.pc98#48 integrate .. //depot/projects/ia64/sys/conf/files.sparc64#41 integrate .. //depot/projects/ia64/sys/conf/kern.post.mk#47 integrate .. //depot/projects/ia64/sys/conf/kmod.mk#37 integrate .. //depot/projects/ia64/sys/conf/options#80 integrate .. //depot/projects/ia64/sys/conf/options.arm#3 integrate .. //depot/projects/ia64/sys/conf/options.i386#30 integrate .. //depot/projects/ia64/sys/conf/options.pc98#29 integrate .. //depot/projects/ia64/sys/contrib/pf/net/pf.c#9 integrate .. //depot/projects/ia64/sys/contrib/pf/net/pf_if.c#3 integrate .. //depot/projects/ia64/sys/crypto/blowfish/arch/i386/bf_enc.S#2 integrate .. //depot/projects/ia64/sys/ddb/db_command.c#18 integrate .. //depot/projects/ia64/sys/ddb/db_output.c#7 integrate .. //depot/projects/ia64/sys/ddb/db_ps.c#27 integrate .. //depot/projects/ia64/sys/ddb/db_run.c#6 integrate .. //depot/projects/ia64/sys/ddb/db_thread.c#2 integrate .. //depot/projects/ia64/sys/ddb/db_variables.c#5 integrate .. //depot/projects/ia64/sys/ddb/ddb.h#11 integrate .. //depot/projects/ia64/sys/dev/aac/aac.c#42 integrate .. //depot/projects/ia64/sys/dev/acpi_support/acpi_asus.c#1 branch .. //depot/projects/ia64/sys/dev/acpi_support/acpi_panasonic.c#1 branch .. //depot/projects/ia64/sys/dev/acpi_support/acpi_sony.c#1 branch .. //depot/projects/ia64/sys/dev/acpi_support/acpi_toshiba.c#1 branch .. //depot/projects/ia64/sys/dev/acpica/acpi_cpu.c#20 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_pci_link.c#19 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_pcib.c#26 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_pcib_acpi.c#15 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_pcib_pci.c#8 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_pcibvar.h#4 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_timer.c#21 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_video.c#5 integrate .. //depot/projects/ia64/sys/dev/aha/aha_isa.c#8 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic79xx.c#21 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic79xx.h#18 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic7xxx.c#19 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic_osm_lib.h#4 integrate .. //depot/projects/ia64/sys/dev/ata/ata-all.c#57 integrate .. //depot/projects/ia64/sys/dev/ata/ata-card.c#22 integrate .. //depot/projects/ia64/sys/dev/ata/ata-dma.c#37 integrate .. //depot/projects/ia64/sys/dev/ata/ata-lowlevel.c#24 integrate .. //depot/projects/ia64/sys/dev/bge/if_bge.c#55 integrate .. //depot/projects/ia64/sys/dev/bge/if_bgereg.h#27 integrate .. //depot/projects/ia64/sys/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/ia64/sys/dev/ed/if_ed.c#21 integrate .. //depot/projects/ia64/sys/dev/ed/if_ed_cbus.c#10 integrate .. //depot/projects/ia64/sys/dev/em/if_em.c#40 integrate .. //depot/projects/ia64/sys/dev/em/if_em.h#25 integrate .. //depot/projects/ia64/sys/dev/esp/esp_sbus.c#3 integrate .. //depot/projects/ia64/sys/dev/esp/lsi64854.c#2 delete .. //depot/projects/ia64/sys/dev/esp/lsi64854reg.h#2 delete .. //depot/projects/ia64/sys/dev/esp/lsi64854var.h#2 delete .. //depot/projects/ia64/sys/dev/fdc/fdc.c#10 integrate .. //depot/projects/ia64/sys/dev/firewire/fwmem.c#21 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxp.c#53 integrate .. //depot/projects/ia64/sys/dev/gx/if_gx.c#16 delete .. //depot/projects/ia64/sys/dev/gx/if_gxreg.h#2 delete .. //depot/projects/ia64/sys/dev/gx/if_gxvar.h#5 delete .. //depot/projects/ia64/sys/dev/hme/if_hme.c#20 integrate .. //depot/projects/ia64/sys/dev/hme/if_hme_pci.c#15 integrate .. //depot/projects/ia64/sys/dev/hme/if_hme_sbus.c#12 integrate .. //depot/projects/ia64/sys/dev/hme/if_hmevar.h#6 integrate .. //depot/projects/ia64/sys/dev/ic/ns16550.h#5 integrate .. //depot/projects/ia64/sys/dev/ic/sab82532.h#1 branch .. //depot/projects/ia64/sys/dev/ic/z8530.h#1 branch .. //depot/projects/ia64/sys/dev/lge/if_lge.c#21 integrate .. //depot/projects/ia64/sys/dev/mc146818/mc146818.c#1 branch .. //depot/projects/ia64/sys/dev/mc146818/mc146818reg.h#1 branch .. //depot/projects/ia64/sys/dev/mc146818/mc146818var.h#1 branch .. //depot/projects/ia64/sys/dev/mcd/mcd.c#11 integrate .. //depot/projects/ia64/sys/dev/md/md.c#47 integrate .. //depot/projects/ia64/sys/dev/mii/mii.c#11 integrate .. //depot/projects/ia64/sys/dev/mk48txx/mk48txx.c#5 integrate .. //depot/projects/ia64/sys/dev/mk48txx/mk48txxreg.h#3 integrate .. //depot/projects/ia64/sys/dev/mk48txx/mk48txxvar.h#1 branch .. //depot/projects/ia64/sys/dev/mlx/mlx_disk.c#10 integrate .. //depot/projects/ia64/sys/dev/mlx/mlxreg.h#3 integrate .. //depot/projects/ia64/sys/dev/nge/if_nge.c#31 integrate .. //depot/projects/ia64/sys/dev/pbio/pbio.c#2 integrate .. //depot/projects/ia64/sys/dev/pci/pci.c#42 integrate .. //depot/projects/ia64/sys/dev/puc/puc_sbus.c#5 integrate .. //depot/projects/ia64/sys/dev/random/randomdev_soft.c#4 integrate .. //depot/projects/ia64/sys/dev/scd/scd.c#9 integrate .. //depot/projects/ia64/sys/dev/snp/snp.c#21 integrate .. //depot/projects/ia64/sys/dev/sound/pci/maestro.c#12 integrate .. //depot/projects/ia64/sys/dev/sound/pci/maestro_reg.h#2 integrate .. //depot/projects/ia64/sys/dev/streams/streams.c#16 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus.h#7 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_isa.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_core.c#9 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu.h#7 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_alpha.c#7 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_amd64.c#7 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_i386.c#7 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_ia64.c#7 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_pc98.c#9 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_sparc64.c#11 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_i8251.c#4 delete .. //depot/projects/ia64/sys/dev/uart/uart_dev_i8251.h#2 delete .. //depot/projects/ia64/sys/dev/uart/uart_dev_ns8250.c#8 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_ns8250.h#2 delete .. //depot/projects/ia64/sys/dev/uart/uart_dev_sab82532.c#8 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_sab82532.h#2 delete .. //depot/projects/ia64/sys/dev/uart/uart_dev_z8530.c#8 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_z8530.h#2 delete .. //depot/projects/ia64/sys/dev/uart/uart_subr.c#2 integrate .. //depot/projects/ia64/sys/dev/usb/ehci.c#7 integrate .. //depot/projects/ia64/sys/dev/usb/ehcireg.h#4 integrate .. //depot/projects/ia64/sys/dev/usb/ehcivar.h#3 integrate .. //depot/projects/ia64/sys/dev/usb/ohci.c#25 integrate .. //depot/projects/ia64/sys/dev/usb/uftdi.c#14 integrate .. //depot/projects/ia64/sys/dev/usb/uhci.c#26 integrate .. //depot/projects/ia64/sys/dev/usb/uhub.c#12 integrate .. //depot/projects/ia64/sys/dev/usb/umass.c#41 integrate .. //depot/projects/ia64/sys/dev/usb/usb_port.h#19 integrate .. //depot/projects/ia64/sys/dev/usb/usb_subr.c#21 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs#62 integrate .. //depot/projects/ia64/sys/dev/usb/usbdivar.h#11 integrate .. //depot/projects/ia64/sys/dev/vinum/COPYRIGHT#2 delete .. //depot/projects/ia64/sys/dev/vinum/makestatetext#2 delete .. //depot/projects/ia64/sys/dev/vinum/request.h#3 delete .. //depot/projects/ia64/sys/dev/vinum/statetexts.h#2 delete .. //depot/projects/ia64/sys/dev/vinum/vinum.c#17 delete .. //depot/projects/ia64/sys/dev/vinum/vinumconfig.c#20 delete .. //depot/projects/ia64/sys/dev/vinum/vinumdaemon.c#8 delete .. //depot/projects/ia64/sys/dev/vinum/vinumext.h#13 delete .. //depot/projects/ia64/sys/dev/vinum/vinumhdr.h#8 delete .. //depot/projects/ia64/sys/dev/vinum/vinuminterrupt.c#8 delete .. //depot/projects/ia64/sys/dev/vinum/vinumio.c#24 delete .. //depot/projects/ia64/sys/dev/vinum/vinumio.h#4 delete .. //depot/projects/ia64/sys/dev/vinum/vinumioctl.c#18 delete .. //depot/projects/ia64/sys/dev/vinum/vinumkw.h#5 delete .. //depot/projects/ia64/sys/dev/vinum/vinumlock.c#6 delete .. //depot/projects/ia64/sys/dev/vinum/vinummemory.c#9 delete .. //depot/projects/ia64/sys/dev/vinum/vinumobj.h#8 delete .. //depot/projects/ia64/sys/dev/vinum/vinumparser.c#7 delete .. //depot/projects/ia64/sys/dev/vinum/vinumraid5.c#4 delete .. //depot/projects/ia64/sys/dev/vinum/vinumrequest.c#17 delete .. //depot/projects/ia64/sys/dev/vinum/vinumrevive.c#12 delete .. //depot/projects/ia64/sys/dev/vinum/vinumstate.c#5 delete .. //depot/projects/ia64/sys/dev/vinum/vinumstate.h#2 delete .. //depot/projects/ia64/sys/dev/vinum/vinumutil.c#6 delete .. //depot/projects/ia64/sys/dev/vinum/vinumutil.h#2 delete .. //depot/projects/ia64/sys/dev/vinum/vinumvar.h#7 delete .. //depot/projects/ia64/sys/dev/vkbd/vkbd.c#1 branch .. //depot/projects/ia64/sys/dev/vkbd/vkbd_var.h#1 branch .. //depot/projects/ia64/sys/fs/autofs/autofs.h#2 delete .. //depot/projects/ia64/sys/fs/autofs/autofs_util.c#2 delete .. //depot/projects/ia64/sys/fs/autofs/autofs_vfsops.c#2 delete .. //depot/projects/ia64/sys/fs/autofs/autofs_vnops.c#2 delete .. //depot/projects/ia64/sys/fs/deadfs/dead_vnops.c#10 integrate .. //depot/projects/ia64/sys/fs/devfs/devfs_vfsops.c#15 integrate .. //depot/projects/ia64/sys/fs/devfs/devfs_vnops.c#33 integrate .. //depot/projects/ia64/sys/fs/fdescfs/fdesc_vfsops.c#14 integrate .. //depot/projects/ia64/sys/fs/fdescfs/fdesc_vnops.c#18 integrate .. //depot/projects/ia64/sys/fs/fifofs/fifo_vnops.c#29 integrate .. //depot/projects/ia64/sys/fs/hpfs/hpfs.h#7 integrate .. //depot/projects/ia64/sys/fs/hpfs/hpfs_vfsops.c#18 integrate .. //depot/projects/ia64/sys/fs/hpfs/hpfs_vnops.c#26 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_denode.c#17 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vfsops.c#30 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vnops.c#28 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfsmount.h#10 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs.h#5 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs_subr.c#16 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs_vfsops.c#18 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs_vnops.c#17 integrate .. //depot/projects/ia64/sys/fs/nullfs/null_vfsops.c#13 integrate .. //depot/projects/ia64/sys/fs/nullfs/null_vnops.c#14 integrate .. //depot/projects/ia64/sys/fs/nwfs/nwfs_vfsops.c#14 integrate .. //depot/projects/ia64/sys/fs/portalfs/portal_vfsops.c#15 integrate .. //depot/projects/ia64/sys/fs/smbfs/smbfs_vfsops.c#22 integrate .. //depot/projects/ia64/sys/fs/udf/udf.h#6 integrate .. //depot/projects/ia64/sys/fs/udf/udf_vfsops.c#17 integrate .. //depot/projects/ia64/sys/fs/udf/udf_vnops.c#27 integrate .. //depot/projects/ia64/sys/fs/umapfs/umap_vfsops.c#15 integrate .. //depot/projects/ia64/sys/fs/unionfs/union_subr.c#18 integrate .. //depot/projects/ia64/sys/fs/unionfs/union_vfsops.c#17 integrate .. //depot/projects/ia64/sys/fs/unionfs/union_vnops.c#19 integrate .. //depot/projects/ia64/sys/geom/gate/g_gate.c#5 integrate .. //depot/projects/ia64/sys/geom/geom.h#44 integrate .. //depot/projects/ia64/sys/geom/geom_dev.c#51 integrate .. //depot/projects/ia64/sys/geom/geom_event.c#31 integrate .. //depot/projects/ia64/sys/geom/geom_mbr.c#35 integrate .. //depot/projects/ia64/sys/geom/geom_slice.c#33 integrate .. //depot/projects/ia64/sys/geom/geom_subr.c#43 integrate .. //depot/projects/ia64/sys/geom/geom_vfs.c#1 branch .. //depot/projects/ia64/sys/geom/geom_vfs.h#1 branch .. //depot/projects/ia64/sys/geom/mirror/g_mirror.c#6 integrate .. //depot/projects/ia64/sys/geom/mirror/g_mirror.h#3 integrate .. //depot/projects/ia64/sys/geom/raid3/g_raid3.c#5 integrate .. //depot/projects/ia64/sys/geom/raid3/g_raid3.h#4 integrate .. //depot/projects/ia64/sys/geom/uzip/g_uzip.c#4 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum.c#4 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum.h#4 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_init.c#4 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_plex.c#6 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_raid5.c#5 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_raid5.h#4 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_share.c#3 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_share.h#2 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_state.c#4 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_subr.c#5 integrate .. //depot/projects/ia64/sys/geom/vinum/geom_vinum_var.h#6 integrate .. //depot/projects/ia64/sys/gnu/ext2fs/ext2_bmap.c#8 integrate .. //depot/projects/ia64/sys/gnu/ext2fs/ext2_mount.h#5 integrate .. //depot/projects/ia64/sys/gnu/ext2fs/ext2_vfsops.c#29 integrate .. //depot/projects/ia64/sys/gnu/ext2fs/ext2_vnops.c#24 integrate .. //depot/projects/ia64/sys/i386/acpica/acpi_asus.c#4 delete .. //depot/projects/ia64/sys/i386/acpica/acpi_panasonic.c#3 delete .. //depot/projects/ia64/sys/i386/acpica/acpi_toshiba.c#7 delete .. //depot/projects/ia64/sys/i386/conf/GENERIC#52 integrate .. //depot/projects/ia64/sys/i386/conf/NOTES#59 integrate .. //depot/projects/ia64/sys/i386/i386/autoconf.c#17 integrate .. //depot/projects/ia64/sys/i386/i386/busdma_machdep.c#31 integrate .. //depot/projects/ia64/sys/i386/i386/db_trace.c#16 integrate .. //depot/projects/ia64/sys/i386/i386/genassym.c#22 integrate .. //depot/projects/ia64/sys/i386/i386/identcpu.c#32 integrate .. //depot/projects/ia64/sys/i386/i386/intr_machdep.c#4 integrate .. //depot/projects/ia64/sys/i386/i386/locore.s#19 integrate .. //depot/projects/ia64/sys/i386/i386/machdep.c#57 integrate .. //depot/projects/ia64/sys/i386/i386/mp_machdep.c#39 integrate .. //depot/projects/ia64/sys/i386/i386/pmap.c#81 integrate .. //depot/projects/ia64/sys/i386/i386/support.s#15 integrate .. //depot/projects/ia64/sys/i386/i386/trap.c#44 integrate .. //depot/projects/ia64/sys/i386/i386/vm_machdep.c#39 integrate .. //depot/projects/ia64/sys/i386/include/atomic.h#9 integrate .. //depot/projects/ia64/sys/i386/include/cpu.h#9 integrate .. //depot/projects/ia64/sys/i386/include/endian.h#12 integrate .. //depot/projects/ia64/sys/i386/include/param.h#11 integrate .. //depot/projects/ia64/sys/i386/include/sysarch.h#8 integrate .. //depot/projects/ia64/sys/i386/isa/pbio.c#2 delete .. //depot/projects/ia64/sys/i386/linux/linux_sysvec.c#31 integrate .. //depot/projects/ia64/sys/i386/pci/pci_bus.c#24 integrate .. //depot/projects/ia64/sys/ia64/conf/GENERIC.hints#12 integrate .. //depot/projects/ia64/sys/ia64/ia64/db_trace.c#16 integrate .. //depot/projects/ia64/sys/ia64/ia64/genassym.c#19 integrate .. //depot/projects/ia64/sys/ia64/ia64/machdep.c#112 integrate .. //depot/projects/ia64/sys/ia64/ia64/pmap.c#86 integrate .. //depot/projects/ia64/sys/ia64/include/param.h#12 integrate .. //depot/projects/ia64/sys/ia64/include/pte.h#5 integrate .. //depot/projects/ia64/sys/isa/vga_isa.c#12 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_bmap.c#5 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_node.c#11 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_node.h#7 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_vfsops.c#27 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_vnops.c#24 integrate .. //depot/projects/ia64/sys/isofs/cd9660/iso.h#8 integrate .. //depot/projects/ia64/sys/kern/imgact_aout.c#20 integrate .. //depot/projects/ia64/sys/kern/imgact_shell.c#6 integrate .. //depot/projects/ia64/sys/kern/init_main.c#45 integrate .. //depot/projects/ia64/sys/kern/init_sysent.c#41 integrate .. //depot/projects/ia64/sys/kern/kern_descrip.c#73 integrate .. //depot/projects/ia64/sys/kern/kern_environment.c#11 integrate .. //depot/projects/ia64/sys/kern/kern_event.c#28 integrate .. //depot/projects/ia64/sys/kern/kern_exec.c#68 integrate .. //depot/projects/ia64/sys/kern/kern_fork.c#55 integrate .. //depot/projects/ia64/sys/kern/kern_intr.c#33 integrate .. //depot/projects/ia64/sys/kern/kern_kse.c#7 integrate .. //depot/projects/ia64/sys/kern/kern_ktr.c#19 integrate .. //depot/projects/ia64/sys/kern/kern_mac.c#37 integrate .. //depot/projects/ia64/sys/kern/kern_ntptime.c#12 integrate .. //depot/projects/ia64/sys/kern/kern_physio.c#15 integrate .. //depot/projects/ia64/sys/kern/kern_proc.c#57 integrate .. //depot/projects/ia64/sys/kern/kern_shutdown.c#27 integrate .. //depot/projects/ia64/sys/kern/kern_sig.c#78 integrate .. //depot/projects/ia64/sys/kern/kern_subr.c#30 integrate .. //depot/projects/ia64/sys/kern/kern_switch.c#38 integrate .. //depot/projects/ia64/sys/kern/kern_thr.c#18 integrate .. //depot/projects/ia64/sys/kern/kern_thread.c#84 integrate .. //depot/projects/ia64/sys/kern/sched_ule.c#39 integrate .. //depot/projects/ia64/sys/kern/subr_bus.c#34 integrate .. //depot/projects/ia64/sys/kern/subr_param.c#14 integrate .. //depot/projects/ia64/sys/kern/subr_sleepqueue.c#7 integrate .. //depot/projects/ia64/sys/kern/subr_witness.c#48 integrate .. //depot/projects/ia64/sys/kern/sys_generic.c#34 integrate .. //depot/projects/ia64/sys/kern/sys_pipe.c#49 integrate .. //depot/projects/ia64/sys/kern/sys_socket.c#20 integrate .. //depot/projects/ia64/sys/kern/syscalls.c#42 integrate .. //depot/projects/ia64/sys/kern/syscalls.master#43 integrate .. //depot/projects/ia64/sys/kern/sysv_msg.c#15 integrate .. //depot/projects/ia64/sys/kern/sysv_sem.c#20 integrate .. //depot/projects/ia64/sys/kern/sysv_shm.c#19 integrate .. //depot/projects/ia64/sys/kern/tty.c#40 integrate .. //depot/projects/ia64/sys/kern/uipc_cow.c#16 integrate .. //depot/projects/ia64/sys/kern/uipc_domain.c#14 integrate .. //depot/projects/ia64/sys/kern/uipc_jumbo.c#9 integrate .. //depot/projects/ia64/sys/kern/uipc_socket.c#43 integrate .. //depot/projects/ia64/sys/kern/uipc_syscalls.c#50 integrate .. //depot/projects/ia64/sys/kern/uipc_usrreq.c#34 integrate .. //depot/projects/ia64/sys/kern/vfs_aio.c#45 integrate .. //depot/projects/ia64/sys/kern/vfs_bio.c#74 integrate .. //depot/projects/ia64/sys/kern/vfs_cluster.c#32 integrate .. //depot/projects/ia64/sys/kern/vfs_default.c#33 integrate .. //depot/projects/ia64/sys/kern/vfs_mount.c#34 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#71 integrate .. //depot/projects/ia64/sys/kern/vfs_syscalls.c#61 integrate .. //depot/projects/ia64/sys/kern/vfs_vnops.c#44 integrate .. //depot/projects/ia64/sys/kern/vnode_if.src#18 integrate .. //depot/projects/ia64/sys/libkern/arm/divsi3.S#3 integrate .. //depot/projects/ia64/sys/libkern/arm/ffs.S#2 integrate .. //depot/projects/ia64/sys/modules/Makefile#78 integrate .. //depot/projects/ia64/sys/modules/acpi/Makefile#23 integrate .. //depot/projects/ia64/sys/modules/acpi/acpi_asus/Makefile#3 integrate .. //depot/projects/ia64/sys/modules/acpi/acpi_panasonic/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/acpi/acpi_sony/Makefile#1 branch .. //depot/projects/ia64/sys/modules/acpi/acpi_toshiba/Makefile#3 integrate .. //depot/projects/ia64/sys/modules/autofs/Makefile#2 delete .. //depot/projects/ia64/sys/modules/esp/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/gx/Makefile#2 delete .. //depot/projects/ia64/sys/modules/if_gif/Makefile#4 integrate .. //depot/projects/ia64/sys/modules/sio/Makefile#4 integrate .. //depot/projects/ia64/sys/modules/uart/Makefile#9 integrate .. //depot/projects/ia64/sys/modules/vinum/Makefile#4 delete .. //depot/projects/ia64/sys/modules/vkbd/Makefile#1 branch .. //depot/projects/ia64/sys/net/if.c#38 integrate .. //depot/projects/ia64/sys/net/if.h#18 integrate .. //depot/projects/ia64/sys/net/if_ppp.c#20 integrate .. //depot/projects/ia64/sys/net/if_pppvar.h#6 integrate .. //depot/projects/ia64/sys/net/if_sl.c#15 integrate .. //depot/projects/ia64/sys/net/if_tap.c#25 integrate .. //depot/projects/ia64/sys/net/if_tun.c#26 integrate .. //depot/projects/ia64/sys/net/if_var.h#26 integrate .. //depot/projects/ia64/sys/net/ppp_tty.c#11 integrate .. //depot/projects/ia64/sys/net/raw_usrreq.c#15 integrate .. //depot/projects/ia64/sys/net/rtsock.c#28 integrate .. //depot/projects/ia64/sys/netatalk/ddp_usrreq.c#17 integrate .. //depot/projects/ia64/sys/netatm/atm_aal5.c#10 integrate .. //depot/projects/ia64/sys/netatm/atm_usrreq.c#10 integrate .. //depot/projects/ia64/sys/netgraph/atm/sscop/ng_sscop_cust.h#2 integrate .. //depot/projects/ia64/sys/netgraph/atm/uni/ng_uni_cust.h#3 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#8 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#9 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_main.c#5 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_misc.c#7 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_var.h#5 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c#7 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h#5 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/socket/ng_btsocket.c#8 integrate .. //depot/projects/ia64/sys/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/ia64/sys/netgraph/netgraph.h#9 integrate .. //depot/projects/ia64/sys/netgraph/ng_base.c#19 integrate .. //depot/projects/ia64/sys/netgraph/ng_cisco.c#9 integrate .. //depot/projects/ia64/sys/netgraph/ng_device.c#8 integrate .. //depot/projects/ia64/sys/netgraph/ng_iface.c#14 integrate .. //depot/projects/ia64/sys/netgraph/ng_one2many.c#11 integrate .. //depot/projects/ia64/sys/netgraph/ng_one2many.h#4 integrate .. //depot/projects/ia64/sys/netgraph/ng_pppoe.c#17 integrate .. //depot/projects/ia64/sys/netgraph/ng_socket.c#19 integrate .. //depot/projects/ia64/sys/netgraph/ng_source.c#10 integrate .. //depot/projects/ia64/sys/netinet/in.c#16 integrate .. //depot/projects/ia64/sys/netinet/ip_divert.c#28 integrate .. //depot/projects/ia64/sys/netinet/ip_fastfwd.c#10 integrate .. //depot/projects/ia64/sys/netinet/ip_fw2.c#40 integrate .. //depot/projects/ia64/sys/netinet/raw_ip.c#37 integrate .. //depot/projects/ia64/sys/netinet/tcp.h#7 integrate .. //depot/projects/ia64/sys/netinet/tcp_fsm.h#4 integrate .. //depot/projects/ia64/sys/netinet/tcp_hostcache.c#6 integrate .. //depot/projects/ia64/sys/netinet/tcp_input.c#54 integrate .. //depot/projects/ia64/sys/netinet/tcp_output.c#27 integrate .. //depot/projects/ia64/sys/netinet/tcp_seq.h#7 integrate .. //depot/projects/ia64/sys/netinet/tcp_subr.c#44 integrate .. //depot/projects/ia64/sys/netinet/tcp_syncache.c#32 integrate .. //depot/projects/ia64/sys/netinet/tcp_timer.c#19 integrate .. //depot/projects/ia64/sys/netinet/tcp_usrreq.c#20 integrate .. //depot/projects/ia64/sys/netinet/tcp_var.h#22 integrate .. //depot/projects/ia64/sys/netinet/udp_usrreq.c#33 integrate .. //depot/projects/ia64/sys/netinet6/ah_core.c#8 integrate .. //depot/projects/ia64/sys/netinet6/ipsec.c#18 integrate .. //depot/projects/ia64/sys/netinet6/raw_ip6.c#18 integrate .. //depot/projects/ia64/sys/netinet6/udp6_usrreq.c#21 integrate .. //depot/projects/ia64/sys/netipsec/keysock.c#9 integrate .. //depot/projects/ia64/sys/netipx/ipx_usrreq.c#14 integrate .. //depot/projects/ia64/sys/netipx/spx_usrreq.c#13 integrate .. //depot/projects/ia64/sys/netkey/key.c#22 integrate .. //depot/projects/ia64/sys/netkey/key.h#5 integrate .. //depot/projects/ia64/sys/netkey/keydb.h#5 integrate .. //depot/projects/ia64/sys/netkey/keysock.c#22 integrate .. //depot/projects/ia64/sys/netnatm/natm.c#20 integrate .. //depot/projects/ia64/sys/netsmb/smb_dev.c#17 integrate .. //depot/projects/ia64/sys/nfs4client/nfs4_vfsops.c#8 integrate .. //depot/projects/ia64/sys/nfsclient/nfs_bio.c#29 integrate .. //depot/projects/ia64/sys/nfsclient/nfs_vfsops.c#31 integrate .. //depot/projects/ia64/sys/nfsserver/nfs_serv.c#31 integrate .. //depot/projects/ia64/sys/opencrypto/cryptodev.c#19 integrate .. //depot/projects/ia64/sys/pc98/conf/GENERIC#44 integrate .. //depot/projects/ia64/sys/pc98/conf/NOTES#22 integrate .. //depot/projects/ia64/sys/pc98/i386/machdep.c#47 integrate .. //depot/projects/ia64/sys/pc98/pc98/fd.c#32 integrate .. //depot/projects/ia64/sys/pc98/pc98/wd_cd.c#13 integrate .. //depot/projects/ia64/sys/pci/if_de.c#19 integrate .. //depot/projects/ia64/sys/pci/if_sf.c#24 integrate .. //depot/projects/ia64/sys/pci/if_sfreg.h#3 integrate .. //depot/projects/ia64/sys/pci/if_sk.c#28 integrate .. //depot/projects/ia64/sys/pci/if_skreg.h#6 integrate .. //depot/projects/ia64/sys/pci/if_xl.c#51 integrate .. //depot/projects/ia64/sys/powerpc/conf/GENERIC#26 integrate .. //depot/projects/ia64/sys/powerpc/include/elf.h#6 integrate .. //depot/projects/ia64/sys/powerpc/include/param.h#12 integrate .. //depot/projects/ia64/sys/powerpc/powermac/ata_kauai.c#5 integrate .. //depot/projects/ia64/sys/powerpc/powermac/ata_macio.c#11 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/db_trace.c#6 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/genassym.c#14 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/machdep.c#39 integrate .. //depot/projects/ia64/sys/security/mac/mac_sysv_msg.c#1 branch .. //depot/projects/ia64/sys/security/mac/mac_sysv_sem.c#1 branch .. //depot/projects/ia64/sys/security/mac/mac_sysv_shm.c#1 branch .. //depot/projects/ia64/sys/sparc64/conf/GENERIC#47 integrate .. //depot/projects/ia64/sys/sparc64/conf/NOTES#8 integrate .. //depot/projects/ia64/sys/sparc64/include/eeprom.h#4 integrate .. //depot/projects/ia64/sys/sparc64/include/param.h#11 integrate .. //depot/projects/ia64/sys/sparc64/isa/isa.c#14 integrate .. //depot/projects/ia64/sys/sparc64/sbus/lsi64854.c#2 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/db_trace.c#13 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/eeprom.c#6 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/eeprom_ebus.c#8 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/eeprom_sbus.c#8 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/genassym.c#25 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/machdep.c#54 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/pmap.c#53 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/rtc.c#1 branch .. //depot/projects/ia64/sys/sparc64/sparc64/vm_machdep.c#38 integrate >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Nov 27 00:56:20 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3229816A4D0; Sat, 27 Nov 2004 00:56:20 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A28C16A4CE for ; Sat, 27 Nov 2004 00:56:20 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD4D143D5A for ; Sat, 27 Nov 2004 00:56:19 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAR0uJ0M062737 for ; Sat, 27 Nov 2004 00:56:19 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAR0uJT2062734 for perforce@freebsd.org; Sat, 27 Nov 2004 00:56:19 GMT (envelope-from sam@freebsd.org) Date: Sat, 27 Nov 2004 00:56:19 GMT Message-Id: <200411270056.iAR0uJT2062734@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65912 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 00:56:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=65912 Change 65912 by sam@sam_ebb on 2004/11/27 00:56:04 o correct wme params ie creation o correct wme params ie length check on rx o make beacon space allocation for wpa and wme ie's conditional based on device capabilities Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#18 edit .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#12 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#18 (text+ko) ==== @@ -1551,7 +1551,7 @@ u_int len = frm[1], qosinfo; int i; - if (len < sizeof(struct ieee80211_wme_param)) { + if (len < sizeof(struct ieee80211_wme_param)-2) { IEEE80211_DPRINTF(ic, IEEE80211_MSG_ELEMID | IEEE80211_MSG_WME, "%s: length %u too short\n", __func__, len); return 0; ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#12 (text+ko) ==== @@ -842,7 +842,7 @@ { static const struct ieee80211_wme_info info = { .wme_id = IEEE80211_ELEMID_VENDOR, - .wme_len = sizeof(struct ieee80211_wme_info), + .wme_len = sizeof(struct ieee80211_wme_info) - 2, .wme_oui = { WME_OUI_BYTES }, .wme_type = WME_OUI_TYPE, .wme_subtype = WME_INFO_OUI_SUBTYPE, @@ -868,7 +868,7 @@ /* NB: this works 'cuz a param has an info at the front */ static const struct ieee80211_wme_info param = { .wme_id = IEEE80211_ELEMID_VENDOR, - .wme_len = sizeof(struct ieee80211_wme_param), + .wme_len = sizeof(struct ieee80211_wme_param) - 2, .wme_oui = { WME_OUI_BYTES }, .wme_type = WME_OUI_TYPE, .wme_subtype = WME_PARAM_OUI_SUBTYPE, @@ -879,8 +879,8 @@ memcpy(frm, ¶m, sizeof(param)); frm += __offsetof(struct ieee80211_wme_info, wme_info); *frm++ = wme->wme_bssChanParams.cap_info; /* AC info */ - *frm++ = 0; /* reserved field */ - for (i = 0; i <= WME_NUM_AC; i++) { + *frm++ = 0; /* reserved field */ + for (i = 0; i < WME_NUM_AC; i++) { const struct wmeParams *ac = &wme->wme_bssChanParams.cap_wmeParams[i]; *frm++ = SM(i, WME_PARAM_ACI) @@ -1329,7 +1329,10 @@ + 2 + 4 + ic->ic_tim_len /* DTIM/IBSSPARMS */ + 2 + 1 /* ERP */ + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) - + 2*sizeof(struct ieee80211_ie_wpa) /* WPA 1+2 */ + + (ic->ic_caps & IEEE80211_C_WME ? /* WME */ + sizeof(struct ieee80211_wme_param) : 0) + + (ic->ic_caps & IEEE80211_C_WPA ? /* WPA 1+2 */ + 2*sizeof(struct ieee80211_ie_wpa) : 0) ; m = ieee80211_getmgtframe(&frm, pktlen); if (m == NULL) { From owner-p4-projects@FreeBSD.ORG Sat Nov 27 18:37:41 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0136116A4E5; Sat, 27 Nov 2004 18:37:40 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 949C616A4F5 for ; Sat, 27 Nov 2004 18:37:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2652743D55 for ; Sat, 27 Nov 2004 18:37:40 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iARIbeH3029544 for ; Sat, 27 Nov 2004 18:37:40 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iARIbddl029541 for perforce@freebsd.org; Sat, 27 Nov 2004 18:37:39 GMT (envelope-from sam@freebsd.org) Date: Sat, 27 Nov 2004 18:37:39 GMT Message-Id: <200411271837.iARIbddl029541@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65927 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 18:37:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=65927 Change 65927 by sam@sam_ebb on 2004/11/27 18:37:10 o update stats to reflect current code o remove RID fetch of rssi, it's already in the ath stats block Affected files ... .. //depot/projects/wifi/tools/tools/ath/athstats.c#3 edit Differences ... ==== //depot/projects/wifi/tools/tools/ath/athstats.c#3 (text+ko) ==== @@ -102,13 +102,13 @@ STAT(rxorn, "recv overrun interrupts"); STAT(rxeol, "recv eol interrupts"); STAT(txurn, "txmit underrun interrupts"); + STAT(mib, "mib overflow interrupts"); STAT(intrcoal, "interrupts coalesced"); - STAT(rx_orn, "rx overrun interrupts"); STAT(tx_mgmt, "tx management frames"); STAT(tx_discard, "tx frames discarded prior to association"); + STAT(tx_qstop, "tx stopped 'cuz no xmit buffer"); STAT(tx_encap, "tx encapsulation failed"); STAT(tx_nonode, "tx failed 'cuz no node"); - STAT(tx_qstop, "tx stopped 'cuz no xmit buffer"); STAT(tx_nombuf, "tx failed 'cuz no mbuf"); STAT(tx_nomcl, "tx failed 'cuz no cluster"); STAT(tx_linear, "tx linearized to cluster"); @@ -134,6 +134,7 @@ STAT(rx_badcrypt, "rx failed 'cuz decryption"); STAT(rx_badmic, "rx failed 'cuz MIC failure"); STAT(rx_tooshort, "rx failed 'cuz frame too short"); + STAT(rx_toobig, "rx failed 'cuz frame too large"); STAT(rx_mgt, "rx management frames"); STAT(rx_ctl, "rx control frames"); STAT(rx_phyerr, "rx failed 'cuz of PHY err"); @@ -164,7 +165,7 @@ if (stats->ast_tx_rssi) fprintf(fd, "rssi of last ack: %u\n", stats->ast_tx_rssi); if (stats->ast_rx_rssi) - fprintf(fd, "rssi of last rcv: %u\n", stats->ast_rx_rssi); + fprintf(fd, "avg recv rssi: %u\n", stats->ast_rx_rssi); STAT(ant_defswitch, "switched default/rx antenna"); STAT(ant_txswitch, "tx used alternate antenna"); fprintf(fd, "Antenna profile:\n"); @@ -214,37 +215,6 @@ #undef N } -#define WI_RID_COMMS_QUALITY 0xFD43 -/* - * Technically I don't think there's a limit to a record - * length. The largest record is the one that contains the CIS - * data, which is 240 words long, so 256 should be a safe - * value. - */ -#define WI_MAX_DATALEN 512 - -struct wi_req { - u_int16_t wi_len; - u_int16_t wi_type; - u_int16_t wi_val[WI_MAX_DATALEN]; -}; - -static u_int -getrssi(int s, const char *iface) -{ - struct ifreq ifr; - struct wi_req wreq; - - bzero(&wreq, sizeof(wreq)); - wreq.wi_len = WI_MAX_DATALEN; - wreq.wi_type = WI_RID_COMMS_QUALITY; - - bzero(&ifr, sizeof(ifr)); - strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); - ifr.ifr_data = (caddr_t)&wreq; - return ioctl(s, SIOCGIFGENERIC, &ifr) == -1 ? 0 : wreq.wi_val[1]; -} - static kvm_t *kvmd; static char *nlistf = NULL; static char *memf = NULL; @@ -395,7 +365,7 @@ , cur.ast_rx_crcerr - total.ast_rx_crcerr , cur.ast_rx_badcrypt - total.ast_rx_badcrypt , cur.ast_rx_phyerr - total.ast_rx_phyerr - , getrssi(s, ifr.ifr_name) + , cur.ast_rx_rssi , rate ); total = cur; @@ -417,7 +387,7 @@ , total.ast_rx_crcerr , total.ast_rx_badcrypt , total.ast_rx_phyerr - , getrssi(s, ifr.ifr_name) + , total.ast_rx_rssi , rate ); } From owner-p4-projects@FreeBSD.ORG Sat Nov 27 18:48:54 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4857B16A4D0; Sat, 27 Nov 2004 18:48:54 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24D3D16A4CE for ; Sat, 27 Nov 2004 18:48:54 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 155BB43D2D for ; Sat, 27 Nov 2004 18:48:54 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iARImrfT030045 for ; Sat, 27 Nov 2004 18:48:53 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iARImroO030042 for perforce@freebsd.org; Sat, 27 Nov 2004 18:48:53 GMT (envelope-from sam@freebsd.org) Date: Sat, 27 Nov 2004 18:48:53 GMT Message-Id: <200411271848.iARImroO030042@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65928 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 18:48:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=65928 Change 65928 by sam@sam_ebb on 2004/11/27 18:48:24 update for ibss+ps additions Affected files ... .. //depot/projects/wifi/tools/tools/ath/80211stats.c#3 edit Differences ... ==== //depot/projects/wifi/tools/tools/ath/80211stats.c#3 (text+ko) ==== @@ -135,6 +135,11 @@ STAT(crypto_attachfail, "setkey failed 'cuz cipher attach failed"); STAT(crypto_swfallback, "crypto fell back to s/w implementation"); STAT(crypto_keyfail, "setkey faied 'cuz driver key alloc failed"); + STAT(ibss_capmismatch, "ibss merge faied 'cuz capabilities mismatch"); + STAT(ibss_norate, "ibss merge faied 'cuz rate set mismatch"); + STAT(ps_unassoc, "ps-poll received for unassociated station"); + STAT(ps_badaid, "ps-poll received with invalid association id"); + STAT(ps_qempty, "ps-poll received with nothing to send"); #undef STAT #undef N } From owner-p4-projects@FreeBSD.ORG Sat Nov 27 19:35:53 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2306E16A4D0; Sat, 27 Nov 2004 19:35:53 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFF0516A4CF for ; Sat, 27 Nov 2004 19:35:52 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BD6043D31 for ; Sat, 27 Nov 2004 19:35:52 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iARJZqsf031608 for ; Sat, 27 Nov 2004 19:35:52 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iARJZqeG031605 for perforce@freebsd.org; Sat, 27 Nov 2004 19:35:52 GMT (envelope-from sam@freebsd.org) Date: Sat, 27 Nov 2004 19:35:52 GMT Message-Id: <200411271935.iARJZqeG031605@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65931 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 19:35:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=65931 Change 65931 by sam@sam_ebb on 2004/11/27 19:35:45 crude per-station stats reporting Affected files ... .. //depot/projects/wifi/tools/tools/ath/80211stats.c#4 edit Differences ... ==== //depot/projects/wifi/tools/tools/ath/80211stats.c#4 (text+ko) ==== @@ -47,9 +47,12 @@ #include #include #include +#include #include #include +#include +#include #include "../../../sys/net80211/ieee80211_ioctl.h" @@ -144,30 +147,142 @@ #undef N } +struct ifreq ifr; +int s; + +static void +print_sta_stats(FILE *fd, const u_int8_t macaddr[IEEE80211_ADDR_LEN]) +{ +#define STAT(x,fmt) \ + if (ns->ns_##x) { fprintf(fd, "%s" #x " " fmt, sep, ns->ns_##x); sep = " "; } + struct ieee80211req ireq; + struct ieee80211req_sta_stats stats; + const struct ieee80211_nodestats *ns = &stats.is_stats; + const char *sep; + + (void) memset(&ireq, 0, sizeof(ireq)); + (void) strncpy(ireq.i_name, ifr.ifr_name, sizeof(ireq.i_name)); + ireq.i_type = IEEE80211_IOC_STA_STATS; + ireq.i_data = &stats; + ireq.i_len = sizeof(stats); + memcpy(stats.is_u.macaddr, macaddr, IEEE80211_ADDR_LEN); + if (ioctl(s, SIOCG80211, &ireq) < 0) + err(1, "unable to get station stats for %s", + ether_ntoa((const struct ether_addr*) macaddr)); + + fprintf(fd, "%s:\n", ether_ntoa((const struct ether_addr*) macaddr)); + + sep = "\t"; + STAT(rx_data, "%u"); + STAT(rx_mgmt, "%u"); + STAT(rx_ctrl, "%u"); + STAT(rx_beacons, "%u"); + STAT(rx_proberesp, "%u"); + STAT(rx_ucast, "%u"); + STAT(rx_mcast, "%u"); + STAT(rx_bytes, "%llu"); + STAT(rx_dup, "%u"); + STAT(rx_noprivacy, "%u"); + STAT(rx_wepfail, "%u"); + STAT(rx_demicfail, "%u"); + STAT(rx_decap, "%u"); + STAT(rx_defrag, "%u"); + STAT(rx_disassoc, "%u"); + STAT(rx_deauth, "%u"); + STAT(rx_decryptcrc, "%u"); + STAT(rx_unauth, "%u"); + STAT(rx_unencrypted, "%u"); + fprintf(fd, "\n"); + + sep = "\t"; + STAT(tx_data, "%u"); + STAT(tx_mgmt, "%u"); + STAT(tx_probereq, "%u"); + STAT(tx_ucast, "%u"); + STAT(tx_mcast, "%u"); + STAT(tx_bytes, "%llu"); + STAT(tx_novlantag, "%u"); + STAT(tx_vlanmismatch, "%u"); + fprintf(fd, "\n"); + + sep = "\t"; + STAT(tx_assoc, "%u"); + STAT(tx_assoc_fail, "%u"); + STAT(tx_auth, "%u"); + STAT(tx_auth_fail, "%u"); + STAT(tx_deauth, "%u"); + STAT(tx_deauth_code, "%llu"); + STAT(tx_disassoc, "%u"); + STAT(tx_disassoc_code, "%u"); + fprintf(fd, "\n"); + +#undef STAT +} + int main(int argc, char *argv[]) { - int s; - struct ifreq ifr; - struct ieee80211_stats stats; + int c, len; + struct ieee80211req_sta_info *si; + uint8_t buf[24*1024], *cp; + struct ieee80211req ireq; + int allnodes = 0; s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) err(1, "socket"); - if (argc > 1 && strcmp(argv[1], "-i") == 0) { - if (argc < 2) { - fprintf(stderr, "%s: missing interface name for -i\n", - argv[0]); - exit(-1); + strncpy(ifr.ifr_name, "ath0", sizeof (ifr.ifr_name)); + while ((c = getopt(argc, argv, "ai:")) != -1) + switch (c) { + case 'a': + allnodes++; + break; + case 'i': + strncpy(ifr.ifr_name, optarg, sizeof (ifr.ifr_name)); + break; + default: + errx(1, "usage: %s [-a] [-i device] [mac...]\n"); + /*NOTREACHED*/ } - strncpy(ifr.ifr_name, argv[2], sizeof (ifr.ifr_name)); - argc -= 2, argv += 2; - } else - strncpy(ifr.ifr_name, "ath0", sizeof (ifr.ifr_name)); + + if (argc == optind && !allnodes) { + struct ieee80211_stats stats; - ifr.ifr_data = (caddr_t) &stats; - if (ioctl(s, SIOCG80211STATS, &ifr) < 0) - err(1, ifr.ifr_name); - printstats(stdout, &stats); - return 0; + /* no args, just show global stats */ + ifr.ifr_data = (caddr_t) &stats; + if (ioctl(s, SIOCG80211STATS, &ifr) < 0) + err(1, ifr.ifr_name); + printstats(stdout, &stats); + return 0; + } + if (allnodes) { + /* + * Retrieve station/neighbor table and print stats for each. + */ + (void) memset(&ireq, 0, sizeof(ireq)); + (void) strncpy(ireq.i_name, ifr.ifr_name, sizeof(ireq.i_name)); + ireq.i_type = IEEE80211_IOC_STA_INFO; + ireq.i_data = buf; + ireq.i_len = sizeof(buf); + if (ioctl(s, SIOCG80211, &ireq) < 0) + err(1, "unable to get station information"); + len = ireq.i_len; + if (len >= sizeof(struct ieee80211req_sta_info)) { + cp = buf; + do { + si = (struct ieee80211req_sta_info *) cp; + print_sta_stats(stdout, si->isi_macaddr); + cp += si->isi_len, len -= si->isi_len; + } while (len >= sizeof(struct ieee80211req_sta_info)); + } + } else { + /* + * Print stats for specified stations. + */ + for (c = optind; c < argc; c++) { + const struct ether_addr *ea = ether_aton(argv[c]); + if (ea != NULL) + print_sta_stats(stdout, ea->octet); + } + } } From owner-p4-projects@FreeBSD.ORG Sat Nov 27 20:01:32 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C0A0F16A4D0; Sat, 27 Nov 2004 20:01:31 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BA5416A4CE for ; Sat, 27 Nov 2004 20:01:31 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FE9743D5C for ; Sat, 27 Nov 2004 20:01:31 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iARK1VTc032344 for ; Sat, 27 Nov 2004 20:01:31 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iARK1Ume032341 for perforce@freebsd.org; Sat, 27 Nov 2004 20:01:30 GMT (envelope-from sam@freebsd.org) Date: Sat, 27 Nov 2004 20:01:30 GMT Message-Id: <200411272001.iARK1Ume032341@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 65933 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 20:01:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=65933 Change 65933 by sam@sam_ebb on 2004/11/27 20:00:31 IFC @ 65932 Affected files ... .. //depot/projects/wifi/etc/defaults/periodic.conf#2 integrate .. //depot/projects/wifi/etc/periodic/security/520.pfdenied#1 branch .. //depot/projects/wifi/etc/periodic/security/Makefile#2 integrate .. //depot/projects/wifi/games/fortune/datfiles/fortunes#3 integrate .. //depot/projects/wifi/lib/libc_r/uthread/pthread_private.h#2 integrate .. //depot/projects/wifi/lib/libc_r/uthread/uthread_init.c#2 integrate .. //depot/projects/wifi/lib/libc_r/uthread/uthread_jmp.c#2 integrate .. //depot/projects/wifi/lib/libc_r/uthread/uthread_stack.c#2 integrate .. //depot/projects/wifi/lib/libthr/thread/thr_init.c#2 integrate .. //depot/projects/wifi/lib/libthr/thread/thr_private.h#2 integrate .. //depot/projects/wifi/lib/libthr/thread/thr_stack.c#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#5 integrate .. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#4 integrate .. //depot/projects/wifi/sbin/gvinum/gvinum.c#2 integrate .. //depot/projects/wifi/sbin/ipfw/ipfw2.c#2 integrate .. //depot/projects/wifi/sbin/mount/getmntopts.c#2 integrate .. //depot/projects/wifi/sbin/mount/mntopts.h#2 integrate .. //depot/projects/wifi/sbin/mount_ufs/Makefile#1 branch .. //depot/projects/wifi/sbin/mount_ufs/mount_ufs.c#1 branch .. //depot/projects/wifi/sbin/swapon/swapon.c#2 integrate .. //depot/projects/wifi/share/man/man4/Makefile#6 integrate .. //depot/projects/wifi/share/man/man4/amr.4#3 integrate .. //depot/projects/wifi/share/man/man4/dc.4#2 integrate .. //depot/projects/wifi/share/man/man4/em.4#3 integrate .. //depot/projects/wifi/share/man/man4/fxp.4#2 integrate .. //depot/projects/wifi/share/man/man4/ixgb.4#4 integrate .. //depot/projects/wifi/share/man/man4/nge.4#2 integrate .. //depot/projects/wifi/share/man/man4/re.4#3 integrate .. //depot/projects/wifi/share/man/man4/rl.4#3 integrate .. //depot/projects/wifi/share/man/man4/sf.4#2 integrate .. //depot/projects/wifi/share/man/man4/sis.4#2 integrate .. //depot/projects/wifi/share/man/man4/snd_ich.4#1 branch .. //depot/projects/wifi/share/man/man4/ste.4#3 integrate .. //depot/projects/wifi/share/man/man4/vge.4#2 integrate .. //depot/projects/wifi/share/man/man4/vr.4#2 integrate .. //depot/projects/wifi/share/man/man4/witness.4#2 integrate .. //depot/projects/wifi/share/man/man5/periodic.conf.5#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/db_trace.c#3 integrate .. //depot/projects/wifi/sys/alpha/alpha/fp_emulate.c#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/machdep.c#4 integrate .. //depot/projects/wifi/sys/alpha/alpha/mp_machdep.c#4 integrate .. //depot/projects/wifi/sys/alpha/alpha/pmap.c#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/prom.c#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/sys_machdep.c#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/trap.c#2 integrate .. //depot/projects/wifi/sys/alpha/alpha/vm_machdep.c#2 integrate .. //depot/projects/wifi/sys/alpha/linux/linux_machdep.c#2 integrate .. //depot/projects/wifi/sys/alpha/osf1/osf1_misc.c#2 integrate .. //depot/projects/wifi/sys/alpha/osf1/osf1_signal.c#2 integrate .. //depot/projects/wifi/sys/amd64/amd64/fpu.c#2 integrate .. //depot/projects/wifi/sys/amd64/amd64/machdep.c#4 integrate .. //depot/projects/wifi/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/wifi/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/wifi/sys/amd64/linux32/linux32_sysvec.c#2 integrate .. //depot/projects/wifi/sys/arm/arm/db_trace.c#4 integrate .. //depot/projects/wifi/sys/arm/arm/trap.c#4 integrate .. //depot/projects/wifi/sys/arm/arm/undefined.c#3 integrate .. //depot/projects/wifi/sys/arm/arm/vm_machdep.c#4 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_misc.c#2 integrate .. //depot/projects/wifi/sys/compat/linux/linux_file.c#2 integrate .. //depot/projects/wifi/sys/compat/pecoff/imgact_pecoff.c#3 integrate .. //depot/projects/wifi/sys/compat/svr4/svr4_misc.c#3 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_pci_link.c#3 integrate .. //depot/projects/wifi/sys/dev/ath/if_ath.c#29 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#10 edit .. //depot/projects/wifi/sys/dev/mii/mii.c#3 integrate .. //depot/projects/wifi/sys/dev/mlx/mlx_disk.c#2 integrate .. //depot/projects/wifi/sys/dev/mlx/mlxreg.h#2 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_vfsops.c#4 integrate .. //depot/projects/wifi/sys/fs/nullfs/null_vfsops.c#3 integrate .. //depot/projects/wifi/sys/fs/nullfs/null_vnops.c#2 integrate .. //depot/projects/wifi/sys/fs/nwfs/nwfs_vfsops.c#3 integrate .. //depot/projects/wifi/sys/fs/smbfs/smbfs_vfsops.c#3 integrate .. //depot/projects/wifi/sys/fs/umapfs/umap_vfsops.c#3 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum.c#2 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum.h#3 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum_init.c#2 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum_plex.c#3 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum_raid5.c#3 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum_raid5.h#2 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum_state.c#2 integrate .. //depot/projects/wifi/sys/geom/vinum/geom_vinum_var.h#3 integrate .. //depot/projects/wifi/sys/i386/i386/machdep.c#6 integrate .. //depot/projects/wifi/sys/i386/i386/pmap.c#4 integrate .. //depot/projects/wifi/sys/i386/i386/sys_machdep.c#2 integrate .. //depot/projects/wifi/sys/i386/i386/vm86.c#2 integrate .. //depot/projects/wifi/sys/i386/i386/vm_machdep.c#3 integrate .. //depot/projects/wifi/sys/i386/isa/npx.c#2 integrate .. //depot/projects/wifi/sys/i386/linux/linux_sysvec.c#3 integrate .. //depot/projects/wifi/sys/ia64/ia64/machdep.c#3 integrate .. //depot/projects/wifi/sys/ia64/ia64/trap.c#2 integrate .. //depot/projects/wifi/sys/ia64/ia64/vm_machdep.c#2 integrate .. //depot/projects/wifi/sys/kern/imgact_aout.c#3 integrate .. //depot/projects/wifi/sys/kern/init_main.c#4 integrate .. //depot/projects/wifi/sys/kern/init_sysent.c#3 integrate .. //depot/projects/wifi/sys/kern/kern_descrip.c#5 integrate .. //depot/projects/wifi/sys/kern/kern_exec.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_exit.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_fork.c#5 integrate .. //depot/projects/wifi/sys/kern/kern_proc.c#3 integrate .. //depot/projects/wifi/sys/kern/kern_synch.c#2 integrate .. //depot/projects/wifi/sys/kern/sys_process.c#2 integrate .. //depot/projects/wifi/sys/kern/syscalls.c#3 integrate .. //depot/projects/wifi/sys/kern/syscalls.master#3 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#4 integrate .. //depot/projects/wifi/sys/modules/if_gif/Makefile#2 integrate .. //depot/projects/wifi/sys/netinet/tcp.h#3 integrate .. //depot/projects/wifi/sys/netinet/tcp_input.c#5 integrate .. //depot/projects/wifi/sys/netinet/tcp_usrreq.c#4 integrate .. //depot/projects/wifi/sys/pc98/i386/machdep.c#5 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/db_trace.c#3 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/fpu.c#2 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/machdep.c#3 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/mp_machdep.c#2 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/trap.c#2 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/vm_machdep.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/db_trace.c#3 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/machdep.c#3 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/rwindow.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/trap.c#2 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/vm_machdep.c#3 integrate .. //depot/projects/wifi/sys/sys/mount.h#3 integrate .. //depot/projects/wifi/sys/sys/user.h#3 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_vfsops.c#6 integrate .. //depot/projects/wifi/sys/ufs/ufs/ufs_extern.h#2 integrate .. //depot/projects/wifi/sys/ufs/ufs/ufs_vfsops.c#2 integrate .. //depot/projects/wifi/sys/vm/uma_core.c#4 edit .. //depot/projects/wifi/sys/vm/uma_int.h#2 integrate .. //depot/projects/wifi/sys/vm/vm_contig.c#4 integrate .. //depot/projects/wifi/sys/vm/vm_glue.c#5 integrate .. //depot/projects/wifi/tools/lib32/README#2 integrate .. //depot/projects/wifi/tools/lib32/build32.sh#2 delete .. //depot/projects/wifi/tools/regression/usr.bin/make/Makefile#3 integrate .. //depot/projects/wifi/tools/regression/usr.bin/make/regress.shell_2B.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/make/regress.shell_2j.out#1 branch .. //depot/projects/wifi/tools/regression/usr.bin/make/shell_test#1 branch .. //depot/projects/wifi/usr.bin/gcore/Makefile#2 integrate .. //depot/projects/wifi/usr.bin/gcore/aoutcore.c#3 delete .. //depot/projects/wifi/usr.bin/ktrace/subr.c#2 integrate .. //depot/projects/wifi/usr.bin/make/Makefile#2 integrate .. //depot/projects/wifi/usr.bin/make/job.c#5 integrate .. //depot/projects/wifi/usr.bin/make/list.h#2 delete .. //depot/projects/wifi/usr.bin/make/lst.lib/lstAppend.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstAtEnd.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstAtFront.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstClose.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstConcat.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstDatum.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstDeQueue.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstDestroy.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstDupl.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstEnQueue.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstFind.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstFindFrom.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstFirst.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstForEach.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstForEachFrom.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstInit.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstInsert.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstIsAtEnd.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstIsEmpty.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstMember.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstNext.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstOpen.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstRemove.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstReplace.c#2 integrate .. //depot/projects/wifi/usr.bin/make/lst.lib/lstSucc.c#2 integrate .. //depot/projects/wifi/usr.bin/make/main.c#5 integrate .. //depot/projects/wifi/usr.sbin/ngctl/main.c#2 integrate .. //depot/projects/wifi/usr.sbin/pstat/pstat.c#2 integrate Differences ... ==== //depot/projects/wifi/etc/defaults/periodic.conf#2 (text+ko) ==== @@ -10,7 +10,7 @@ # values set in this file. This eases the upgrade path when defaults # are changed and new features are added. # -# $FreeBSD: src/etc/defaults/periodic.conf,v 1.30 2004/09/23 02:00:51 jkoshy Exp $ +# $FreeBSD: src/etc/defaults/periodic.conf,v 1.31 2004/11/24 18:41:53 mlaier Exp $ # # What files override these defaults ? @@ -150,6 +150,9 @@ # 510.ipfdenied daily_status_security_ipfdenied_enable="YES" +# 520.pfdenied +daily_status_security_pfdenied_enable="YES" + # 550.ipfwlimit daily_status_security_ipfwlimit_enable="YES" ==== //depot/projects/wifi/etc/periodic/security/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/periodic/security/Makefile,v 1.3 2002/10/25 15:23:26 thomas Exp $ +# $FreeBSD: src/etc/periodic/security/Makefile,v 1.4 2004/11/24 18:41:53 mlaier Exp $ FILES= 100.chksetuid \ 200.chkmounts \ @@ -6,6 +6,7 @@ 400.passwdless \ 500.ipfwdenied \ 510.ipfdenied \ + 520.pfdenied \ 550.ipfwlimit \ 600.ip6fwdenied \ 650.ip6fwlimit \ ==== //depot/projects/wifi/games/fortune/datfiles/fortunes#3 (text+ko) ==== @@ -1,5 +1,5 @@ This fortune brought to you by: -$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.146 2004/10/27 20:28:56 wilko Exp $ +$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.147 2004/11/27 08:28:58 dds Exp $ % -- Gifts for Children -- @@ -1063,6 +1063,10 @@ If you're wearing a shirt that's red. -- Doris Robin and Karen Trimble of The L.A. Filkharmonics % +The Ken Thompson school of thought on expert systems: +there's table lookup, fraud, and grand fraud. + -- Andrew Hume +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #10: SIMPLE SIMPLE is an acronym for Sheer Idiot's Monopurpose Programming Language ==== //depot/projects/wifi/lib/libc_r/uthread/pthread_private.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * * Private thread definitions for the uthread kernel. * - * $FreeBSD: src/lib/libc_r/uthread/pthread_private.h,v 1.82 2004/01/22 19:15:08 deischen Exp $ + * $FreeBSD: src/lib/libc_r/uthread/pthread_private.h,v 1.83 2004/11/27 06:51:31 das Exp $ */ #ifndef _PTHREAD_PRIVATE_H @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,10 @@ #include #include #include +#include +#include +#include +#include /* * Define machine dependent macros to get and set the stack pointer ==== //depot/projects/wifi/lib/libc_r/uthread/uthread_init.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc_r/uthread/uthread_init.c,v 1.46 2003/12/03 06:54:40 peter Exp $ + * $FreeBSD: src/lib/libc_r/uthread/uthread_init.c,v 1.47 2004/11/27 06:51:31 das Exp $ */ /* Allocate space for global thread variables here: */ @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include ==== //depot/projects/wifi/lib/libc_r/uthread/uthread_jmp.c#2 (text+ko) ==== @@ -28,13 +28,12 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libc_r/uthread/uthread_jmp.c,v 1.9 2001/10/10 17:48:43 bde Exp $ + * $FreeBSD: src/lib/libc_r/uthread/uthread_jmp.c,v 1.10 2004/11/27 06:51:31 das Exp $ */ #include #include #include -#include #include #include #include "pthread_private.h" ==== //depot/projects/wifi/lib/libc_r/uthread/uthread_stack.c#2 (text+ko) ==== @@ -24,14 +24,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc_r/uthread/uthread_stack.c,v 1.5 2002/11/13 18:13:26 deischen Exp $ + * $FreeBSD: src/lib/libc_r/uthread/uthread_stack.c,v 1.6 2004/11/27 06:51:31 das Exp $ */ #include "namespace.h" #include #include #include #include -#include #include #include #include "un-namespace.h" ==== //depot/projects/wifi/lib/libthr/thread/thr_init.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.17 2004/06/27 10:01:35 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.18 2004/11/27 06:51:31 das Exp $ */ /* Allocate space for global thread variables here: */ @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include ==== //depot/projects/wifi/lib/libthr/thread/thr_private.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * * Private thread definitions for the uthread kernel. * - * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.41 2004/09/16 13:55:46 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.42 2004/11/27 06:51:31 das Exp $ */ #ifndef _THR_PRIVATE_H @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -69,6 +70,10 @@ #include #include #include +#include +#include +#include +#include #if defined(_PTHREADS_INVARIANTS) /* ==== //depot/projects/wifi/lib/libthr/thread/thr_stack.c#2 (text+ko) ==== @@ -24,13 +24,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_stack.c,v 1.3 2003/05/26 00:37:07 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_stack.c,v 1.4 2004/11/27 06:51:31 das Exp $ */ #include #include #include #include -#include #include #include #include "thr_private.h" ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#5 (text+ko) ==== @@ -29,7 +29,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.262 2004/11/20 02:46:02 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.263 2004/11/27 13:57:22 simon Exp $ Supported Devices @@ -804,6 +804,8 @@ &hwlist.snd.ds1; + &hwlist.snd.ich; + NEC PC-9801-73, 86 and compatibles (nss driver) ==== //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#4 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.45 2004/11/20 02:44:47 brueffer Exp $ +# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.46 2004/11/27 13:57:22 simon Exp $ # # @@ -105,6 +105,7 @@ snd_es137x i386,amd64 snd_ess i386,amd64 snd_gusc i386,amd64 +snd_ich i386,amd64 snd_solo i386,amd64 ste i386,pc98,alpha,amd64 stg i386,pc98 ==== //depot/projects/wifi/sbin/gvinum/gvinum.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/gvinum/gvinum.c,v 1.2 2004/08/04 00:23:00 le Exp $ + * $FreeBSD: src/sbin/gvinum/gvinum.c,v 1.4 2004/11/26 12:31:36 le Exp $ */ #include @@ -55,9 +55,11 @@ void gvinum_help(void); void gvinum_init(int, char **); void gvinum_list(int, char **); +void gvinum_parityop(int, char **, int); void gvinum_printconfig(int, char **); void gvinum_rm(int, char **); void gvinum_saveconfig(void); +void gvinum_setstate(int, char **); void gvinum_start(int, char **); void gvinum_stop(int, char **); void parseline(int, char **); @@ -481,6 +483,61 @@ } void +gvinum_setstate(int argc, char **argv) +{ + struct gctl_req *req; + int flags, i; + const char *errstr; + + flags = 0; + + optreset = 1; + optind = 1; + + while ((i = getopt(argc, argv, "f")) != -1) { + switch (i) { + case 'f': + flags |= GV_FLAG_F; + break; + case '?': + default: + warn("invalid flag: %c", i); + return; + } + } + + argc -= optind; + argv += optind; + + if (argc != 2) { + warnx("usage: setstate [-f] "); + return; + } + + /* + * XXX: This hack is needed to avoid tripping over (now) invalid + * 'classic' vinum states and will go away later. + */ + if (strcmp(argv[0], "up") && strcmp(argv[0], "down") && + strcmp(argv[0], "stale")) { + warnx("invalid state '%s'", argv[0]); + return; + } + + req = gctl_get_handle(); + gctl_ro_param(req, "class", -1, "VINUM"); + gctl_ro_param(req, "verb", -1, "setstate"); + gctl_ro_param(req, "state", -1, argv[0]); + gctl_ro_param(req, "object", -1, argv[1]); + gctl_ro_param(req, "flags", sizeof(int), &flags); + + errstr = gctl_issue(req); + if (errstr != NULL) + warnx("%s", errstr); + gctl_free(req); +} + +void gvinum_list(int argc, char **argv) { struct gctl_req *req; @@ -552,6 +609,89 @@ } void +gvinum_parityop(int argc, char **argv, int rebuild) +{ + struct gctl_req *req; + int flags, i, rv; + off_t offset; + const char *errstr; + char *op, *msg; + + if (rebuild) { + op = "rebuildparity"; + msg = "Rebuilding"; + } else { + op = "checkparity"; + msg = "Checking"; + } + + optreset = 1; + optind = 1; + flags = 0; + while ((i = getopt(argc, argv, "fv")) != -1) { + switch (i) { + case 'f': + flags |= GV_FLAG_F; + break; + case 'v': + flags |= GV_FLAG_V; + break; + case '?': + default: + warnx("invalid flag '%c'", i); + return; + } + } + argc -= optind; + argv += optind; + + if (argc != 1) { + warn("usage: %s [-f] [-v] ", op); + return; + } + + do { + rv = 0; + req = gctl_get_handle(); + gctl_ro_param(req, "class", -1, "VINUM"); + gctl_ro_param(req, "verb", -1, "parityop"); + gctl_ro_param(req, "flags", sizeof(int), &flags); + gctl_ro_param(req, "rebuild", sizeof(int), &rebuild); + gctl_rw_param(req, "rv", sizeof(int), &rv); + gctl_rw_param(req, "offset", sizeof(off_t), &offset); + gctl_ro_param(req, "plex", -1, argv[0]); + errstr = gctl_issue(req); + if (errstr) { + warnx("%s\n", errstr); + gctl_free(req); + break; + } + gctl_free(req); + if (flags & GV_FLAG_V) { + printf("\r%s at %s ... ", msg, + gv_roughlength(offset, 1)); + } + if (rv == 1) { + printf("Parity incorrect at offset 0x%jx\n", + (intmax_t)offset); + if (!rebuild) + break; + } + fflush(stdout); + + /* Clear the -f flag. */ + flags &= ~GV_FLAG_F; + } while (rv >= 0); + + if ((rv == 2) && (flags & GV_FLAG_V)) { + if (rebuild) + printf("Rebuilt parity on %s\n", argv[0]); + else + printf("%s has correct parity\n", argv[0]); + } +} + +void gvinum_rm(int argc, char **argv) { struct gctl_req *req; @@ -717,10 +857,16 @@ gvinum_rm(argc, argv); else if (!strcmp(argv[0], "saveconfig")) gvinum_saveconfig(); + else if (!strcmp(argv[0], "setstate")) + gvinum_setstate(argc, argv); else if (!strcmp(argv[0], "start")) gvinum_start(argc, argv); else if (!strcmp(argv[0], "stop")) gvinum_stop(argc, argv); + else if (!strcmp(argv[0], "checkparity")) + gvinum_parityop(argc, argv, 0); + else if (!strcmp(argv[0], "rebuildparity")) + gvinum_parityop(argc, argv, 1); else printf("unknown command '%s'\n", argv[0]); ==== //depot/projects/wifi/sbin/ipfw/ipfw2.c#2 (text+ko) ==== @@ -17,7 +17,7 @@ * * NEW command line interface for IP firewall facility * - * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.64 2004/10/08 03:24:10 green Exp $ + * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.65 2004/11/25 01:09:41 brooks Exp $ */ #include @@ -2083,7 +2083,6 @@ " ipttl LIST | ipversion VER | keep-state | layer2 | limit ... |\n" " mac ... | mac-type LIST | proto LIST | {recv|xmit|via} {IF|IPADDR} |\n" " setup | {tcpack|tcpseq|tcpwin} NN | tcpflags SPEC | tcpoptions SPEC |\n" -" verrevpath | versrcreach | antispoof\n" " tcpdatalen LIST | verrevpath | versrcreach | antispoof\n" ); exit(0); ==== //depot/projects/wifi/sbin/mount/getmntopts.c#2 (text+ko) ==== @@ -33,10 +33,11 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/sbin/mount/getmntopts.c,v 1.12 2004/04/09 19:58:30 markm Exp $"); +__FBSDID("$FreeBSD: src/sbin/mount/getmntopts.c,v 1.15 2004/11/25 16:14:27 delphij Exp $"); #include #include +#include #include #include @@ -84,10 +85,8 @@ for (m = m0; m->m_option != NULL; ++m) { len = strlen(m->m_option); if (strncasecmp(opt, m->m_option, len) == 0) - if ( m->m_option[len] == '\0' - || m->m_option[len] == '=' - ) - break; + if (opt[len] == '\0' || opt[len] == '=') + break; } /* Save flag, or fail if option is not recognized. */ @@ -140,3 +139,26 @@ } else errx(EX_USAGE, "%s: %s", resolved, strerror(errno)); } + +void +build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, int len) +{ + int i; + + if (*iovlen < 0) + return; + i = *iovlen; + *iov = realloc(*iov, sizeof **iov * (i + 2)); + if (*iov == NULL) { + *iovlen = -1; + return; + } + (*iov)[i].iov_base = strdup(name); + (*iov)[i].iov_len = strlen(name) + 1; + i++; + (*iov)[i].iov_base = val; + if (len < 0) + len = strlen(val) + 1; + (*iov)[i].iov_len = len; + *iovlen = ++i; +} ==== //depot/projects/wifi/sbin/mount/mntopts.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)mntopts.h 8.7 (Berkeley) 3/29/95 - * $FreeBSD: src/sbin/mount/mntopts.h,v 1.21 2004/04/09 19:58:30 markm Exp $ + * $FreeBSD: src/sbin/mount/mntopts.h,v 1.22 2004/11/25 13:31:46 phk Exp $ */ struct mntopt { @@ -92,3 +92,4 @@ void rmslashes(char *, char *); void checkpath(const char *, char resolved_path[]); extern int getmnt_silent; +void build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, int len); ==== //depot/projects/wifi/sbin/swapon/swapon.c#2 (text+ko) ==== @@ -39,12 +39,12 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/sbin/swapon/swapon.c,v 1.20 2004/04/09 19:58:39 markm Exp $"); +__FBSDID("$FreeBSD: src/sbin/swapon/swapon.c,v 1.21 2004/11/27 06:51:31 das Exp $"); #include #include -#include #include +#include #include #include ==== //depot/projects/wifi/share/man/man4/Makefile#6 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.293 2004/11/19 18:24:51 obrien Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.295 2004/11/27 13:49:27 simon Exp $ MAN= aac.4 \ acpi.4 \ @@ -267,6 +267,7 @@ snd_es137x.4 \ snd_ess.4 \ snd_gusc.4 \ + snd_ich.4 \ snd_maestro3.4 \ snd_sbc.4 \ snd_solo.4 \ @@ -432,6 +433,7 @@ MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 MLINKS+=udav.4 if_udav.4 +MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 ==== //depot/projects/wifi/share/man/man4/amr.4#3 (text+ko) ==== @@ -21,9 +21,9 @@ .\" (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/share/man/man4/amr.4,v 1.23 2004/11/23 10:56:45 simon Exp $ +.\" $FreeBSD: src/share/man/man4/amr.4,v 1.24 2004/11/26 18:45:58 simon Exp $ .\" -.Dd November 23, 2004 +.Dd November 26, 2004 .Dt AMR 4 .Os .Sh NAME @@ -98,6 +98,10 @@ HP NetRAID-3/Si (D4943A) .It HP Embedded NetRAID +.It +Intel RAID Controller SRCS16 +.It +Intel RAID Controller SRCU42X .El .Sh DIAGNOSTICS .Ss Driver initialisation/shutdown phase ==== //depot/projects/wifi/share/man/man4/dc.4#2 (text+ko) ==== @@ -28,9 +28,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/dc.4,v 1.31 2004/09/05 00:19:32 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/dc.4,v 1.32 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd August 15, 2004 +.Dd November 24, 2004 .Dt DC 4 .Os .Sh NAME @@ -335,6 +335,7 @@ .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Rs ==== //depot/projects/wifi/share/man/man4/em.4#3 (text+ko) ==== @@ -29,9 +29,9 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD: src/share/man/man4/em.4,v 1.15 2004/11/08 19:52:21 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/em.4,v 1.16 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd September 5, 2004 +.Dd November 24, 2004 .Dt EM 4 .Os .Sh NAME @@ -186,6 +186,7 @@ .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY ==== //depot/projects/wifi/share/man/man4/fxp.4#2 (text+ko) ==== @@ -23,9 +23,9 @@ .\" (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/share/man/man4/fxp.4,v 1.32 2004/07/04 14:17:41 simon Exp $ +.\" $FreeBSD: src/share/man/man4/fxp.4,v 1.33 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd July 4, 2004 +.Dd November 24, 2004 .Dt FXP 4 .Os .Sh NAME @@ -136,6 +136,7 @@ .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr ifconfig 8 .Sh HISTORY The ==== //depot/projects/wifi/share/man/man4/ixgb.4#4 (text+ko) ==== @@ -29,9 +29,9 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD: src/share/man/man4/ixgb.4,v 1.6 2004/11/20 03:10:35 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/ixgb.4,v 1.8 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd August 19, 2004 +.Dd November 24, 2004 .Dt IXGB 4 .Os .Sh NAME @@ -103,12 +103,15 @@ .Xr em 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm device driver first appeared in +.Fx 4.11 +and .Fx 5.3 . .Sh AUTHORS The ==== //depot/projects/wifi/share/man/man4/nge.4#2 (text+ko) ==== @@ -29,9 +29,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/nge.4,v 1.14 2004/09/03 03:58:45 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/nge.4,v 1.15 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd September 3, 2004 +.Dd November 24, 2004 .Dt NGE 4 .Os .Sh NAME @@ -197,6 +197,7 @@ .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr vlan 4 , .Xr ifconfig 8 .Rs ==== //depot/projects/wifi/share/man/man4/re.4#3 (text+ko) ==== @@ -28,9 +28,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/re.4,v 1.11 2004/11/17 21:39:06 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/re.4,v 1.12 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd November 17, 2004 +.Dd November 24, 2004 .Dt RE 4 .Os .Sh NAME @@ -177,6 +177,7 @@ .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr vlan 4 , .Xr ifconfig 8 .Rs ==== //depot/projects/wifi/share/man/man4/rl.4#3 (text+ko) ==== @@ -28,9 +28,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/rl.4,v 1.37 2004/11/17 22:51:46 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/rl.4,v 1.38 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd November 17, 2004 +.Dd November 24, 2004 .Dt RL 4 .Os .Sh NAME @@ -230,6 +230,7 @@ .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr ifconfig 8 .Rs .%B The RealTek 8129, 8139 and 8139C+ datasheets ==== //depot/projects/wifi/share/man/man4/sf.4#2 (text+ko) ==== @@ -28,9 +28,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/sf.4,v 1.19 2004/08/24 15:56:47 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/sf.4,v 1.20 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd August 24, 2004 +.Dd November 24, 2004 .Dt SF 4 .Os .Sh NAME @@ -162,6 +162,7 @@ .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr polling 4 , .Xr ifconfig 8 .Rs .%T The Adaptec AIC-6915 Programmer's Manual ==== //depot/projects/wifi/share/man/man4/sis.4#2 (text+ko) ==== @@ -28,9 +28,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/sis.4,v 1.17 2004/09/04 23:56:56 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/sis.4,v 1.18 2004/11/24 19:06:43 brueffer Exp $ .\" -.Dd September 4, 2004 +.Dd November 24, 2004 .Dt SIS 4 .Os .Sh NAME @@ -173,6 +173,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Nov 27 20:34:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DBE8916A4D0; Sat, 27 Nov 2004 20:34:55 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3C6116A4CE for ; Sat, 27 Nov 2004 20:34:55 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D39543D4C for ; Sat, 27 Nov 2004 20:34:55 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iARKYtuB033843 for ; Sat, 27 Nov 2004 20:34:55 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iARKYslZ033840 for perforce@freebsd.org; Sat, 27 Nov 2004 20:34:54 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 27 Nov 2004 20:34:54 GMT Message-Id: <200411272034.iARKYslZ033840@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 65936 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 20:34:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=65936 Change 65936 by rwatson@rwatson_paprika on 2004/11/27 20:34:13 Integrate netperf_socket from FreeBSD CVS HEAD: - De-MNT_NODEV. - De-pecoff/linux/a.out core dump. - De vfs_start. - Less vop_open(). - Less user.h as less u-area. - TCP_INFO socket option. Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/db_trace.c#6 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/fp_emulate.c#3 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/machdep.c#11 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/mp_machdep.c#4 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#20 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/prom.c#2 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/sys_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/trap.c#4 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/vm_machdep.c#7 integrate .. //depot/projects/netperf_socket/sys/alpha/linux/linux_machdep.c#4 integrate .. //depot/projects/netperf_socket/sys/alpha/osf1/osf1_misc.c#8 integrate .. //depot/projects/netperf_socket/sys/alpha/osf1/osf1_signal.c#2 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/fpu.c#6 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#21 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#30 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#12 integrate .. //depot/projects/netperf_socket/sys/amd64/linux32/linux32_sysvec.c#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/db_trace.c#8 integrate .. //depot/projects/netperf_socket/sys/arm/arm/trap.c#5 integrate .. //depot/projects/netperf_socket/sys/arm/arm/undefined.c#3 integrate .. //depot/projects/netperf_socket/sys/arm/arm/vm_machdep.c#8 integrate .. //depot/projects/netperf_socket/sys/boot/i386/boot0/boot0.S#6 integrate .. //depot/projects/netperf_socket/sys/boot/i386/btx/btx/btx.S#4 integrate .. //depot/projects/netperf_socket/sys/compat/freebsd32/freebsd32_misc.c#9 integrate .. //depot/projects/netperf_socket/sys/compat/linux/linux_file.c#5 integrate .. //depot/projects/netperf_socket/sys/compat/pecoff/imgact_pecoff.c#4 integrate .. //depot/projects/netperf_socket/sys/compat/svr4/svr4_misc.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#16 integrate .. //depot/projects/netperf_socket/sys/dev/mii/mii.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/mlx/mlx_disk.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/mlx/mlxreg.h#2 integrate .. //depot/projects/netperf_socket/sys/fs/devfs/devfs_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/nullfs/null_vfsops.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/nullfs/null_vnops.c#3 integrate .. //depot/projects/netperf_socket/sys/fs/nwfs/nwfs_vfsops.c#5 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/umapfs/umap_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum.c#11 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum.h#6 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_init.c#5 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_plex.c#9 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_raid5.c#8 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_raid5.h#4 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_state.c#5 integrate .. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_var.h#4 integrate .. //depot/projects/netperf_socket/sys/i386/i386/machdep.c#16 integrate .. //depot/projects/netperf_socket/sys/i386/i386/pmap.c#32 integrate .. //depot/projects/netperf_socket/sys/i386/i386/sys_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/i386/i386/vm86.c#2 integrate .. //depot/projects/netperf_socket/sys/i386/i386/vm_machdep.c#17 integrate .. //depot/projects/netperf_socket/sys/i386/isa/npx.c#10 integrate .. //depot/projects/netperf_socket/sys/i386/linux/linux_sysvec.c#5 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/machdep.c#14 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/trap.c#10 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/vm_machdep.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/imgact_aout.c#5 integrate .. //depot/projects/netperf_socket/sys/kern/init_main.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/init_sysent.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/kern_descrip.c#23 integrate .. //depot/projects/netperf_socket/sys/kern/kern_exec.c#20 integrate .. //depot/projects/netperf_socket/sys/kern/kern_exit.c#22 integrate .. //depot/projects/netperf_socket/sys/kern/kern_fork.c#22 integrate .. //depot/projects/netperf_socket/sys/kern/kern_proc.c#20 integrate .. //depot/projects/netperf_socket/sys/kern/kern_synch.c#20 integrate .. //depot/projects/netperf_socket/sys/kern/sys_process.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/syscalls.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/syscalls.master#14 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_mount.c#19 integrate .. //depot/projects/netperf_socket/sys/modules/if_gif/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp.h#7 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_input.c#23 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_usrreq.c#17 integrate .. //depot/projects/netperf_socket/sys/pc98/i386/machdep.c#14 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/db_trace.c#6 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/fpu.c#3 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/machdep.c#9 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/mp_machdep.c#2 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/trap.c#7 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/vm_machdep.c#10 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/db_trace.c#6 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/machdep.c#11 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/rwindow.c#3 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/trap.c#4 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/vm_machdep.c#11 integrate .. //depot/projects/netperf_socket/sys/sys/jail.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/mount.h#15 integrate .. //depot/projects/netperf_socket/sys/sys/user.h#11 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_vfsops.c#15 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_extern.h#5 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_vfsops.c#4 integrate .. //depot/projects/netperf_socket/sys/vm/uma_int.h#4 integrate .. //depot/projects/netperf_socket/sys/vm/vm_contig.c#13 integrate .. //depot/projects/netperf_socket/sys/vm/vm_glue.c#17 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/db_trace.c#6 (text+ko) ==== @@ -42,17 +42,17 @@ #include /* RCS ID & Copyright macro defns */ /*__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.9 2000/12/13 03:16:36 mycroft Exp $");*/ -__FBSDID("$FreeBSD: src/sys/alpha/alpha/db_trace.c,v 1.22 2004/11/01 22:15:13 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/db_trace.c,v 1.23 2004/11/27 06:51:32 das Exp $"); #include #include #include #include -#include #include #include #include +#include #include #include ==== //depot/projects/netperf_socket/sys/alpha/alpha/fp_emulate.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/fp_emulate.c,v 1.14 2004/05/06 09:35:57 das Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/fp_emulate.c,v 1.15 2004/11/27 06:51:32 das Exp $"); #include #include @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -47,6 +46,7 @@ #include #include #include +#include #include #include ==== //depot/projects/netperf_socket/sys/alpha/alpha/machdep.c#11 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.225 2004/11/20 02:29:36 das Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.226 2004/11/27 06:51:32 das Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -132,7 +132,6 @@ #include #include #include -#include #include #include #include @@ -141,6 +140,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/netperf_socket/sys/alpha/alpha/mp_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.54 2004/11/20 02:29:36 das Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.55 2004/11/27 06:51:32 das Exp $"); #include "opt_kstack_pages.h" @@ -42,7 +42,6 @@ #include #include #include -#include #include #include @@ -51,6 +50,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#20 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.173 2004/10/03 00:16:42 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.174 2004/11/27 06:51:32 das Exp $"); #include #include @@ -173,9 +173,8 @@ #include #include -#include - #include +#include #include #ifndef PMAP_SHPGPERPROC ==== //depot/projects/netperf_socket/sys/alpha/alpha/prom.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ #include /* RCS ID & Copyright macro defns */ /* __KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.22 1998/02/27 04:03:00 thorpej Exp $"); */ -__FBSDID("$FreeBSD: src/sys/alpha/alpha/prom.c,v 1.28 2003/08/17 06:42:07 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/prom.c,v 1.29 2004/11/27 06:51:32 das Exp $"); #include #include @@ -35,10 +35,10 @@ #include #include #include -#include #include #include +#include #include #include #include ==== //depot/projects/netperf_socket/sys/alpha/alpha/sys_machdep.c#3 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/sys_machdep.c,v 1.27 2004/04/05 21:00:49 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/sys_machdep.c,v 1.28 2004/11/27 06:51:32 das Exp $"); #include "opt_mac.h" @@ -42,7 +42,6 @@ #include #include #include -#include #include #include @@ -50,6 +49,7 @@ #include #include +#include #include #include /* for kernel_map */ ==== //depot/projects/netperf_socket/sys/alpha/alpha/trap.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.120 2004/08/31 07:34:53 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.121 2004/11/27 06:51:32 das Exp $"); /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" @@ -55,12 +55,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #ifdef KTRACE ==== //depot/projects/netperf_socket/sys/alpha/alpha/vm_machdep.c#7 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.104 2004/05/26 12:09:36 tmm Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.105 2004/11/27 06:51:32 das Exp $"); #include #include @@ -89,6 +89,7 @@ #include #include #include +#include #include #include @@ -99,8 +100,6 @@ #include #include -#include - /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child ==== //depot/projects/netperf_socket/sys/alpha/linux/linux_machdep.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.34 2004/09/01 02:11:27 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.35 2004/11/27 06:51:32 das Exp $"); #include #include @@ -36,10 +36,13 @@ #include #include #include +#include +#include #include #include #include -#include + +#include #include #include ==== //depot/projects/netperf_socket/sys/alpha/osf1/osf1_misc.c#8 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.50 2004/10/14 10:43:47 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.51 2004/11/27 06:51:32 das Exp $"); #include #include @@ -66,7 +66,6 @@ #include #include #include -#include #include #include #include @@ -82,6 +81,7 @@ #include #include #include +#include #include #include ==== //depot/projects/netperf_socket/sys/alpha/osf1/osf1_signal.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.36 2004/01/03 23:36:31 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.37 2004/11/27 06:51:32 das Exp $"); #include "opt_compat.h" #ifndef COMPAT_43 @@ -66,7 +66,6 @@ #include #include #include -#include #include #include #include @@ -83,6 +82,7 @@ #include #include #include +#include #include #include ==== //depot/projects/netperf_socket/sys/amd64/amd64/fpu.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.154 2004/06/18 04:01:54 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.155 2004/11/27 06:51:32 das Exp $"); #include #include @@ -47,7 +47,6 @@ #include #include #include -#include #include #include ==== //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#21 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.623 2004/11/20 02:29:23 das Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.624 2004/11/27 06:51:32 das Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -82,6 +82,8 @@ #include #include +#include + #include #include #include @@ -91,7 +93,6 @@ #include #include -#include #include #include ==== //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#30 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.508 2004/10/08 08:23:42 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.509 2004/11/27 06:51:33 das Exp $"); /* * Manages physical address maps. @@ -116,7 +116,6 @@ #include #include #include -#include #include #include #include @@ -138,6 +137,7 @@ #include #include #include +#include #include #ifdef SMP #include ==== //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#12 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.237 2004/08/16 22:57:13 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.238 2004/11/27 06:51:34 das Exp $"); #include "opt_isa.h" #include "opt_cpu.h" @@ -62,7 +62,6 @@ #include #include #include -#include #include #include ==== //depot/projects/netperf_socket/sys/amd64/linux32/linux32_sysvec.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.3 2004/08/16 11:15:46 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.4 2004/11/27 06:51:34 das Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -56,12 +56,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -74,6 +74,7 @@ #include #include +#include #include #include ==== //depot/projects/netperf_socket/sys/arm/arm/db_trace.c#8 (text+ko) ==== @@ -30,18 +30,18 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.8 2004/11/21 19:41:27 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.9 2004/11/27 06:51:34 das Exp $"); #include #include #include -#include #include #include #include #include #include +#include #include #include #include ==== //depot/projects/netperf_socket/sys/arm/arm/trap.c#5 (text+ko) ==== @@ -82,14 +82,13 @@ #include "opt_ktrace.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.4 2004/11/20 00:55:57 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.5 2004/11/27 06:51:34 das Exp $"); #include #include #include #include -#include #include #include #include @@ -112,6 +111,7 @@ #include #include #include +#include #include #include #if !defined(DDB) ==== //depot/projects/netperf_socket/sys/arm/arm/undefined.c#3 (text+ko) ==== @@ -48,7 +48,7 @@ #include "opt_ddb.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.3 2004/11/21 18:11:39 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.4 2004/11/27 06:51:34 das Exp $"); #include #include @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include ==== //depot/projects/netperf_socket/sys/arm/arm/vm_machdep.c#8 (text+ko) ==== @@ -81,7 +81,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.8 2004/11/20 16:51:32 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.9 2004/11/27 06:51:34 das Exp $"); #include #include @@ -91,7 +91,6 @@ #include #include #include -#include #include #include #include ==== //depot/projects/netperf_socket/sys/boot/i386/boot0/boot0.S#6 (text+ko) ==== @@ -13,13 +13,13 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot0/boot0.S,v 1.11 2004/11/06 06:13:13 keramida Exp $ + * $FreeBSD: src/sys/boot/i386/boot0/boot0.S,v 1.12 2004/11/24 15:39:04 jhb Exp $ */ /* A 512-byte boot manager. */ #ifdef SIO /* ... using a serial console on COM1. */ -#endif /* SIO */ +#endif .set NHRDRV,0x475 # Number of hard drives .set ORIGIN,0x600 # Execution address @@ -92,13 +92,13 @@ jmp main-LOAD+ORIGIN # To relocated code main: -#ifdef SIO +#if defined(SIO) && COMSPEED != 0 /* * Initialize the serial port. bioscom preserves the driver number in DX. */ movw COMSPEED,%ax # defined by Makefile callw bioscom -#endif /* SIO */ +#endif /* * Check what flags were loaded with us, specifically if a predefined drive * number should be used. If what the bios gives us is bad, use the '0' in @@ -235,18 +235,18 @@ xorb %ah,%ah # BIOS: Get int $0x16 # keypress movb %ah,%al # Scan code -#else /* SIO */ +#else movb $0x02,%ah # BIOS: Receive call bioscom -#endif /* SIO */ +#endif /* * If it's CR act as if timed out. */ #ifndef SIO cmpb $KEY_ENTER,%al # Enter pressed? -#else /* SIO */ +#else cmpb $ASCII_CR,%al # Enter pressed? -#endif /* SIO */ +#endif je main.9 # Yes /* * Otherwise check if legal. If not ask again. @@ -256,9 +256,9 @@ cmpb $0x4,%al # F1..F5? jna main.12 # Yes subb $(KEY_1 - KEY_F1),%al # Less #1 scan code -#else /* SIO */ +#else subb $'1',%al # Less '1' ascii character -#endif /* SIO */ +#endif cmpb $0x4,%al # #1..#5? ja main.10 # No /* @@ -326,7 +326,7 @@ #ifndef SIO movb $'F',%al # Display callw putchr # 'F' -#endif /* SIO */ +#endif movb $'1',%al # Prepare addb %dl,%al # digit jmp putstr.1 # Display the rest ==== //depot/projects/netperf_socket/sys/boot/i386/btx/btx/btx.S#4 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.37 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.38 2004/11/24 14:54:33 jhb Exp $ */ /* @@ -975,8 +975,9 @@ .set SIO_FMT,SIOFMT # 8N1 .set SIO_DIV,(115200/SIOSPD) # 115200 / SPD +/* * void sio_init(void) - + */ sio_init: movw $SIO_PRT+0x3,%dx # Data format reg movb $SIO_FMT|0x80,%al # Set format outb %al,(%dx) # and DLAB @@ -992,15 +993,17 @@ outb %al,(%dx) # DTR incl %edx # Line status reg +/* * void sio_flush(void) - + */ sio_flush.0: call sio_getc.1 # Get character sio_flush: call sio_ischar # Check for character jnz sio_flush.0 # Till none ret # To caller +/* * void sio_putc(int c) - + */ sio_putc: movw $SIO_PRT+0x5,%dx # Line status reg xor %ecx,%ecx # Timeout movb $0x40,%ch # counter @@ -1013,16 +1016,18 @@ outb %al,(%dx) # Write character sio_putc.2: ret $0x4 # To caller +/* * int sio_getc(void) - + */ sio_getc: call sio_ischar # Character available? jz sio_getc # No sio_getc.1: subb $0x5,%dl # Receiver buffer reg inb (%dx),%al # Read character ret # To caller +/* * int sio_ischar(void) - + */ sio_ischar: movw $SIO_PRT+0x5,%dx # Line status register xorl %eax,%eax # Zero inb (%dx),%al # Received data ==== //depot/projects/netperf_socket/sys/compat/freebsd32/freebsd32_misc.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.25 2004/10/11 22:04:15 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.26 2004/11/27 06:51:34 das Exp $"); #include "opt_compat.h" @@ -64,8 +64,6 @@ #include #include #include -#include -#include #include #include ==== //depot/projects/netperf_socket/sys/compat/linux/linux_file.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.87 2004/08/16 07:28:16 tjr Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.88 2004/11/26 07:39:20 phk Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -786,8 +786,6 @@ fsflags |= MNT_RDONLY; if (args->rwflag & LINUX_MS_NOSUID) fsflags |= MNT_NOSUID; - if (args->rwflag & LINUX_MS_NODEV) - fsflags |= MNT_NODEV; if (args->rwflag & LINUX_MS_NOEXEC) fsflags |= MNT_NOEXEC; if (args->rwflag & LINUX_MS_REMOUNT) ==== //depot/projects/netperf_socket/sys/compat/pecoff/imgact_pecoff.c#4 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/pecoff/imgact_pecoff.c,v 1.34 2004/11/20 02:32:04 das Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/pecoff/imgact_pecoff.c,v 1.35 2004/11/27 06:46:45 das Exp $"); #include #include @@ -66,7 +66,6 @@ #include #include -#include #include #include #include @@ -79,13 +78,8 @@ #include "opt_pecoff.h" -#define uarea_pages 1 - #define PECOFF_PE_SIGNATURE "PE\0\0" static int pecoff_fixup(register_t **, struct image_params *); -static int -pecoff_coredump(register struct thread *, register struct vnode *, - off_t); #ifndef PECOFF_DEBUG #define DPRINTF(a) #else @@ -106,7 +100,7 @@ &szsigcode, 0, "FreeBSD PECoff", - pecoff_coredump, + NULL, NULL, MINSIGSTKSZ, PAGE_SIZE, @@ -167,66 +161,6 @@ return 0; } - -static int -pecoff_coredump(register struct thread * td, register struct vnode * vp, - off_t limit) -{ - register struct ucred *cred = td->td_ucred; - struct proc *p = td->td_proc; - register struct vmspace *vm = p->p_vmspace; - char *tempuser; - int error; -#ifdef PECOFF_DEBUG - struct vm_map *map; - struct vm_map_entry *ent; - struct reg regs; - -#endif - if (ctob((uarea_pages + kstack_pages) + vm->vm_dsize + vm->vm_ssize) >= - limit) - return (EFAULT); - tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP, - M_WAITOK | M_ZERO); - if (tempuser == NULL) - return (ENOMEM); - PROC_LOCK(p); - fill_user(p, (struct user *)tempuser); - PROC_UNLOCK(p); - bcopy(td->td_frame, - tempuser + ctob(uarea_pages) + - ((caddr_t)td->td_frame - (caddr_t)td->td_kstack), - sizeof(struct trapframe)); -#if PECOFF_DEBUG - fill_regs(td, ®s); - printf("EIP%x\n", regs.r_eip); - printf("EAX%x EBX%x ECX%x EDI%x\n", - regs.r_eax, regs.r_ebx, regs.r_ecx, regs.r_edi); - map = &vm->vm_map; - ent = &map->header; - printf("%p %p %p\n", ent, ent->prev, ent->next); -#endif - error = vn_rdwr(UIO_WRITE, vp, (caddr_t)tempuser, - ctob(uarea_pages + kstack_pages), - (off_t)0, UIO_SYSSPACE, IO_UNIT, cred, NOCRED, - (int *)NULL, td); - free(tempuser, M_TEMP); - if (error == 0) - error = vn_rdwr_inchunks(UIO_WRITE, vp, vm->vm_daddr, - (int)ctob(vm->vm_dsize), - (off_t)ctob((uarea_pages + kstack_pages)), - UIO_USERSPACE, IO_UNIT, cred, NOCRED, NULL, td); - if (error == 0) - error = vn_rdwr_inchunks(UIO_WRITE, vp, - (caddr_t)trunc_page(USRSTACK - ctob(vm->vm_ssize)), - round_page(ctob(vm->vm_ssize)), - (off_t)ctob((uarea_pages + kstack_pages)) + - ctob(vm->vm_dsize), - UIO_USERSPACE, IO_UNIT, cred, NOCRED, NULL, td); - return (error); - -} - static int pecoff_load_section(struct thread * td, struct vmspace * vmspace, struct vnode * vp, vm_offset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot) { ==== //depot/projects/netperf_socket/sys/compat/svr4/svr4_misc.c#6 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.75 2004/11/13 11:53:00 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.76 2004/11/27 06:51:35 das Exp $"); #include "opt_mac.h" @@ -57,13 +57,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#16 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.34 2004/11/23 22:26:44 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.35 2004/11/26 23:31:59 njl Exp $"); #include "opt_acpi.h" #include @@ -580,6 +580,7 @@ static int acpi_pci_link_resume(device_t dev) { +#if 0 /* XXX Disabled temporarily since this hangs resume. */ ACPI_STATUS status; ACPI_SERIAL_BEGIN(pci_link); @@ -588,6 +589,7 @@ if (ACPI_FAILURE(status)) return (ENXIO); else +#endif return (0); } >>> TRUNCATED FOR MAIL (1000 lines) <<<