Skip to content

Commit

Permalink
xnu-1228.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Darwin authored and das committed Jun 4, 2017
1 parent ed3adff commit 8c94aea
Show file tree
Hide file tree
Showing 109 changed files with 62 additions and 780 deletions.
2 changes: 0 additions & 2 deletions EXTERNAL_HEADERS/machine/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include <ppc/limits.h>
#elif defined (__i386__)
#include <i386/limits.h>
#elif defined (__arm__)
#include <arm/limits.h>
#else
#error architecture not supported
#endif
Expand Down
7 changes: 0 additions & 7 deletions bsd/dev/dtrace/dtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -14836,13 +14836,6 @@ dtrace_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
dtrace_provider, NULL, NULL, "END", 0, NULL);
dtrace_probeid_error = dtrace_probe_create((dtrace_provider_id_t)
dtrace_provider, NULL, NULL, "ERROR", 3, NULL);
#elif defined(__arm__)
dtrace_probeid_begin = dtrace_probe_create((dtrace_provider_id_t)
dtrace_provider, NULL, NULL, "BEGIN", 2, NULL);
dtrace_probeid_end = dtrace_probe_create((dtrace_provider_id_t)
dtrace_provider, NULL, NULL, "END", 1, NULL);
dtrace_probeid_error = dtrace_probe_create((dtrace_provider_id_t)
dtrace_provider, NULL, NULL, "ERROR", 4, NULL);
#else
#error Unknown Architecture
#endif /* __APPLE__ */
Expand Down
4 changes: 0 additions & 4 deletions bsd/dev/dtrace/profile_prvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
extern struct savearea *find_kern_regs(thread_t);
#elif defined(__i386__) || defined(__x86_64__)
extern x86_saved_state32_t *find_kern_regs(thread_t);
#elif defined (__arm__)
extern struct arm_saved_state *find_kern_regs(thread_t);
#else
#error Unknown architecture
#endif
Expand Down Expand Up @@ -139,8 +137,6 @@ static dtrace_provider_id_t profile_id;
#define PROF_ARTIFICIAL_FRAMES 8
#elif defined(__i386__) || defined(__x86_64__)
#define PROF_ARTIFICIAL_FRAMES 9
#elif defined(__arm__)
#define PROF_ARTIFICIAL_FRAMES 3 /* XXX BOGUS ARMTODO */
#else
#error Unknown architecture
#endif
Expand Down
9 changes: 0 additions & 9 deletions bsd/dev/dtrace/systrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
#define I386_SYSCALL_NUMBER_MASK (0xFFFF)

typedef x86_saved_state_t savearea_t;
#elif defined(__arm__)
typedef struct arm_saved_state savearea_t;
#endif

#include <sys/param.h>
Expand All @@ -81,9 +79,6 @@ typedef struct arm_saved_state savearea_t;
#elif defined(__i386__) || defined (__x86_64__)
#define SYSTRACE_ARTIFICIAL_FRAMES 2
#define MACHTRACE_ARTIFICIAL_FRAMES 3
#elif defined(__arm__)
#define SYSTRACE_ARTIFICIAL_FRAMES 2 /* XXX ARMTODO */
#define MACHTRACE_ARTIFICIAL_FRAMES 3 /* XXX ARMTODO */
#else
#error Unknown Architecture
#endif
Expand Down Expand Up @@ -159,8 +154,6 @@ dtrace_systrace_syscall(struct proc *pp, void *uap, int *rv)
*/
}
}
#elif defined(__arm__)
do {} while(0); /* XXX what is the right ABI */
#else
#error Unknown Architecture
#endif
Expand Down Expand Up @@ -868,8 +861,6 @@ dtrace_machtrace_syscall(struct mach_call_args *args)
code = -saved_state32(tagged_regs)->eax;
}
}
#elif defined(__arm__)
do {} while(0); /* XXX ARMTODO */
#else
#error Unknown Architecture
#endif
Expand Down
8 changes: 0 additions & 8 deletions bsd/kern/kern_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@ mythread_state_flavor_t thread_flavor_array [] = {
{x86_EXCEPTION_STATE, x86_EXCEPTION_STATE_COUNT},
};
int mynum_flavors=3;
#elif defined (__arm__)
mythread_state_flavor_t thread_flavor_array[]={
{ARM_THREAD_STATE , ARM_THREAD_STATE_COUNT},
{ARM_VFP_STATE, ARM_VFP_STATE_COUNT},
{ARM_EXCEPTION_STATE, ARM_EXCEPTION_STATE_COUNT}
};
int mynum_flavors=3;

