Skip to content

Commit

Permalink
xnu-517
Browse files Browse the repository at this point in the history
  • Loading branch information
Darwin authored and das committed Jun 4, 2017
1 parent 9ca7822 commit 67cf648
Show file tree
Hide file tree
Showing 1,137 changed files with 135,863 additions and 65,773 deletions.
1 change: 1 addition & 0 deletions EXTERNAL_HEADERS/bsd/i386/ansi.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#define _BSD_SSIZE_T_ int /* byte count or error */
#define _BSD_TIME_T_ long /* time() */
#define _BSD_VA_LIST_ void * /* va_list */
#define _BSD_SOCKLEN_T_ int32_t /* socklen_t (duh) */

/*
* Runes (wchar_t) is declared to be an ``int'' instead of the more natural
Expand Down
1 change: 1 addition & 0 deletions EXTERNAL_HEADERS/bsd/ppc/ansi.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#define _BSD_SSIZE_T_ int /* byte count or error */
#define _BSD_TIME_T_ long /* time() */
#define _BSD_VA_LIST_ char * /* va_list */
#define _BSD_SOCKLEN_T_ int32_t /* socklen_t (duh) */

/*
* Runes (wchar_t) is declared to be an ``int'' instead of the more natural
Expand Down
23 changes: 22 additions & 1 deletion EXTERNAL_HEADERS/mach-o/kld.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
* These API's are in libkld. Both kmodload(8) and /mach_kernel should
* link with -lkld and then ld(1) will expand -lkld to libkld.dylib or
* libkld.a depending on if -dynamic or -static is in effect.
*
* Note: we are using the __DYNAMIC__ flag to indicate user space kernel
* linking and __STATIC__ as a synonym of KERNEL.
*/

/*
Expand All @@ -42,7 +45,7 @@
extern void kld_error_vprintf(const char *format, va_list ap);

/*
* This two are only in libkld.dylib for use by kmodload(8) (user code compiled
* These two are only in libkld.dylib for use by kmodload(8) (user code compiled
* with the default -dynamic).
*/
#ifdef __DYNAMIC__
Expand All @@ -54,6 +57,13 @@ __private_extern__ long kld_load(
struct mach_header **header_addr,
const char *object_filename,
const char *output_filename);

__private_extern__ long kld_load_from_memory(
struct mach_header **header_addr,
const char *object_name,
char *object_addr,
long object_size,
const char *output_filename);
#endif /* __DYNAMIC__ */

/*
Expand All @@ -69,6 +79,11 @@ __private_extern__ long kld_load_from_memory(
long object_size);
#endif /* __STATIC__ */

__private_extern__ long kld_load_basefile_from_memory(
const char *base_filename,
char *base_addr,
long base_size);

__private_extern__ long kld_unload_all(
long deallocate_sets);

