PERFORCE change 65977 for review
Robert Watson
rwatson at FreeBSD.org
Sun Nov 28 03:12:54 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=65977
Change 65977 by rwatson at rwatson_paprika on 2004/11/28 11:12:10
Integrate netperf_socket from FreeBSD CVS:
Loop back some TCP lock assertions from rwatson_netperf.
Affected files ...
.. //depot/projects/netperf_socket/sys/alpha/alpha/divrem.m4#2 integrate
.. //depot/projects/netperf_socket/sys/boot/efi/include/efilib.h#2 integrate
.. //depot/projects/netperf_socket/sys/boot/efi/libefi/Makefile#4 integrate
.. //depot/projects/netperf_socket/sys/boot/efi/libefi/copy.c#2 integrate
.. //depot/projects/netperf_socket/sys/boot/ia64/efi/Makefile#2 integrate
.. //depot/projects/netperf_socket/sys/boot/ia64/efi/efimd.c#1 branch
.. //depot/projects/netperf_socket/sys/ia64/include/bootinfo.h#2 integrate
.. //depot/projects/netperf_socket/sys/netgraph/ng_ppp.c#7 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_input.c#24 integrate
Differences ...
==== //depot/projects/netperf_socket/sys/alpha/alpha/divrem.m4#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/alpha/divrem.m4,v 1.3 2000/05/01 20:17:45 peter Exp $ */
+/* $FreeBSD: src/sys/alpha/alpha/divrem.m4,v 1.4 2004/11/27 20:59:49 peadar Exp $ */
/* $NetBSD: divrem.m4,v 1.5 1996/10/17 04:26:25 cgd Exp $ */
/*
@@ -172,7 +172,7 @@
ifelse(S, `true',
`
/* Check to see if we should negate it. */
- subqv zero, RESULT, T_0
+ subq zero, RESULT, T_0
cmovlbs NEG, T_0, RESULT
')
==== //depot/projects/netperf_socket/sys/boot/efi/include/efilib.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/sys/boot/efi/include/efilib.h,v 1.3 2002/12/10 20:11:19 marcel Exp $
+ * $FreeBSD: src/sys/boot/efi/include/efilib.h,v 1.4 2004/11/28 00:30:22 marcel Exp $
*/
extern EFI_HANDLE IH;
@@ -34,5 +34,7 @@
void *efi_get_table(EFI_GUID *tbl);
void efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table);
+EFI_PHYSICAL_ADDRESS efimd_va2pa(EFI_VIRTUAL_ADDRESS);
+
EFI_STATUS main(int argc, CHAR16 *argv[]);
void exit(EFI_STATUS status);
==== //depot/projects/netperf_socket/sys/boot/efi/libefi/Makefile#4 (text+ko) ====
@@ -1,26 +1,26 @@
-# $FreeBSD: src/sys/boot/efi/libefi/Makefile,v 1.15 2004/10/24 15:32:49 ru Exp $
+# $FreeBSD: src/sys/boot/efi/libefi/Makefile,v 1.16 2004/11/28 00:30:22 marcel Exp $
.PATH: ${.CURDIR}/../../../${MACHINE_ARCH}/${MACHINE_ARCH}
-LIB= efi
+LIB= efi
INTERNALLIB=
-SRCS= libefi.c efi_console.c time.c copy.c devicename.c module.c
-SRCS+= delay.c efifs.c efinet.c elf_freebsd.c bootinfo.c pal.S
+SRCS= bootinfo.c copy.c delay.c devicename.c efi_console.c efifs.c efinet.c \
+ elf_freebsd.c libefi.c module.c time.c
.if ${MACHINE_ARCH} == "ia64"
-SRCS+= efifpswa.c
+SRCS+= efifpswa.c pal.S
.endif
-CFLAGS+= -I${.CURDIR}/../include
-CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+CFLAGS+= -I${.CURDIR}/../include
+CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
+CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
# Pick up the bootstrap header for some interface items
-CFLAGS+= -I${.CURDIR}/../../common
+CFLAGS+= -I${.CURDIR}/../../common
+# Make the disk code more talkative
.if defined(BOOT_DISK_DEBUG)
-# Make the disk code more talkative
CFLAGS+= -DDISK_DEBUG
.endif
==== //depot/projects/netperf_socket/sys/boot/efi/libefi/copy.c#2 (text+ko) ====
@@ -25,44 +25,31 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/efi/libefi/copy.c,v 1.5 2003/04/03 21:36:29 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/efi/libefi/copy.c,v 1.6 2004/11/28 00:30:22 marcel Exp $");
-/*
- * MD primitives supporting placement of module data
- */
-#include <stand.h>
-
#include <efi.h>
#include <efilib.h>
-#include <machine/ia64_cpu.h>
-#include <machine/vmparam.h>
+#include <stand.h>
int
-efi_copyin(void *src, vm_offset_t dest, size_t len)
+efi_copyin(void *src, vm_offset_t va, size_t len)
{
- EFI_PHYSICAL_ADDRESS p = IA64_RR_MASK(dest);
-#if 0
- BS->AllocatePages(AllocateAddress, EfiRuntimeServicesData,
- len >> 12, &p);
-#endif
- bcopy(src, (void*) p, len);
+
+ bcopy(src, (void *)efimd_va2pa(va), len);
return (len);
}
int
-efi_copyout(vm_offset_t src, void *dest, size_t len)
+efi_copyout(vm_offset_t va, void *dst, size_t len)
{
- bcopy((void*) IA64_RR_MASK(src), dest, len);
+
+ bcopy((void *)efimd_va2pa(va), dst, len);
return (len);
}
int
-efi_readin(int fd, vm_offset_t dest, size_t len)
+efi_readin(int fd, vm_offset_t va, size_t len)
{
- EFI_PHYSICAL_ADDRESS p = IA64_RR_MASK(dest);
-#if 0
- BS->AllocatePages(AllocateAddress, EfiRuntimeServicesData,
- len >> 12, &p);
-#endif
- return (read(fd, (void*) p, len));
+
+ return (read(fd, (void *)efimd_va2pa(va), len));
}
==== //depot/projects/netperf_socket/sys/boot/ia64/efi/Makefile#2 (text+ko) ====
@@ -1,8 +1,8 @@
-# $FreeBSD: src/sys/boot/ia64/efi/Makefile,v 1.23 2004/11/23 06:02:03 marcel Exp $
+# $FreeBSD: src/sys/boot/ia64/efi/Makefile,v 1.24 2004/11/28 00:26:11 marcel Exp $
PROG= loader.sym
INTERNALPROG=
-SRCS= conf.c dev_net.c main.c start.S vers.c
+SRCS= conf.c dev_net.c efimd.c main.c start.S vers.c
NOMAN=
CFLAGS+= -DLOADER
@@ -47,11 +47,16 @@
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
OBJCOPY?= objcopy
+OBJDUMP?= objdump
loader.efi: loader.sym
+ if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \
+ ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
+ exit 1; \
+ fi
${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \
-j .rela.dyn -j .reloc -j .sdata -j .text \
- --target=efi-app-${MACHINE_ARCH} loader.sym loader.efi
+ --target=efi-app-${MACHINE_ARCH} ${.ALLSRC} ${.TARGET}
loader.help: help.common
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk \
==== //depot/projects/netperf_socket/sys/ia64/include/bootinfo.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/ia64/include/bootinfo.h,v 1.6 2002/12/08 20:32:56 marcel Exp $ */
+/* $FreeBSD: src/sys/ia64/include/bootinfo.h,v 1.7 2004/11/28 04:34:17 marcel Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
@@ -26,40 +26,25 @@
* rights to redistribute these changes.
*/
-/*
- * The boot program passes a pointer (in the boot environment virtual
- * address address space; "BEVA") to a bootinfo to the kernel using
- * the following convention:
- *
- * a0 contains first free page frame number
- * a1 contains page number of current level 1 page table
- * if a2 contains BOOTINFO_MAGIC and a4 is nonzero:
- * a3 contains pointer (BEVA) to bootinfo
- * a4 contains bootinfo version number
- * if a2 contains BOOTINFO_MAGIC and a4 contains 0 (backward compat):
- * a3 contains pointer (BEVA) to bootinfo version
- * (u_long), then the bootinfo
- */
-
-#define BOOTINFO_MAGIC 0xdeadbeeffeedface
-
struct bootinfo {
- u_int64_t bi_magic; /* BOOTINFO_MAGIC */
- u_int64_t bi_version; /* version 1 */
- u_int64_t bi_spare[6]; /* was: name of booted kernel */
- u_int64_t bi_hcdp; /* DIG64 HCDP table */
- u_int64_t bi_fpswa; /* FPSWA interface */
- u_int64_t bi_boothowto; /* value for boothowto */
- u_int64_t bi_systab; /* pa of EFI system table */
- u_int64_t bi_memmap; /* pa of EFI memory map */
- u_int64_t bi_memmap_size; /* size of EFI memory map */
- u_int64_t bi_memdesc_size; /* sizeof EFI memory desc */
- u_int32_t bi_memdesc_version; /* EFI memory desc version */
- u_int64_t bi_symtab; /* start of kernel sym table */
- u_int64_t bi_esymtab; /* end of kernel sym table */
- u_int64_t bi_kernend; /* end of kernel space */
- u_int64_t bi_envp; /* environment */
- u_int64_t bi_modulep; /* preloaded modules */
+ uint64_t bi_magic; /* BOOTINFO_MAGIC */
+#define BOOTINFO_MAGIC 0xdeadbeeffeedface
+ uint64_t bi_version; /* version 1 */
+ uint64_t bi_spare[6]; /* was: name of booted kernel */
+ uint64_t bi_hcdp; /* DIG64 HCDP table */
+ uint64_t bi_fpswa; /* FPSWA interface */
+ uint64_t bi_boothowto; /* value for boothowto */
+ uint64_t bi_systab; /* pa of EFI system table */
+ uint64_t bi_memmap; /* pa of EFI memory map */
+ uint64_t bi_memmap_size; /* size of EFI memory map */
+ uint64_t bi_memdesc_size; /* sizeof EFI memory desc */
+ uint32_t bi_memdesc_version; /* EFI memory desc version */
+ uint32_t bi_spare2;
+ uint64_t bi_symtab; /* start of kernel sym table */
+ uint64_t bi_esymtab; /* end of kernel sym table */
+ uint64_t bi_kernend; /* end of kernel space */
+ uint64_t bi_envp; /* environment */
+ uint64_t bi_modulep; /* preloaded modules */
};
extern struct bootinfo bootinfo;
==== //depot/projects/netperf_socket/sys/netgraph/ng_ppp.c#7 (text+ko) ====
@@ -36,7 +36,7 @@
*
* Author: Archie Cobbs <archie at freebsd.org>
*
- * $FreeBSD: src/sys/netgraph/ng_ppp.c,v 1.51 2004/08/03 06:34:55 bz Exp $
+ * $FreeBSD: src/sys/netgraph/ng_ppp.c,v 1.52 2004/11/27 20:29:00 archie Exp $
* $Whistle: ng_ppp.c,v 1.24 1999/11/01 09:24:52 julian Exp $
*/
@@ -748,7 +748,7 @@
case HOOK_INDEX_VJC_VJIP:
if (priv->conf.enableCompression
&& priv->hooks[HOOK_INDEX_COMPRESS] != NULL) {
- if ((m = ng_ppp_addproto(m, proto, 1)) == NULL) {
+ if ((m = ng_ppp_addproto(m, proto, 0)) == NULL) {
NGI_M(item) = NULL;
NG_FREE_ITEM(item);
return (ENOBUFS);
==== //depot/projects/netperf_socket/sys/netinet/tcp_input.c#24 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.259 2004/11/25 19:04:20 silby Exp $
+ * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.260 2004/11/28 11:01:31 rwatson Exp $
*/
#include "opt_ipfw.h" /* for ipfw_fwd */
@@ -2199,9 +2199,11 @@
* soreceive. It's hard to imagine someone
* actually wanting to send this much urgent data.
*/
+ SOCKBUF_LOCK(&so->so_rcv);
if (th->th_urp + so->so_rcv.sb_cc > sb_max) {
th->th_urp = 0; /* XXX */
thflags &= ~TH_URG; /* XXX */
+ SOCKBUF_UNLOCK(&so->so_rcv); /* XXX */
goto dodata; /* XXX */
}
/*
@@ -2220,15 +2222,14 @@
*/
if (SEQ_GT(th->th_seq+th->th_urp, tp->rcv_up)) {
tp->rcv_up = th->th_seq + th->th_urp;
- SOCKBUF_LOCK(&so->so_rcv);
so->so_oobmark = so->so_rcv.sb_cc +
(tp->rcv_up - tp->rcv_nxt) - 1;
if (so->so_oobmark == 0)
so->so_rcv.sb_state |= SBS_RCVATMARK;
- SOCKBUF_UNLOCK(&so->so_rcv);
sohasoutofband(so);
tp->t_oobflags &= ~(TCPOOB_HAVEDATA | TCPOOB_HADDATA);
}
+ SOCKBUF_UNLOCK(&so->so_rcv);
/*
* Remove out of band data so doesn't get presented to user.
* This can happen independent of advancing the URG pointer,
More information about the p4-projects
mailing list