#else
#error architecture not supported
#endif
Expand Down
24 changes: 0 additions & 24 deletions bsd/kern/kern_mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,6 @@ sysctl_mib_init(void)
cpu64bit = (_cpu_capabilities & k64Bit) == k64Bit;
#elif defined(__i386__)
cpu64bit = (_get_cpu_capabilities() & k64Bit) == k64Bit;
#elif defined(__arm__)
cpu64bit = 0; // FIXME make this not hard-coded
#endif

/*
Expand Down Expand Up @@ -652,28 +650,6 @@ sysctl_mib_init(void)
packages = ml_cpu_cache_sharing(0) /
cpuid_info()->cpuid_cores_per_package;

#elif defined(__arm__) /* end __i386 */
switch (cpuid_info()->arm_info.arm_part) {
case CPU_PART_1136JFS:
case CPU_PART_1176JZFS:
cpufamily = CPUFAMILY_ARM_11;
break;
case CPU_PART_920T:
cpufamily = CPUFAMILY_ARM_9;
break;
default:
cpufamily = CPUFAMILY_UNKNOWN;
}

cacheconfig[0] = cache_info()->c_unified;
cacheconfig[1] = cache_info()->c_isize;
cacheconfig[2] = cache_info()->c_dsize;
cacheconfig[3] = cache_info()->c_type;
cacheconfig[4] = cache_info()->c_linesz;
cacheconfig[5] = cache_info()->c_assoc;
cacheconfig[6] = 0;

packages = 1;
#else /* end __arm__ */
# warning we do not support this platform yet
#endif /* __ppc__ */
Expand Down
31 changes: 0 additions & 31 deletions bsd/kern/pthread_synch.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,6 @@ bsdthread_create(__unused struct proc *p, struct bsdthread_create_args *uap, us
stackaddr = 0xF0000000;
#elif defined(__i386__)
stackaddr = 0xB0000000;
#elif defined(__arm__)
stackaddr = 0xB0000000; /* XXX ARM */
#else
#error Need to define a stack address hint for this architecture
#endif
Expand Down Expand Up @@ -943,24 +941,6 @@ bsdthread_create(__unused struct proc *p, struct bsdthread_create_args *uap, us
thread_set_wq_state64(th, (thread_state_t)ts64);
}
}
#elif defined(__arm__)
{
int flavor=0, count=0;
void * state;

kret = thread_getstatus(th, flavor, (thread_state_t)&state, &count);
if (kret != KERN_SUCCESS) {
error = EINVAL;
goto out1;
}

/* XXX ARM TODO */

kret = thread_setstatus(th, flavor, (thread_state_t)&state, count);
if (kret != KERN_SUCCESS)
error = EINVAL;
goto out1;
}
#else
#error bsdthread_create not defined for this architecture
#endif
Expand Down Expand Up @@ -1385,8 +1365,6 @@ workqueue_addnewthread(struct workqueue *wq)
stackaddr = 0xF0000000;
#elif defined(__i386__)
stackaddr = 0xB0000000;
#elif defined(__arm__)
stackaddr = 0xB0000000; /* XXX ARM */
#else
#error Need to define a stack address hint for this architecture
#endif
Expand Down Expand Up @@ -2070,15 +2048,6 @@ setup_wqthread(proc_t p, thread_t th, user_addr_t item, int reuse_thread, struct

thread_set_wq_state64(th, (thread_state_t)ts64);
}
#elif defined(__arm__)
arm_thread_state_t state;
arm_thread_state_t *ts = &state;