Expand All @@ -82,4 +97,10 @@ __private_extern__ long kld_forget_symbol(
__private_extern__ void kld_address_func(
unsigned long (*func)(unsigned long size, unsigned long headers_size));

#define KLD_STRIP_ALL 0x00000000
#define KLD_STRIP_NONE 0x00000001

__private_extern__ void kld_set_link_options(
unsigned long link_options);

#endif /* _MACHO_KLD_H_ */
2 changes: 1 addition & 1 deletion EXTERNAL_HEADERS/mach-o/loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -723,4 +723,4 @@ struct fvmfile_command {
unsigned long header_addr; /* files virtual address */
};

#endif _MACHO_LOADER_H_
#endif /* _MACHO_LOADER_H_ */
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ ALL_SUBDIRS = \
libkern \
libsa

CONFIG_SUBDIRS = config

INSTINC_SUBDIRS = $(ALL_SUBDIRS)

INSTINC_SUBDIRS_PPC = $(INSTINC_SUBDIRS)
Expand All @@ -45,6 +47,7 @@ EXPINC_SUBDIRS_I386 = $(EXPINC_SUBDIRS)

COMP_SUBDIRS = $(ALL_SUBDIRS)


INST_SUBDIRS = \
libkern \
libsa \
Expand Down
6 changes: 6 additions & 0 deletions bsd/conf/MASTER
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ options TCPDEBUG # TCP debug # <tcpdebug>
options RANDOM_IP_ID # random (not sequential) ip ids # <randomipid>
options TCP_DROP_SYNFIN # Drop TCP packets with SYN+FIN set # <tcpdrop_synfin>
options ICMP_BANDLIM # ICMP bandwidth limiting sysctl
options AUDIT # Security event auditing # <audit>


#
Expand All @@ -152,6 +153,7 @@ options ICMP_BANDLIM # ICMP bandwidth limiting sysctl
options COMPAT_43 # 4.3 BSD compatibility # <compat_43>
options DIAGNOSTIC # diagnostics # <diagnostic>
options KTRACE # ktrace support # <ktrace>
options GPROF # build profiling # <profile>

#
# 4.4 filesystems
Expand Down Expand Up @@ -246,6 +248,10 @@ pseudo-device pty 128 init pty_init
# vnode device
pseudo-device vndevice 4 init vndevice_init

#
# memory device
pseudo-device mdevdevice 1 init mdevinit

#
#
# packet filter device
Expand Down
2 changes: 1 addition & 1 deletion bsd/conf/MASTER.ppc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#
# RELEASE = [ppc mach medium vol pst gdb simple_clock kernstack nfsclient nfsserver quota fifo fdesc union ffs cd9660 compat_43 revfs noprofiling hfs volfs devfs synthfs netat mrouting ipdivert ipfirewall ktrace inet6 ipsec tcpdrop_synfin gif stf]
# RELEASE_TRACE = [RELEASE kdebug]
# PROFILE = [ppc mach medium vol pst gdb debug simple_clock kernstack nfsclient nfsserver quota fifo fdesc union ffs cd9660 compat_43 revfs profile hfs volfs devfs synthfs netat mrouting ipdivert ipfirewall ktrace inet6 ipsec tcpdrop_synfin gif stf]
# PROFILE = [ppc mach medium vol pst gdb simple_clock kernstack nfsclient nfsserver quota fifo fdesc union ffs cd9660 compat_43 revfs profile hfs volfs devfs synthfs netat mrouting ipdivert ipfirewall ktrace inet6 ipsec tcpdrop_synfin gif stf]
# DEBUG = [ppc mach medium vol pst gdb debug simple_clock kernstack nfsclient nfsserver quota fifo fdesc union ffs cd9660 compat_43 revfs profiling hfs volfs devfs synthfs netat mrouting mach_assert ipdivert ipfirewall ktrace inet6 ipsec tcpdrop_synfin gif stf]
# DEBUG_TRACE = [DEBUG kdebug]
#
Expand Down
3 changes: 2 additions & 1 deletion bsd/conf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ifndef BSD_KERNEL_CONFIG
export BSD_KERNEL_CONFIG = $(KERNEL_CONFIG)
endif

COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)
export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)

$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf:
make build_setup
Expand Down Expand Up @@ -53,6 +53,7 @@ do_all: do_setup_conf
SOURCE=$${next_source} \
TARGET=$(TARGET) \
INCL_MAKEDEP=FALSE \
KERNEL_CONFIG=$(BSD_KERNEL_CONFIG) \
build_all; \
echo "[ $(SOURCE) ] Returning do_all $(COMPONENT) $(BSD_KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)";

Expand Down
9 changes: 8 additions & 1 deletion bsd/conf/Makefile.template
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ COPYRIGHT_FILES = \
%ORDERED
%MACHDEP

#
# This rule insures that the subr_prof.c does NOT get compiled with
# profiling. It implements mcount() and profiling it leads to recursion.
#

subr_prof.o_CFLAGS_RM = -pg

