Date: Thu, 27 Oct 2016 00:33:15 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307981 - in user/alc/PQ_LAUNDRY: contrib/elftoolchain/strings crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/modes/asm lib/libproc lib/libsysdecode secure/li... Message-ID: <201610270033.u9R0XF7x099822@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Oct 27 00:33:14 2016 New Revision: 307981 URL: https://svnweb.freebsd.org/changeset/base/307981 Log: MFH r307980 Added: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/aarch64/ - copied from r307980, head/secure/lib/libcrypto/aarch64/ user/alc/PQ_LAUNDRY/sys/arm64/arm64/memcpy.S - copied unchanged from r307980, head/sys/arm64/arm64/memcpy.S user/alc/PQ_LAUNDRY/sys/arm64/arm64/memmove.S - copied unchanged from r307980, head/sys/arm64/arm64/memmove.S user/alc/PQ_LAUNDRY/sys/boot/Makefile.ficl - copied unchanged from r307980, head/sys/boot/Makefile.ficl user/alc/PQ_LAUNDRY/sys/dev/fdt/fdt_intr.h - copied unchanged from r307980, head/sys/dev/fdt/fdt_intr.h Deleted: user/alc/PQ_LAUNDRY/sys/arm64/arm64/bcopy.c Modified: user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/mp_machdep.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/trap.c user/alc/PQ_LAUNDRY/sys/boot/common/Makefile.inc user/alc/PQ_LAUNDRY/sys/boot/common/pnp.c user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/Makefile user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/env.c user/alc/PQ_LAUNDRY/sys/boot/efi/loader/main.c user/alc/PQ_LAUNDRY/sys/boot/ficl/Makefile user/alc/PQ_LAUNDRY/sys/boot/ficl32/Makefile user/alc/PQ_LAUNDRY/sys/boot/i386/Makefile.inc user/alc/PQ_LAUNDRY/sys/boot/i386/gptboot/Makefile user/alc/PQ_LAUNDRY/sys/boot/i386/gptzfsboot/Makefile user/alc/PQ_LAUNDRY/sys/boot/i386/libi386/biospci.c user/alc/PQ_LAUNDRY/sys/boot/i386/loader/Makefile user/alc/PQ_LAUNDRY/sys/conf/files.arm64 user/alc/PQ_LAUNDRY/sys/dev/bfe/if_bfe.c user/alc/PQ_LAUNDRY/sys/dev/bxe/bxe.c user/alc/PQ_LAUNDRY/sys/dev/gpio/gpiobusvar.h user/alc/PQ_LAUNDRY/sys/dev/gpio/ofw_gpiobus.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_chan.c user/alc/PQ_LAUNDRY/sys/dev/psci/psci.c user/alc/PQ_LAUNDRY/sys/dev/psci/psci.h user/alc/PQ_LAUNDRY/sys/dev/usb/net/uhso.c user/alc/PQ_LAUNDRY/sys/dev/usb/usb_device.c user/alc/PQ_LAUNDRY/sys/i386/i386/initcpu.c user/alc/PQ_LAUNDRY/sys/mips/include/signal.h user/alc/PQ_LAUNDRY/sys/net/if_bridge.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_cdg.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_chd.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_cubic.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_dctcp.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_htcp.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_newreno.c user/alc/PQ_LAUNDRY/sys/netinet/tcp_input.c user/alc/PQ_LAUNDRY/sys/netinet/tcp_stacks/fastpath.c user/alc/PQ_LAUNDRY/sys/netinet/tcp_syncache.c user/alc/PQ_LAUNDRY/sys/ufs/ufs/ufs_vnops.c user/alc/PQ_LAUNDRY/tests/sys/geom/class/uzip/Makefile user/alc/PQ_LAUNDRY/usr.sbin/bhyve/dbgport.c user/alc/PQ_LAUNDRY/usr.sbin/bhyve/vga.c (contents, props changed) user/alc/PQ_LAUNDRY/usr.sbin/config/Makefile user/alc/PQ_LAUNDRY/usr.sbin/makefs/Makefile user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660/Makefile.inc user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660/cd9660_archimedes.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660/iso9660_rrip.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/ffs/Makefile.inc user/alc/PQ_LAUNDRY/usr.sbin/makefs/ffs/ffs_bswap.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/ffs/ffs_subr.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/mtree.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/walk.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/contrib/elftoolchain/ (props changed) user/alc/PQ_LAUNDRY/crypto/openssl/ (props changed) Modified: user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c Thu Oct 27 00:33:14 2016 (r307981) @@ -48,12 +48,6 @@ ELFTC_VCSID("$Id: strings.c 3446 2016-05-03 01:31:17Z emaste $"); -enum return_code { - RETURN_OK, - RETURN_NOINPUT, - RETURN_SOFTWARE -}; - enum radix_style { RADIX_DECIMAL, RADIX_HEX, @@ -107,7 +101,7 @@ main(int argc, char **argv) { int ch, rc; - rc = RETURN_OK; + rc = 0; min_len = 0; encoding_size = 1; if (elf_version(EV_CURRENT) == EV_NONE) @@ -197,7 +191,8 @@ main(int argc, char **argv) if (!*argv) rc = handle_file("{standard input}"); else while (*argv) { - rc = handle_file(*argv); + if (handle_file(*argv) != 0) + rc = 1; argv++; } return (rc); @@ -209,11 +204,11 @@ handle_file(const char *name) int fd, rt; if (name == NULL) - return (RETURN_NOINPUT); + return (1); if (strcmp("{standard input}", name) != 0) { if (freopen(name, "rb", stdin) == NULL) { warnx("'%s': %s", name, strerror(errno)); - return (RETURN_NOINPUT); + return (1); } } else { return (find_strings(name, (off_t)0, (off_t)0)); @@ -221,7 +216,7 @@ handle_file(const char *name) fd = fileno(stdin); if (fd < 0) - return (RETURN_NOINPUT); + return (1); rt = handle_elf(name, fd); return (rt); } @@ -239,7 +234,7 @@ handle_binary(const char *name, int fd) (void) lseek(fd, (off_t)0, SEEK_SET); if (!fstat(fd, &buf)) return (find_strings(name, (off_t)0, buf.st_size)); - return (RETURN_SOFTWARE); + return (1); } /* @@ -257,7 +252,7 @@ handle_elf(const char *name, int fd) Elf_Scn *scn; int rc; - rc = RETURN_OK; + rc = 0; /* If entire file is chosen, treat it as a binary file */ if (entire_file) return (handle_binary(name, fd)); @@ -272,7 +267,7 @@ handle_elf(const char *name, int fd) if (gelf_getehdr(elf, &elfhdr) == NULL) { (void) elf_end(elf); warnx("%s: ELF file could not be processed", name); - return (RETURN_SOFTWARE); + return (1); } if (elfhdr.e_shnum == 0 && elfhdr.e_type == ET_CORE) { @@ -352,7 +347,7 @@ find_strings(const char *name, off_t off if ((obuf = (char*)calloc(1, min_len + 1)) == NULL) { (void) fprintf(stderr, "Unable to allocate memory: %s\n", strerror(errno)); - return (RETURN_SOFTWARE); + return (1); } (void) fseeko(stdin, offset, SEEK_SET); @@ -426,7 +421,7 @@ find_strings(const char *name, off_t off } _exit1: free(obuf); - return (RETURN_OK); + return (0); } #define USAGE_MESSAGE "\ Modified: user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl ============================================================================== --- user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl Thu Oct 27 00:33:14 2016 (r307981) @@ -42,7 +42,7 @@ $code=<<___; #if __ARM_MAX_ARCH__>=7 .text ___ -$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); +# $code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); $code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/); #^^^^^^ this is done to simplify adoption by not depending # on latest binutils. Modified: user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S ============================================================================== --- user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S Thu Oct 27 00:33:14 2016 (r307981) @@ -1,7 +1,6 @@ #include "arm_arch.h" .text -.arch armv8-a+crypto .align 5 .global _armv7_neon_probe Modified: user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl ============================================================================== --- user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl Thu Oct 27 00:33:14 2016 (r307981) @@ -49,7 +49,7 @@ $code=<<___; .text ___ -$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); +# $code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); $code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/); ################################################################################ Modified: user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c Thu Oct 27 00:33:14 2016 (r307981) @@ -68,6 +68,14 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif +/* + * Use 4-bytes holder for breakpoint instruction on all the platforms. + * Works for x86 as well until it is endian-little platform. + * (We are coping one byte only on x86 from this 4-bytes piece of + * memory). + */ +typedef uint32_t instr_t; + static int proc_stop(struct proc_handle *phdl) { @@ -92,8 +100,9 @@ proc_bkptset(struct proc_handle *phdl, u unsigned long *saved) { struct ptrace_io_desc piod; - unsigned long paddr, caddr; + unsigned long caddr; int ret = 0, stopped; + instr_t instr; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -115,10 +124,10 @@ proc_bkptset(struct proc_handle *phdl, u * Read the original instruction. */ caddr = address; - paddr = 0; + instr = 0; piod.piod_op = PIOD_READ_I; piod.piod_offs = (void *)caddr; - piod.piod_addr = &paddr; + piod.piod_addr = &instr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't read instruction at address 0x%" @@ -126,15 +135,15 @@ proc_bkptset(struct proc_handle *phdl, u ret = -1; goto done; } - *saved = paddr; + *saved = instr; /* * Write a breakpoint instruction to that address. */ caddr = address; - paddr = BREAKPOINT_INSTR; + instr = BREAKPOINT_INSTR; piod.piod_op = PIOD_WRITE_I; piod.piod_offs = (void *)caddr; - piod.piod_addr = &paddr; + piod.piod_addr = &instr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" @@ -156,8 +165,9 @@ proc_bkptdel(struct proc_handle *phdl, u unsigned long saved) { struct ptrace_io_desc piod; - unsigned long paddr, caddr; + unsigned long caddr; int ret = 0, stopped; + instr_t instr; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { @@ -178,10 +188,10 @@ proc_bkptdel(struct proc_handle *phdl, u * Overwrite the breakpoint instruction that we setup previously. */ caddr = address; - paddr = saved; + instr = saved; piod.piod_op = PIOD_WRITE_I; piod.piod_offs = (void *)caddr; - piod.piod_addr = &paddr; + piod.piod_addr = &instr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" Modified: user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c Thu Oct 27 00:33:14 2016 (r307981) @@ -959,7 +959,7 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_ } /* XXX: This should be in <sys/capsicum.h> */ -#define CAPMASK(right) ((right) && (((uint64_t)1 << 57) - 1)) +#define CAPMASK(right) ((right) & (((uint64_t)1 << 57) - 1)) void sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp) Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile Thu Oct 27 00:33:14 2016 (r307981) @@ -22,7 +22,10 @@ MAN+= config.5 des_modes.7 # base sources SRCS= cpt_err.c cryptlib.c cversion.c ex_data.c mem.c mem_dbg.c o_dir.c \ o_fips.c o_init.c o_str.c o_time.c uid.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= arm64cpuid.S armcap.c mem_clr.c +ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) SRCS+= x86_64cpuid.S .elif defined(ASM_arm) SRCS+= armcap.c armv4cpuid.S @@ -35,7 +38,10 @@ INCS+= crypto.h ebcdic.h opensslv.h ossl # aes SRCS+= aes_cfb.c aes_ctr.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= aes_cbc.c aes_core.c aesv8-armx.S +ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S \ aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S .elif defined(ASM_arm) @@ -238,7 +244,10 @@ INCS+= mdc2.h # modes SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gcm128.c ofb128.c \ wrap128.c xts128.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= ghashv8-armx.S +ACFLAGS.ghashv8-armx.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S .elif defined(ASM_arm) SRCS+= ghash-armv4.S ghashv8-armx.S @@ -324,7 +333,9 @@ INCS+= seed.h # sha SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c sha_dgst.c sha_one.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= sha1-armv8.S sha256-armv8.S sha512-armv8.S +.elif defined(ASM_amd64) SRCS+= sha1-mb-x86_64.S sha1-x86_64.S sha256-mb-x86_64.S sha256-x86_64.S \ sha512-x86_64.S .elif defined(ASM_arm) Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm Thu Oct 27 00:33:14 2016 (r307981) @@ -6,7 +6,44 @@ .include "Makefile.inc" -.if defined(ASM_amd64) +.if defined(ASM_aarch64) + +.PATH: ${LCRYPTO_SRC}/crypto \ + ${LCRYPTO_SRC}/crypto/aes/asm \ + ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/sha/asm + +PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm + +# aes +SRCS= aesv8-armx.pl + +# modes +SRCS+= ghashv8-armx.pl + +# sha +SRCS+= sha1-armv8.pl sha512-armv8.pl + +ASM= ${SRCS:R:S/$/.S/} sha256-armv8.S + +all: ${ASM} + +CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} sha256-armv8.s +.SUFFIXES: .pl + +sha256-armv8.S: sha512-armv8.pl + env CC=cc perl ${.ALLSRC} 64 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.pl.S: + env CC=cc perl ${.IMPSRC} 64 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.elif defined(ASM_amd64) .PATH: ${LCRYPTO_SRC}/crypto \ ${LCRYPTO_SRC}/crypto/aes/asm \ Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc Thu Oct 27 00:33:14 2016 (r307981) @@ -21,7 +21,9 @@ CFLAGS+=-DL_ENDIAN CFLAGS+=-DB_ENDIAN .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _ASM_AVX!= { \ echo vzeroall | \ ${CC} -x assembler -o /dev/null -c - 2> /dev/null; \ @@ -29,11 +31,11 @@ _ASM_AVX!= { \ .if ${_ASM_AVX} == yes ASM_${MACHINE_CPUARCH}= .endif -.elif ${MACHINE_CPUARCH} == "arm" -ASM_arm= .endif -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +.elif defined(ASM_amd64) CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM CFLAGS+=-DECP_NISTZ256_ASM Modified: user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c Thu Oct 27 00:33:14 2016 (r307981) @@ -608,6 +608,8 @@ amd64_set_ldt(td, uap, descs) largest_ld = uap->start + uap->num; if (largest_ld > max_ldt_segment) largest_ld = max_ldt_segment; + if (largest_ld < uap->start) + return (EINVAL); i = largest_ld - uap->start; mtx_lock(&dt_lock); bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) @@ -620,7 +622,8 @@ amd64_set_ldt(td, uap, descs) /* verify range of descriptors to modify */ largest_ld = uap->start + uap->num; if (uap->start >= max_ldt_segment || - largest_ld > max_ldt_segment) + largest_ld > max_ldt_segment || + largest_ld < uap->start) return (EINVAL); } Modified: user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c Thu Oct 27 00:33:14 2016 (r307981) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include <machine/vmm.h> #include <machine/vmm_dev.h> #include <machine/vmm_instruction_emul.h> +#include <machine/vmparam.h> #include "vmm_lapic.h" #include "vmm_stat.h" @@ -517,7 +518,8 @@ svm_vminit(struct vm *vm, pmap_t pmap) vm_paddr_t msrpm_pa, iopm_pa, pml4_pa; int i; - svm_sc = malloc(sizeof (struct svm_softc), M_SVM, M_WAITOK | M_ZERO); + svm_sc = contigmalloc(sizeof (*svm_sc), M_SVM, M_WAITOK | M_ZERO, + 0, VM_MAX_ADDRESS, PAGE_SIZE, 0); svm_sc->vm = vm; svm_sc->nptp = (vm_offset_t)vtophys(pmap->pm_pml4); @@ -2042,7 +2044,7 @@ svm_vmcleanup(void *arg) { struct svm_softc *sc = arg; - free(sc, M_SVM); + contigfree(sc, sizeof (*sc), M_SVM); } static register_t * Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c Thu Oct 27 00:33:14 2016 (r307981) @@ -40,12 +40,11 @@ __FBSDID("$FreeBSD$"); #include <machine/intr.h> #include <dev/fdt/fdt_common.h> +#include <dev/fdt/fdt_intr.h> #include <dev/ofw/openfirm.h> #include <dev/ofw/ofw_bus.h> #include <dev/ofw/ofw_bus_subr.h> -#include <dt-bindings/interrupt-controller/irq.h> - #include "pic_if.h" #define NMI_IRQ_CTRL_REG 0x0 @@ -155,19 +154,19 @@ aw_nmi_map_fdt(device_t dev, u_int ncell tripol = cells[1]; switch (tripol) { - case IRQ_TYPE_EDGE_RISING: + case FDT_INTR_EDGE_RISING: trig = INTR_TRIGGER_EDGE; pol = INTR_POLARITY_HIGH; break; - case IRQ_TYPE_EDGE_FALLING: + case FDT_INTR_EDGE_FALLING: trig = INTR_TRIGGER_EDGE; pol = INTR_POLARITY_LOW; break; - case IRQ_TYPE_LEVEL_HIGH: + case FDT_INTR_LEVEL_HIGH: trig = INTR_TRIGGER_LEVEL; pol = INTR_POLARITY_HIGH; break; - case IRQ_TYPE_LEVEL_LOW: + case FDT_INTR_LEVEL_LOW: trig = INTR_TRIGGER_LEVEL; pol = INTR_POLARITY_LOW; break; Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c Thu Oct 27 00:33:14 2016 (r307981) @@ -47,12 +47,15 @@ __FBSDID("$FreeBSD$"); #include <dev/extres/clk/clk.h> -#include <dt-bindings/clock/sun4i-a10-pll2.h> - #include <arm/allwinner/aw_machdep.h> #include "clkdev_if.h" +#define SUN4I_A10_PLL2_1X 0 +#define SUN4I_A10_PLL2_2X 1 +#define SUN4I_A10_PLL2_4X 2 +#define SUN4I_A10_PLL2_8X 3 + #define AW_PLL_ENABLE (1 << 31) #define A10_PLL1_OUT_EXT_DIVP (0x3 << 16) @@ -192,6 +195,16 @@ struct aw_pll_factor { #define PLLFACTOR(_n, _k, _m, _p, _freq) \ { .n = (_n), .k = (_k), .m = (_m), .p = (_p), .freq = (_freq) } +static struct aw_pll_factor aw_a10_pll1_factors[] = { + PLLFACTOR(6, 0, 0, 0, 144000000), + PLLFACTOR(12, 0, 0, 0, 312000000), + PLLFACTOR(21, 0, 0, 0, 528000000), + PLLFACTOR(29, 0, 0, 0, 720000000), + PLLFACTOR(18, 1, 0, 0, 864000000), + PLLFACTOR(19, 1, 0, 0, 912000000), + PLLFACTOR(20, 1, 0, 0, 960000000), +}; + static struct aw_pll_factor aw_a23_pll1_factors[] = { PLLFACTOR(9, 0, 0, 2, 60000000), PLLFACTOR(10, 0, 0, 2, 66000000), @@ -300,6 +313,38 @@ struct aw_pll_funcs { #define DEVICE_UNLOCK(sc) CLKDEV_DEVICE_UNLOCK((sc)->clkdev) static int +a10_pll1_set_freq(struct aw_pll_sc *sc, uint64_t fin, uint64_t *fout, + int flags) +{ + struct aw_pll_factor *f; + uint32_t val; + int n; + + f = NULL; + for (n = 0; n < nitems(aw_a10_pll1_factors); n++) { + if (aw_a10_pll1_factors[n].freq == *fout) { + f = &aw_a10_pll1_factors[n]; + break; + } + } + if (f == NULL) + return (EINVAL); + + DEVICE_LOCK(sc); + PLL_READ(sc, &val); + val &= ~(A10_PLL1_FACTOR_N|A10_PLL1_FACTOR_K|A10_PLL1_FACTOR_M| + A10_PLL1_OUT_EXT_DIVP); + val |= (f->p << A10_PLL1_OUT_EXT_DIVP_SHIFT); + val |= (f->n << A10_PLL1_FACTOR_N_SHIFT); + val |= (f->k << A10_PLL1_FACTOR_K_SHIFT); + val |= (f->m << A10_PLL1_FACTOR_M_SHIFT); + PLL_WRITE(sc, val); + DEVICE_UNLOCK(sc); + + return (0); +} + +static int a10_pll1_recalc(struct aw_pll_sc *sc, uint64_t *freq) { uint32_t val, m, n, k, p; @@ -948,7 +993,7 @@ a83t_pllcpux_set_freq(struct aw_pll_sc * } static struct aw_pll_funcs aw_pll_func[] = { - PLL(AWPLL_A10_PLL1, a10_pll1_recalc, NULL, NULL), + PLL(AWPLL_A10_PLL1, a10_pll1_recalc, a10_pll1_set_freq, NULL), PLL(AWPLL_A10_PLL2, a10_pll2_recalc, a10_pll2_set_freq, NULL), PLL(AWPLL_A10_PLL3, a10_pll3_recalc, a10_pll3_set_freq, a10_pll3_init), PLL(AWPLL_A10_PLL5, a10_pll5_recalc, NULL, NULL), Modified: user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S Thu Oct 27 00:33:14 2016 (r307981) @@ -64,14 +64,6 @@ __FBSDID("$FreeBSD$"); .cpu arm1176jz-s -ENTRY(arm11x6_setttb) - mov r1, #0 - mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ - mcr p15, 0, r1, c8, c7, 0 /* invalidate I+D TLBs */ - mcr p15, 0, r1, c7, c10, 4 /* drain write buffer */ - RET -END(arm11x6_setttb) - /* * Preload the cache before issuing the WFI by conditionally disabling the * mcr intstructions the first time around the loop. Ensure the function is Modified: user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S Thu Oct 27 00:33:14 2016 (r307981) @@ -37,56 +37,16 @@ __FBSDID("$FreeBSD$"); .cpu cortex-a8 +#ifdef ELF_TRAMPOLINE .Lcoherency_level: .word _C_LABEL(arm_cache_loc) .Lcache_type: .word _C_LABEL(arm_cache_type) -.Larmv7_dcache_line_size: - .word _C_LABEL(arm_dcache_min_line_size) -.Larmv7_icache_line_size: - .word _C_LABEL(arm_icache_min_line_size) -.Larmv7_idcache_line_size: - .word _C_LABEL(arm_idcache_min_line_size) .Lway_mask: .word 0x3ff .Lmax_index: .word 0x7fff -.Lpage_mask: - .word 0xfff - -#define PT_NOS (1 << 5) -#define PT_S (1 << 1) -#define PT_INNER_NC 0 -#define PT_INNER_WT (1 << 0) -#define PT_INNER_WB ((1 << 0) | (1 << 6)) -#define PT_INNER_WBWA (1 << 6) -#define PT_OUTER_NC 0 -#define PT_OUTER_WT (2 << 3) -#define PT_OUTER_WB (3 << 3) -#define PT_OUTER_WBWA (1 << 3) -#ifdef SMP -#define PT_ATTR (PT_S|PT_INNER_WBWA|PT_OUTER_WBWA|PT_NOS) -#else -#define PT_ATTR (PT_INNER_WBWA|PT_OUTER_WBWA) -#endif - -ENTRY(armv7_setttb) - dsb - orr r0, r0, #PT_ATTR - mcr CP15_TTBR0(r0) - isb -#ifdef SMP - mcr CP15_TLBIALLIS -#else - mcr CP15_TLBIALL -#endif - dsb - isb - RET -END(armv7_setttb) - -#ifdef ELF_TRAMPOLINE /* Based on algorithm from ARM Architecture Reference Manual */ ENTRY(armv7_dcache_wbinv_all) stmdb sp!, {r4, r5, r6, r7, r8, r9} Modified: user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c Thu Oct 27 00:33:14 2016 (r307981) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include <machine/smp.h> #include <dev/fdt/fdt_common.h> +#include <dev/fdt/fdt_intr.h> #include <dev/ofw/ofw_bus_subr.h> #include <arm/arm/gic.h> @@ -821,13 +822,15 @@ gic_map_fdt(device_t dev, u_int ncells, } tripol = cells[2] & 0xff; - if (tripol & 0xf0 || (tripol & 0x0a && cells[0] == 0)) + if (tripol & 0xf0 || (tripol & FDT_INTR_LOW_MASK && + cells[0] == 0)) device_printf(dev, "unsupported trigger/polarity " "configuration 0x%02x\n", tripol); *irqp = irq; *polp = INTR_POLARITY_CONFORM; - *trigp = tripol & 0x03 ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL; + *trigp = tripol & FDT_INTR_EDGE_MASK ? + INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL; return (0); } return (EINVAL); Modified: user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h Thu Oct 27 00:33:14 2016 (r307981) @@ -347,12 +347,21 @@ tlb_flush_range_local(vm_offset_t va, vm /* Broadcasting operations. */ #if __ARM_ARCH >= 7 && defined SMP +#if defined(CPU_CORTEXA8) +#define ARM_HAVE_MP_EXTENSIONS (cpuinfo.mp_ext != 0) +#else +#define ARM_HAVE_MP_EXTENSIONS 1 +#endif + static __inline void tlb_flush_all(void) { dsb(); - _CP15_TLBIALLIS(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_TLBIALLIS(); + else + _CP15_TLBIALL(); dsb(); } @@ -361,7 +370,10 @@ tlb_flush_all_ng(void) { dsb(); - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + else + _CP15_TLBIASID(CPU_ASID_KERNEL); dsb(); } @@ -372,7 +384,10 @@ tlb_flush(vm_offset_t va) KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); dsb(); - _CP15_TLBIMVAAIS(va); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_TLBIMVAAIS(va); + else + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); dsb(); } @@ -386,8 +401,13 @@ tlb_flush_range(vm_offset_t va, vm_size size)); dsb(); - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); + if (ARM_HAVE_MP_EXTENSIONS) { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); + } else { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + } dsb(); } #else /* SMP */ @@ -411,19 +431,23 @@ icache_sync(vm_offset_t va, vm_size_t si dsb(); va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (ARM_HAVE_MP_EXTENSIONS) { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAU(va); + } else #endif + { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAC(va); } dsb(); #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -433,10 +457,11 @@ static __inline void icache_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -446,10 +471,11 @@ static __inline void bpb_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_BPIALLIS(); -#else - _CP15_BPIALL(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_BPIALLIS(); + else #endif + _CP15_BPIALL(); dsb(); isb(); } @@ -462,12 +488,15 @@ dcache_wb_pou(vm_offset_t va, vm_size_t dsb(); va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (ARM_HAVE_MP_EXTENSIONS) { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAU(va); + } else #endif + { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAC(va); } dsb(); } Modified: user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h Thu Oct 27 00:33:14 2016 (r307981) @@ -279,14 +279,11 @@ void armv6_idcache_wbinv_all (void); #endif #if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || \ defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) -void armv7_setttb (u_int); void armv7_idcache_wbinv_all (void); void armv7_cpu_sleep (int); void armv7_setup (void); void armv7_drain_writebuf (void); -void armadaxp_idcache_wbinv_all (void); - void cortexa_setup (void); #endif #if defined(CPU_MV_PJ4B) @@ -297,7 +294,6 @@ void pj4bv7_setup (void); #if defined(CPU_ARM1176) void arm11_drain_writebuf (void); -void arm11x6_setttb (u_int); void arm11x6_setup (void); void arm11x6_sleep (int); /* no ref. for errata */ #endif Modified: user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h Thu Oct 27 00:33:14 2016 (r307981) @@ -93,7 +93,7 @@ extern platform_method_t fdt_platform_me #ifdef MULTIDELAY #define FDT_PLATFORM_CTASSERT(delay) CTASSERT(delay > 0) #else -#define FDT_PLATFORM_CTASSERT(delay) CTASSERT(delay == 0) +#define FDT_PLATFORM_CTASSERT(delay) #endif #define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible, \ Modified: user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c Thu Oct 27 00:33:14 2016 (r307981) @@ -38,6 +38,10 @@ __FBSDID("$FreeBSD$"); #include <sys/timetc.h> #include <machine/bus.h> +#ifdef MULTIDELAY +#include <machine/machdep.h> /* For arm_set_delay */ +#endif + #include <dev/ofw/openfirm.h> #include <dev/ofw/ofw_bus.h> #include <dev/ofw/ofw_bus_subr.h> @@ -67,6 +71,8 @@ struct am335x_dmtimer_softc { static struct am335x_dmtimer_softc *am335x_dmtimer_et_sc = NULL; static struct am335x_dmtimer_softc *am335x_dmtimer_tc_sc = NULL; +static void am335x_dmtimer_delay(int, void *); + /* * We use dmtimer2 for eventtimer and dmtimer3 for timecounter. */ @@ -235,6 +241,10 @@ am335x_dmtimer_tc_init(struct am335x_dmt am335x_dmtimer_tc_sc = sc; tc_init(&sc->func.tc); +#ifdef MULTIDELAY + arm_set_delay(am335x_dmtimer_delay, sc); +#endif + return (0); } @@ -328,23 +338,13 @@ static devclass_t am335x_dmtimer_devclas DRIVER_MODULE(am335x_dmtimer, simplebus, am335x_dmtimer_driver, am335x_dmtimer_devclass, 0, 0); MODULE_DEPEND(am335x_dmtimer, am335x_prcm, 1, 1, 1); -void -DELAY(int usec) +static void +am335x_dmtimer_delay(int usec, void *arg) { - struct am335x_dmtimer_softc *sc; + struct am335x_dmtimer_softc *sc = arg; int32_t counts; uint32_t first, last; - sc = am335x_dmtimer_tc_sc; - - if (sc == NULL) { - for (; usec > 0; usec--) - for (counts = 200; counts > 0; counts--) - /* Prevent gcc from optimizing out the loop */ - cpufunc_nullop(); - return; - } - /* Get the number of times to count */ counts = (usec + 1) * (sc->sysclk_freq / 1000000); @@ -361,3 +361,19 @@ DELAY(int usec) } } +#ifndef MULTIDELAY +void +DELAY(int usec) +{ + int32_t counts; + + if (am335x_dmtimer_tc_sc == NULL) { + for (; usec > 0; usec--) + for (counts = 200; counts > 0; counts--) + /* Prevent gcc from optimizing out the loop */ + cpufunc_nullop(); + return; + } else + am335x_dmtimer_delay(usec, am335x_dmtimer_tc_sc); +} +#endif Modified: user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c Thu Oct 27 00:33:14 2016 (r307981) @@ -124,5 +124,5 @@ static platform_method_t am335x_methods[ PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x", 0); +FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x", 200); #endif Modified: user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c Thu Oct 27 00:33:14 2016 (r307981) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include <machine/intr.h> #ifdef FDT +#include <dev/fdt/fdt_intr.h> #include <dev/ofw/ofw_bus_subr.h> #endif @@ -470,20 +471,20 @@ gic_map_fdt(device_t dev, u_int ncells, return (EINVAL); } - switch (cells[2] & 0xf) { - case 1: + switch (cells[2] & FDT_INTR_MASK) { + case FDT_INTR_EDGE_RISING: *trigp = INTR_TRIGGER_EDGE; *polp = INTR_POLARITY_HIGH; break; - case 2: + case FDT_INTR_EDGE_FALLING: *trigp = INTR_TRIGGER_EDGE; *polp = INTR_POLARITY_LOW; break; - case 4: + case FDT_INTR_LEVEL_HIGH: *trigp = INTR_TRIGGER_LEVEL; *polp = INTR_POLARITY_HIGH; break; - case 8: + case FDT_INTR_LEVEL_LOW: *trigp = INTR_TRIGGER_LEVEL; *polp = INTR_POLARITY_LOW; break; Copied: user/alc/PQ_LAUNDRY/sys/arm64/arm64/memcpy.S (from r307980, head/sys/arm64/arm64/memcpy.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/sys/arm64/arm64/memcpy.S Thu Oct 27 00:33:14 2016 (r307981, copy of r307980, head/sys/arm64/arm64/memcpy.S) @@ -0,0 +1,219 @@ +/* Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* + * Copyright (c) 2015 ARM Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the company may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <machine/asm.h> +__FBSDID("$FreeBSD$"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610270033.u9R0XF7x099822>