/* XXX ARM add more */
ts->pc = p->p_wqthread;
ts->sp = tl->th_stackaddr + PTH_DEFAULT_GUARDSIZE;

thread_set_wq_state32(th, (thread_state_t)ts);
#else
#error setup_wqthread not defined for this architecture
#endif
Expand Down
3 changes: 0 additions & 3 deletions bsd/libkern/libkern.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
#include <sys/cdefs.h>
#include <sys/types.h>
#include <mach/vm_param.h>
#if __arm__
#include <arm/arch.h> /* for _ARM_ARCH_* */
#endif

#ifdef __APPLE_API_OBSOLETE
/* BCD conversions. */
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/_limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/_limits.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/_limits.h"
#elif defined (__arm__)
#include "arm/_limits.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/_param.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include "ppc/_param.h"
#elif defined (__i386__) || defined (__x86_64__)
#include "i386/_param.h"
#elif defined (__arm__)
#include "arm/_param.h"
#else
#error architecture not supported
#endif
2 changes: 0 additions & 2 deletions bsd/machine/_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include "ppc/_structs.h"
#elif defined (__i386__) || defined (__x86_64__)
#include "i386/_structs.h"
#elif defined (__arm__)
#include "arm/_structs.h"
#else
#error architecture not supported
#endif
2 changes: 0 additions & 2 deletions bsd/machine/_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/_types.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/_types.h"
#elif defined (__arm__)
#include "arm/_types.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/cons.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include <dev/ppc/cons.h>
#elif defined (__i386__) || defined(__x86_64__)
#include <dev/i386/cons.h>
#elif defined (__arm__)
#include <dev/arm/cons.h>
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/disklabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/disklabel.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/disklabel.h"
#elif defined (__arm__)
#include "arm/disklabel.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "ppc/endian.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/endian.h"
#elif defined (__arm__)
#include "arm/endian.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ int grade_binary(cpu_type_t, cpu_subtype_t);
#include "ppc/exec.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/exec.h"
#elif defined (__arm__)
#include "arm/exec.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/fasttrap_isa.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/fasttrap_isa.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/fasttrap_isa.h"
#elif defined (__arm__)
#include "arm/fasttrap_isa.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/param.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "ppc/param.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/param.h"
#elif defined (__arm__)
#include "arm/param.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include "ppc/profile.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/profile.h"
#elif defined (__arm__)
#include "arm/profile.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/psl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/psl.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/psl.h"
#elif defined (__arm__)
#include "arm/psl.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "ppc/ptrace.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/ptrace.h"
#elif defined (__arm__)
#include "arm/ptrace.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/reboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/reboot.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/reboot.h"
#elif defined (__arm__)
#include "arm/reboot.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/reg.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/reg.h"
#elif defined (__arm__)
#include "arm/reg.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/setjmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "ppc/setjmp.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/setjmp.h"
#elif defined (__arm__)
#include "arm/setjmp.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/signal.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/signal.h"
#elif defined (__arm__)
#include "arm/signal.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "ppc/types.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/types.h"
#elif defined (__arm__)
#include "arm/types.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/ucontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/ucontext.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/ucontext.h"
#elif defined (__arm__)
#include "arm/ucontext.h"
#else
#error architecture not supported
#endif
Expand Down
2 changes: 0 additions & 2 deletions bsd/machine/vmparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "ppc/vmparam.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/vmparam.h"
#elif defined (__arm__)
#include "arm/vmparam.h"
#else
#error architecture not supported
#endif
Expand Down
Loading

0 comments on commit 8c94aea

Please sign in to comment.