#
# OBJSDEPS is the set of files (defined in the machine dependent
# template if necessary) which all objects depend on (such as an
Expand All @@ -84,7 +91,7 @@ LDOBJS = $(OBJS)
$(COMPONENT).o: $(LDOBJS)
@echo "[ creating $(COMPONENT).o ]"
$(RM) $(RMFLAGS) vers.c
$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/newvers \
$(COMPOBJROOT)/newvers \
`$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES}
${KCC} $(CFLAGS) $(INCLUDES) -c vers.c
@echo [ updating $(COMPONENT).o ${BSD_KERNEL_CONFIG} ]
Expand Down
15 changes: 15 additions & 0 deletions bsd/conf/files
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ OPTIONS/diagnostic optional diagnostic
OPTIONS/ktrace optional ktrace
OPTIONS/profiling optional profiling
OPTIONS/vndevice optional vndevice
OPTIONS/audit optional audit

#
# Network options
Expand Down Expand Up @@ -115,6 +116,9 @@ bsd/dev/random/YarrowCoreLib/src/comp.c standard
bsd/dev/random/YarrowCoreLib/src/prng.c standard
bsd/dev/random/YarrowCoreLib/src/sha1mod.c standard
bsd/dev/random/YarrowCoreLib/src/yarrowUtils.c standard

bsd/dev/memdev.c standard

bsd/dev/vn/vn.c optional vndevice
bsd/dev/vn/shadow.c optional vndevice

Expand Down Expand Up @@ -289,6 +293,7 @@ bsd/kern/md5c.c optional crypto
bsd/crypto/sha1.c optional crypto
bsd/crypto/sha2/sha2.c optional crypto
bsd/crypto/des/des_ecb.c optional crypto
bsd/crypto/des/des_enc.c optional crypto
bsd/crypto/des/des_setkey.c optional crypto
bsd/crypto/blowfish/bf_enc.c optional crypto
bsd/crypto/blowfish/bf_skey.c optional crypto
Expand Down Expand Up @@ -380,6 +385,7 @@ bsd/nfs/nfs_subs.c optional nfsclient nfsserver
bsd/nfs/nfs_syscalls.c optional nfsclient nfsserver
bsd/nfs/nfs_vfsops.c optional nfsclient
bsd/nfs/nfs_vnops.c optional nfsclient
bsd/nfs/nfs_lock.c optional nfsclient

bsd/kern/netboot.c optional nfsclient

Expand All @@ -392,6 +398,7 @@ bsd/ufs/ffs/ffs_vfsops.c standard
bsd/ufs/ffs/ffs_vnops.c standard
bsd/ufs/mfs/mfs_vfsops.c optional mfs
bsd/ufs/mfs/mfs_vnops.c optional mfs
bsd/ufs/ufs/ufs_attrlist.c standard
bsd/ufs/ufs/ufs_bmap.c standard
bsd/ufs/ufs/ufs_byte_order.c optional rev_endian_fs
bsd/ufs/ufs/ufs_ihash.c standard
Expand All @@ -410,9 +417,11 @@ bsd/hfs/hfs_cnode.c optional hfs
bsd/hfs/hfs_encodinghint.c optional hfs
bsd/hfs/hfs_encodings.c optional hfs
bsd/hfs/hfs_endian.c optional hfs
bsd/hfs/hfs_hotfiles.c optional hfs
bsd/hfs/hfs_link.c optional hfs
bsd/hfs/hfs_lockf.c optional hfs
bsd/hfs/hfs_lookup.c optional hfs
bsd/hfs/hfs_notification.c optional hfs
bsd/hfs/hfs_quota.c optional quota
bsd/hfs/hfs_readwrite.c optional hfs
bsd/hfs/hfs_search.c optional hfs
Expand All @@ -425,6 +434,7 @@ bsd/hfs/hfscommon/BTree/BTree.c optional hfs
bsd/hfs/hfscommon/BTree/BTreeAllocate.c optional hfs
bsd/hfs/hfscommon/BTree/BTreeMiscOps.c optional hfs
bsd/hfs/hfscommon/BTree/BTreeNodeOps.c optional hfs
bsd/hfs/hfscommon/BTree/BTreeNodeReserve.c optional hfs
bsd/hfs/hfscommon/BTree/BTreeScanner.c optional hfs
bsd/hfs/hfscommon/BTree/BTreeTreeOps.c optional hfs
bsd/hfs/hfscommon/Catalog/Catalog.c optional hfs
Expand All @@ -440,6 +450,11 @@ bsd/kern/bsd_init.c standard
bsd/kern/init_sysent.c standard
bsd/kern/kdebug.c standard
bsd/kern/kern_acct.c standard
bsd/kern/kern_aio.c standard
bsd/kern/kern_audit.c standard
bsd/kern/kern_bsm_token.c standard
bsd/kern/kern_bsm_audit.c standard
bsd/kern/kern_bsm_klib.c standard
bsd/kern/kern_clock.c standard
bsd/kern/kern_core.c standard
bsd/kern/kern_symfile.c standard
Expand Down
1 change: 1 addition & 0 deletions bsd/conf/files.i386
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bsd/dev/i386/kern_machdep.c standard
bsd/dev/i386/memmove.c standard
bsd/dev/i386/stubs.c standard
bsd/dev/i386/lock_stubs.c standard
bsd/dev/i386/sysctl.c standard
bsd/dev/i386/unix_signal.c standard
bsd/dev/i386/unix_startup.c standard

Expand Down
4 changes: 4 additions & 0 deletions bsd/conf/files.ppc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ bsd/dev/ppc/stubs.c standard
bsd/dev/ppc/systemcalls.c standard
bsd/dev/ppc/km.c standard
bsd/dev/ppc/xsumas.s standard
bsd/dev/ppc/sysctl.c standard

bsd/dev/ppc/chud/chud_bsd_callback.c standard
bsd/dev/ppc/chud/chud_process.c standard

bsd/kern/bsd_stubs.c standard

15 changes: 14 additions & 1 deletion bsd/conf/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,19 @@
#include <ufs/ufs/inode.h>
#include <miscfs/fifofs/fifo.h>
#include <sys/shm.h>
#include <sys/aio_kern.h>

struct timezone tz = { TIMEZONE, PST };

#define NPROC (20 + 16 * MAXUSERS)
#define HNPROC (20 + 64 * MAXUSERS)
int maxproc = NPROC;
__private_extern__ int hard_maxproc = HNPROC; /* hardcoded limit */
int nprocs = 0; /* XXX */

#define NTEXT (80 + NPROC / 8) /* actually the object cache */
#define NVNODE (NPROC + NTEXT + 300)
int desiredvnodes = NVNODE + 350;
int desiredvnodes = NVNODE + 700;

#define MAXFILES (OPEN_MAX + 2048)
int maxfiles = MAXFILES;
Expand All @@ -98,6 +101,16 @@ int nport = NPROC / 2;
#define MAXSOCKETS NMBCLUSTERS
int maxsockets = MAXSOCKETS;

/*
* async IO (aio) configurable limits
*/
#define AIO_MAX 90 /* system wide limit of async IO requests */
#define AIO_PROCESS_MAX AIO_LISTIO_MAX /* process limit of async IO requests */
#define AIO_THREAD_COUNT 4 /* number of async IO worker threads created */
int aio_max_requests = AIO_MAX;
int aio_max_requests_per_process = AIO_PROCESS_MAX;
int aio_worker_threads = AIO_THREAD_COUNT;

/*
* These have to be allocated somewhere; allocating
* them here forces loader errors if this file is omitted
Expand Down
2 changes: 1 addition & 1 deletion bsd/conf/version.major
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6
7
2 changes: 1 addition & 1 deletion bsd/conf/version.minor
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
0
1 change: 1 addition & 0 deletions bsd/conf/version.variant
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Loading

0 comments on commit 67cf648

Please sign in to comment.