#include <ppc/limits.h>
#elif defined (__i386__)
#include <i386/limits.h>
-#elif defined (__arm__)
-#include <arm/limits.h>
#else
#error architecture not supported
#endif
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__ */
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
#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
#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>
#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
*/
}
}
-#elif defined(__arm__)
- do {} while(0); /* XXX what is the right ABI */
#else
#error Unknown Architecture
#endif
code = -saved_state32(tagged_regs)->eax;
}
}
-#elif defined(__arm__)
- do {} while(0); /* XXX ARMTODO */
#else
#error Unknown Architecture
#endif
{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
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
/*
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__ */
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
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
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
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
#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. */
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
__private_extern__ u_char etherbroadcastaddr[ETHER_ADDR_LEN] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-#if defined (__arm__)
-static __inline__ int
-_ether_cmp(const void * a, const void * b)
-{
- return (memcmp(a, b, ETHER_ADDR_LEN));
-}
-
-#else
static __inline__ int
_ether_cmp(const void * a, const void * b)
{
}
return (0);
}
-#endif
/*
* Release all descriptor entries owned by this protocol (there may be several).
extern void kdp_set_ip_and_mac_addresses(struct in_addr *ipaddr,
struct ether_addr *macaddr);
-#if defined (__arm__)
-static __inline__ void
-_ip_copy(struct in_addr * dst, const struct in_addr * src)
-{
- memcpy(dst, src, sizeof(*dst));
- return;
-}
-
-#else
static __inline__ void
_ip_copy(struct in_addr * dst, const struct in_addr * src)
{
*dst = *src;
return;
}
-#endif
static void
ether_inet_arp_input(
ts.tv_sec = 2;
ts.tv_nsec = 0;
- error = msleep(bp, nfs_buf_mutex, slpflag|(PRIBIO+1)|PDROP,
+ msleep(bp, nfs_buf_mutex, slpflag|(PRIBIO+1)|PDROP,
"nfsbufget", (slpflag == PCATCH) ? NULL : &ts);
- if (error == EWOULDBLOCK)
- error = 0;
slpflag = 0;
FSDBG_BOT(543, np, blkno, bp, bp->nb_flags);
- if (error || ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0)))) {
+ if ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0))) {
FSDBG_BOT(541, np, blkno, 0, error);
return (error);
}
nfs_buf_delwri_push(1);
nfsneedbuffer = 1;
- error = msleep(&nfsneedbuffer, nfs_buf_mutex, PCATCH|PDROP, "nfsbufget", NULL);
+ msleep(&nfsneedbuffer, nfs_buf_mutex, PCATCH|PDROP, "nfsbufget", NULL);
FSDBG_BOT(546, np, blkno, nfsbufcnt, nfsbufmax);
- if (error || ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0)))) {
+ if ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0))) {
FSDBG_BOT(541, np, blkno, 0, error);
return (error);
}
if (nfs_max_async_writes <= 0)
return (0);
lck_mtx_lock(&nmp->nm_lock);
- while (!error && (nfs_max_async_writes > 0) && (nmp->nm_asyncwrites >= nfs_max_async_writes)) {
+ while ((nfs_max_async_writes > 0) && (nmp->nm_asyncwrites >= nfs_max_async_writes)) {
if ((error = nfs_sigintr(nmp, NULL, current_thread(), 1)))
break;
- error = msleep(&nmp->nm_asyncwrites, &nmp->nm_lock, slpflag|(PZERO-1), "nfsasyncwrites", &ts);
- if (error == EWOULDBLOCK)
- error = 0;
+ msleep(&nmp->nm_asyncwrites, &nmp->nm_lock, slpflag|(PZERO-1), "nfsasyncwrites", &ts);
+ slpflag = 0;
}
if (!error)
nmp->nm_asyncwrites++;
}
if ((error = nfs_sigintr(nmp, NULL, current_thread(), 1)))
break;
- error = msleep(&nmp->nm_so, &nmp->nm_lock, PSOCK, "nfs_socket_connect", &ts);
- if (error == EWOULDBLOCK)
- error = 0;
- if (error)
- break;
+ msleep(&nmp->nm_so, &nmp->nm_lock, PSOCK, "nfs_socket_connect", &ts);
}
if (tocnt > 15)
log(LOG_INFO, "nfs_connect: socket connect %s for %s\n",
{
struct nfsmount *nmp;
socket_t so;
- int error, error2, sotype, rexmit, slpflag = PSOCK, needrecon;
+ int error, error2, sotype, rexmit, slpflag = 0, needrecon;
struct msghdr msg;
struct sockaddr *sendnam;
mbuf_t mreqcopy;
nfs_mount_sock_thread_wake(nmp);
if ((error = nfs_sigintr(req->r_nmp, req, req->r_thread, 1)))
break;
- error = msleep(req, &nmp->nm_lock, slpflag, "nfsconnectwait", &ts);
- if (error == EWOULDBLOCK)
- error = 0;
- if ((error == EINTR) || (error == ERESTART))
- break;
+ msleep(req, &nmp->nm_lock, slpflag|PSOCK, "nfsconnectwait", &ts);
+ slpflag = 0;
}
lck_mtx_unlock(&nmp->nm_lock);
if (error)
if ((error = nfs_sigintr(req->r_nmp, req, req->r_thread, 1)))
break;
TAILQ_INSERT_TAIL(&nmp->nm_cwndq, req, r_cchain);
- error = msleep(req, &nmp->nm_lock, slpflag | (PZERO - 1), "nfswaitcwnd", &ts);
+ msleep(req, &nmp->nm_lock, slpflag | (PZERO - 1), "nfswaitcwnd", &ts);
+ slpflag = 0;
if ((req->r_cchain.tqe_next != NFSREQNOLIST)) {
TAILQ_REMOVE(&nmp->nm_cwndq, req, r_cchain);
req->r_cchain.tqe_next = NFSREQNOLIST;
}
- if ((error == EINTR) || (error == ERESTART))
- break;
}
lck_mtx_unlock(&nmp->nm_lock);
- if ((error == EINTR) || (error == ERESTART))
- return (error);
goto again;
}
/*
/* need to poll if we're P_NOREMOTEHANG */
if (nfs_noremotehang(req->r_thread))
ts.tv_sec = 1;
- error = msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitreply", &ts);
- if (error == EWOULDBLOCK)
- error = 0;
- if ((error == EINTR) || (error == ERESTART))
- break;
+ msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitreply", &ts);
+ slpflag = 0;
}
lck_mtx_unlock(&req->r_mtx);
/* make sure to wait until this async I/O request gets sent */
int slpflag = (req->r_nmp && (req->r_nmp->nm_flag & NFSMNT_INT) && req->r_thread) ? PCATCH : 0;
struct timespec ts = { 2, 0 };
- while (!error && !(req->r_flags & R_SENT)) {
+ while (!(req->r_flags & R_SENT)) {
if ((error = nfs_sigintr(req->r_nmp, req, req->r_thread, 0)))
break;
- error = msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitsent", &ts);
- if (error == EWOULDBLOCK)
- error = 0;
+ msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitsent", &ts);
+ slpflag = 0;
}
}
sent = req->r_flags & R_SENT;
if ((nmp->nm_flag & NFSMNT_INT) && req->r_thread)
slpflag = PCATCH;
- while (!error && (*statep & NFSSTA_SNDLOCK)) {
+ while (*statep & NFSSTA_SNDLOCK) {
if ((error = nfs_sigintr(nmp, req, req->r_thread, 1)))
break;
*statep |= NFSSTA_WANTSND;
if (nfs_noremotehang(req->r_thread))
ts.tv_sec = 1;
- error = msleep(statep, &nmp->nm_lock, slpflag | (PZERO - 1), "nfsndlck", &ts);
- if (error == EWOULDBLOCK)
- error = 0;
+ msleep(statep, &nmp->nm_lock, slpflag | (PZERO - 1), "nfsndlck", &ts);
if (slpflag == PCATCH) {
slpflag = 0;
ts.tv_sec = 2;
#elif defined (__i386__) || defined(__x86_64__)
extern int (*dtrace_pid_probe_ptr)(x86_saved_state_t *regs);
extern int (*dtrace_return_probe_ptr)(x86_saved_state_t* regs);
-#elif defined (__arm__)
-extern int (*dtrace_pid_probe_ptr)(struct arm_saved_state *regs);
-extern int (*dtrace_return_probe_ptr)(struct arm_saved_state* regs);
#else
#error architecture not supported
#endif
#elif defined (__i386__) || defined(__x86_64__)
extern int fasttrap_pid_probe(x86_saved_state_t *regs);
extern int fasttrap_return_probe(x86_saved_state_t* regs);
-#elif defined(__arm__)
-extern int fasttrap_pid_probe(struct arm_saved_state *rp); /* so very, very, very broken... */
#else
#error architecture not supported
#endif
typedef uint32_t machine_inst_t;
#elif defined(__i386__) || defined (__x86_64__)
typedef uint8_t machine_inst_t;
-#elif defined(__arm__)
-typedef uint32_t machine_inst_t; /* XXX is this correct? Thumb? */
#else
#error Unknown Architecture
#endif
#if defined(__ppc__)
#define CPU_CACHE_SIZE 128
-#elif defined(__arm__)
-#define CPU_CACHE_SIZE 32
#else
#define CPU_CACHE_SIZE 64
#endif
goto bad_txn_handling;
}
- if (blhdr->binfo[0].b.sequence_num < last_sequence_num) {
+ if ( (last_sequence_num != 0)
+ && (blhdr->binfo[0].b.sequence_num != 0)
+ && (blhdr->binfo[0].b.sequence_num != last_sequence_num)
+ && (blhdr->binfo[0].b.sequence_num != last_sequence_num+1)) {
+
txn_start_offset = jnl->jhdr->end = blhdr_offset;
if (check_past_jnl_end) {
-9.0.0
+9.1.0
# The first line of this file contains the master version number for the kernel.
# All other instances of the kernel version in xnu are derived from this file.
#include "IOKit/ppc/IOSharedLockImp.h"
#elif defined (__i386__)
#include "IOKit/i386/IOSharedLockImp.h"
-#elif defined (__arm__)
-#include "IOKit/arm/IOSharedLockImp.h"
#else
#error architecture not supported
#endif
}
}
- if (vars->extentRemaining <= vars->bufferSize)
- vars->lastRead = vars->extentRemaining;
- else
- vars->lastRead = vars->bufferSize;
-
+ uint64_t length;
+ uint64_t lastReadLength = vars->lastRead;
uint64_t offset = (vars->position
- vars->extentPosition + vars->currentExtent->start);
- uint64_t length = (vars->lastRead);
+ if (vars->extentRemaining <= vars->bufferSize)
+ length = vars->extentRemaining;
+ else
+ length = vars->bufferSize;
+ vars->lastRead = length;
//if (length != vars->bufferSize) HIBLOG("short read of %qx ends@ %qx\n", length, offset + length);
uint8_t thisVector[AES_BLOCK_SIZE];
// save initial vector for following decrypts
bcopy(&cryptvars->aes_iv[0], &thisVector[0], AES_BLOCK_SIZE);
- bcopy(vars->buffer + vars->bufferHalf + vars->lastRead - AES_BLOCK_SIZE,
+ bcopy(vars->buffer + vars->bufferHalf + lastReadLength - AES_BLOCK_SIZE,
&cryptvars->aes_iv[0], AES_BLOCK_SIZE);
// decrypt the buffer
aes_decrypt_cbc(vars->buffer + vars->bufferHalf,
&thisVector[0],
- vars->lastRead / AES_BLOCK_SIZE,
+ lastReadLength / AES_BLOCK_SIZE,
vars->buffer + vars->bufferHalf,
&cryptvars->ctx.decrypt);
}
uint32_t tag;
vm_offset_t ppnum, compressedSize;
- IOPolledFileRead(vars->fileVars, src, 8, cryptvars);
+ err = IOPolledFileRead(vars->fileVars, src, 8, cryptvars);
+ if (kIOReturnSuccess != err)
+ break;
ppnum = header[0];
count = header[1];
for (page = 0; page < count; page++)
{
- IOPolledFileRead(vars->fileVars, (uint8_t *) &tag, 4, cryptvars);
+ err = IOPolledFileRead(vars->fileVars, (uint8_t *) &tag, 4, cryptvars);
+ if (kIOReturnSuccess != err)
+ break;
compressedSize = kIOHibernateTagLength & tag;
+ if (kIOHibernateTagSignature != (tag & ~kIOHibernateTagLength))
+ {
+ err = kIOReturnIPCError;
+ break;
+ }
+
if (!compressedSize)
{
ppnum++;
continue;
}
- IOPolledFileRead(vars->fileVars, src, (compressedSize + 3) & ~3, cryptvars);
-
- if (compressedSize != page_size)
+ err = IOPolledFileRead(vars->fileVars, src, (compressedSize + 3) & ~3, cryptvars);
+ if (kIOReturnSuccess != err)
+ break;
+
+ if (compressedSize < page_size)
{
decoOffset = page_size;
WKdm_decompress((WK_word*) src, (WK_word*) (src + decoOffset), PAGE_SIZE_IN_WORDS);
err = IOMemoryDescriptorReadToPhysical(vars->srcBuffer, decoOffset, ptoa_64(ppnum), page_size);
if (err)
+ {
HIBLOG("IOMemoryDescriptorReadToPhysical [%d] %x\n", ppnum, err);
+ break;
+ }
ppnum++;
pagesDone++;
}
while (true);
+ if (kIOReturnSuccess != err)
+ panic("Hibernate restore error %x", err);
+
gIOHibernateCurrentHeader->actualImage2Sum = sum;
if (vars->fileVars->io)
// flush caches
__asm__("wbinvd");
proc();
-#elif __arm__
- proc = (ResetProc)0x00000000;
- proc();
#endif
return -1;
bool more;
do {
CLRP(&fFlags, kLoopRestart);
- workToDo = more = false;
+ more = false;
+ IOInterruptState is = IOSimpleLockLockDisableInterrupt(workToDoLock);
+ workToDo = false;
+ IOSimpleLockUnlockEnableInterrupt(workToDoLock, is);
for (IOEventSource *evnt = eventChain; evnt; evnt = evnt->getNext()) {
IOTimeClientS();
extern void kmod_dump_log(vm_offset_t *addr, unsigned int cnt);
extern addr64_t kvtophys(vm_offset_t va);
-#if __arm__
-extern int copyinframe(vm_address_t fp, uint32_t *frame);
-#endif
__END_DECLS
for ( ; frame_index < maxAddrs; frame_index++)
bt[frame_index] = (void *) 0;
-#elif __arm__
- uint32_t i= 0;
- uint32_t frameb[2];
- uint32_t fp= 0;
-
- // get the current frame pointer for this thread
- __asm__ volatile("mov %0,r7" : "=r" (fp));
-
- // now crawl up the stack recording the link value of each frame
- do {
- // check bounds
- if ((fp == 0) || ((fp & 3) != 0) || (fp > VM_MAX_KERNEL_ADDRESS) || (fp < VM_MIN_KERNEL_ADDRESS)) {
- break;
- }
- // safely read frame
- if (copyinframe(fp, frameb) != 0) {
- break;
- }
-
- // No need to use copyin as this is always a kernel address, see check above
- bt[i] = (void*)frameb[1]; // link register
- fp = frameb[0];
- } while (++i < maxAddrs);
- frame= i;
#else
#error arch
#endif
#if defined(__ppc__)
__asm__ ("eieio");
#endif
-#if defined(__arm__)
- UInt32 temp = 0;
- __asm__ volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (temp));
-#endif
}
#endif
#include <libkern/ppc/OSByteOrder.h>
#elif (defined(__i386__) || defined(__x86_64__))
#include <libkern/i386/OSByteOrder.h>
-#elif defined(__arm__)
-#include <libkern/arm/OSByteOrder.h>
#else
#include <libkern/machine/OSByteOrder.h>
#endif
#include <libkern/i386/_OSByteOrder.h>
#endif
-#if defined(__arm__)
-#include <libkern/arm/OSByteOrder.h>
-#endif
#define __DARWIN_OSSwapInt16(x) \
#include "ppc/setjmp.h"
#elif defined (__i386__)
#include "i386/setjmp.h"
-#elif defined (__arm__)
-#include "arm/setjmp.h"
#else
#error architecture not supported
#endif
PSEUDO(pseudo, name, nargs) ;\
ret
-#elif defined(__arm__)
-
-#define SWI_SYSCALL 0x80 // from <mach/vm_param.h>
-
-/*
- * ARM system call interface:
- *
- * swi 0x80
- * args: r0-r6
- * return code: r0
- * on error, carry bit is set in the psr, otherwise carry bit is cleared.
- */
-
-/*
- * Macros.
- */
-
-/*
- * until we update the architecture project, these live here
- */
-
-#if defined(__DYNAMIC__)
-#define MI_GET_ADDRESS(reg,var) \
- ldr reg, 4f ;\
-3: ldr reg, [pc, reg] ;\
- b 5f ;\
-4: .long 6f - (3b + 8) ;\
-5: ;\
- .non_lazy_symbol_pointer ;\
-6: ;\
- .indirect_symbol var ;\
- .long 0 ;\
- .text ;\
- .align 2
-#else
-#define MI_GET_ADDRESS(reg,var) \
- ldr reg, 3f ;\
- b 4f ;\
-3: .long var ;\
-4:
-#endif
-
-#if defined(__DYNAMIC__)
-#define MI_BRANCH_EXTERNAL(var) \
- .globl var ;\
- MI_GET_ADDRESS(ip, var) ;\
- bx ip
-#else
-#define MI_BRANCH_EXTERNAL(var) ;\
- .globl var ;\
- b var
-#endif
-
-#if defined(__DYNAMIC__)
-#define MI_CALL_EXTERNAL(var) \
- .globl var ;\
- MI_GET_ADDRESS(ip,var) ;\
- mov lr, pc ;\
- bx ip
-#else
-#define MI_CALL_EXTERNAL(var) \
- .globl var ;\
- bl var
-#endif
-
-#define MI_ENTRY_POINT(name) \
- .align 2 ;\
- .globl name ;\
- .text ;\
-name:
-
-/* load the syscall number into r12 and trap */
-#define DO_SYSCALL(num) \
- .if (((num) & 0xff) == (num)) ;\
- mov r12, #(num) ;\
- .elseif (((num) & 0x3fc) == (num)) ;\
- mov r12, #(num) ;\
- .else ;\
- mov r12, #((num) & 0xffffff00) /* top half of the syscall number */ ;\
- orr r12, r12, #((num) & 0xff) /* bottom half */ ;\
- .endif ;\
- swi #SWI_SYSCALL
-
-/* simple syscalls (0 to 4 args) */
-#define SYSCALL_0to4(name) \
- MI_ENTRY_POINT(_##name) ;\
- DO_SYSCALL(SYS_##name) ;\
- bxcc lr /* return if carry is clear (no error) */ ; \
-1: MI_BRANCH_EXTERNAL(cerror)
-
-/* syscalls with 5 args is different, because of the single arg register load */
-#define SYSCALL_5(name) \
- MI_ENTRY_POINT(_##name) ;\
- mov ip, sp /* save a pointer to the args */ ; \
- stmfd sp!, { r4-r5 } /* save r4-r5 */ ;\
- ldr r4, [ip] /* load 5th arg */ ; \
- DO_SYSCALL(SYS_##name) ;\
- ldmfd sp!, { r4-r5 } /* restore r4-r5 */ ; \
- bxcc lr /* return if carry is clear (no error) */ ; \
-1: MI_BRANCH_EXTERNAL(cerror)
-
-/* syscalls with 6 to 8 args */
-#define SYSCALL_6to8(name, save_regs, arg_regs) \
- MI_ENTRY_POINT(_##name) ;\
- mov ip, sp /* save a pointer to the args */ ; \
- stmfd sp!, { save_regs } /* callee saved regs */ ;\
- ldmia ip, { arg_regs } /* load arg regs */ ; \
- DO_SYSCALL(SYS_##name) ;\
- ldmfd sp!, { save_regs } /* restore callee saved regs */ ; \
- bxcc lr /* return if carry is clear (no error) */ ; \
-1: MI_BRANCH_EXTERNAL(cerror)
-
-#define COMMA ,
-
-#define SYSCALL_0(name) SYSCALL_0to4(name)
-#define SYSCALL_1(name) SYSCALL_0to4(name)
-#define SYSCALL_2(name) SYSCALL_0to4(name)
-#define SYSCALL_3(name) SYSCALL_0to4(name)
-#define SYSCALL_4(name) SYSCALL_0to4(name)
-/* SYSCALL_5 declared above */
-#define SYSCALL_6(name) SYSCALL_6to8(name, r4-r5, r4-r5)
-#define SYSCALL_7(name) SYSCALL_6to8(name, r4-r6 COMMA r8, r4-r6)
-#define SYSCALL_8(name) SYSCALL_6to8(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
-
-/* select the appropriate syscall code, based on the number of arguments */
-#define SYSCALL(name, nargs) SYSCALL_##nargs(name)
-
-#define SYSCALL_NONAME_0to4(name) \
- DO_SYSCALL(SYS_##name) ;\
- bcc 1f /* branch if carry bit is clear (no error) */ ; \
- MI_BRANCH_EXTERNAL(cerror) /* call cerror */ ; \
-1:
-
-#define SYSCALL_NONAME_5(name) \
- mov ip, sp /* save a pointer to the args */ ; \
- stmfd sp!, { r4-r5 } /* save r4-r5 */ ;\
- ldr r4, [ip] /* load 5th arg */ ; \
- DO_SYSCALL(SYS_##name) ;\
- ldmfd sp!, { r4-r5 } /* restore r4-r7 */ ; \
- bcc 1f /* branch if carry bit is clear (no error) */ ; \
- MI_BRANCH_EXTERNAL(cerror) /* call cerror */ ; \
-1:
-
-#define SYSCALL_NONAME_6to8(name, save_regs, arg_regs) \
- mov ip, sp /* save a pointer to the args */ ; \
- stmfd sp!, { save_regs } /* callee save regs */ ;\
- ldmia ip, { arg_regs } /* load arguments */ ; \
- DO_SYSCALL(SYS_##name) ;\
- ldmfd sp!, { save_regs } /* restore callee saved regs */ ; \
- bcc 1f /* branch if carry bit is clear (no error) */ ; \
- MI_BRANCH_EXTERNAL(cerror) /* call cerror */ ; \
-1:
-
-#define SYSCALL_NONAME_0(name) SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_1(name) SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_2(name) SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_3(name) SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_4(name) SYSCALL_NONAME_0to4(name)
-/* SYSCALL_NONAME_5 declared above */
-#define SYSCALL_NONAME_6(name) SYSCALL_NONAME_6to8(name, r4-r5, r4-r5)
-#define SYSCALL_NONAME_7(name) SYSCALL_NONAME_6to8(name, r4-r6 COMMA r8, r4-r6)
-#define SYSCALL_NONAME_8(name) SYSCALL_NONAME_6to8(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
-
-/* select the appropriate syscall code, based on the number of arguments */
-#define SYSCALL_NONAME(name, nargs) SYSCALL_NONAME_##nargs(name)
-
-#define PSEUDO(pseudo, name, nargs) \
- .globl _##pseudo ;\
- .text ;\
- .align 2 ;\
-_##pseudo: ;\
- SYSCALL_NONAME(name, nargs)
-
-#define __SYSCALL(pseudo, name, nargs) \
- PSEUDO(pseudo, name, nargs) ;\
- bx lr
-
#else
#error Unsupported architecture
#endif
addq $24, %rsp // restore the stack
ret
-#elif defined(__arm__)
-
- .globl cerror
- MI_ENTRY_POINT(_fork)
- stmfd sp!, {r4, r7, lr}
- add r7, sp, #4
- MI_CALL_EXTERNAL(__cthread_fork_prepare)
- mov r1, #1 // prime results
- mov r12, #SYS_fork
- swi #SWI_SYSCALL // make the syscall
- bcs Lbotch // error?
- cmp r1, #0 // parent (r1=0) or child(r1=1)
- beq Lparent
-
- //child here...
- MI_GET_ADDRESS(r3, __current_pid)
- mov r0, #0
- str r0, [r3] // clear cached pid in child
-
-#if defined(__DYNAMIC__)
-// Here on the child side of the fork we need to tell the dynamic linker that
-// we have forked. To do this we call __dyld_fork_child in the dyanmic
-// linker. But since we can't dynamicly bind anything until this is done we
-// do this by using the private extern __dyld_func_lookup() function to get the
-// address of __dyld_fork_child (the 'C' code equivlent):
-//
-// _dyld_func_lookup("__dyld_fork_child", &address);
-// address();
-//
- .cstring
- .align 2
-LC0:
- .ascii "__dyld_fork_child\0"
-.text
-.align 2
- sub sp, sp, #4 // allocate space for the address parameter
- mov r1, sp // get the address of the allocated space
- ldr r0, LP0 // get the name of the function to look up
-L0: add r0, pc, r0
- bl __dyld_func_lookup
- mov lr, pc
- ldr pc, [sp], #4 // call __dyld_fork_child indirectly and pop
-#endif
- MI_CALL_EXTERNAL(__cthread_fork_child) // let child get ready
- mov r0, #0
- ldmfd sp!, {r4, r7, pc}
-
-Lbotch:
- MI_CALL_EXTERNAL(cerror) // jump here on error
- mov r0,#-1 // set the error
- // fall thru
-
-Lparent:
- mov r4, r0 // save child pid
- MI_CALL_EXTERNAL(__cthread_fork_parent)
- mov r0, r4 // restore child pid
- ldmfd sp!, {r4, r7, pc} // pop and return
-
- .align 2
-#if defined(__DYNAMIC__)
-LP0:
- .long LC0-(L0+8)
-#endif
-
#else
#error Unsupported architecture
#endif
movl %edx, %eax
ret
-#elif defined(__arm__)
-
-#include <arm/arch.h>
-
- .data
- .globl __current_pid
- .align 2
-__current_pid:
- /* Cached pid. Possible values:
- * 0: no value cached
- * > 0: cached PID of current process
- * < 0: negative number of vforks in progress
- * INT_MIN: for pre-ARMv6, "looking" value (0x80000000)
- */
- .long 0
-
-MI_ENTRY_POINT(_getpid)
- ldr r3, L__current_pid
-L1: add r3, pc, r3 // r3 = &__current_pid
- ldr r0, [r3] // get the cached pid
- cmp r0, #0
- bxgt lr // if positive, return it
-
- SYSCALL_NONAME(getpid, 0)
-
-#ifdef _ARM_ARCH_6
- ldrex r2, [r3] // see if we can cache it
- cmp r2, #0 // we can't if there are any...
- bxlt lr // ...vforks in progress
- strex r2, r0, [r3] // ignore conflicts
-#else
- mov r1, #0x80000000 // load "looking" value
- swp r2, r1, [r3] // look at the value, lock others out
- cmp r2, r1 // anyone else trying to look?
- bxeq lr // yes, so return immediately/
- cmp r2, #0 // see if we can cache it
- streq r0, [r3] // if zero, we can
- strne r2, [r3] // otherwise restore previous value
-#endif
-
- bx lr
-
-L__current_pid:
- .long __current_pid - (L1+8)
-
#else
#error Unsupported architecture
#endif
xorl %eax, %eax
ret
-#elif defined(__arm__)
-/*
- * This syscall is special cased: the timeval is returned in r0/r1.
- */
-MI_ENTRY_POINT(___gettimeofday)
- mov r3, r0 // save ptr to timeval
- SYSCALL_NONAME(gettimeofday,2)
- stmia r3, { r0, r1 }
- mov r0, #0
- bx lr
-
#else
#error Unsupported architecture
#endif
__SYSCALL_INT(__lseek, lseek, 3)
-#elif defined(__arm__)
-
-__SYSCALL(__lseek, lseek, 4)
-
#else
#error Unsupported architecture
#endif
xorl %eax, %eax
ret
-#elif defined(__arm__)
-
-MI_ENTRY_POINT(_pipe)
- mov r3,r0 // save fildes across syscall
- SYSCALL_NONAME(pipe, 0)
- str r0, [r3, #0]
- str r1, [r3, #4]
- mov r0,#0
- bx lr
-
#else
#error Unsupported architecture
#endif
UNIX_SYSCALL_NONAME(ptrace, 4)
ret
-#elif defined(__arm__)
-
-MI_ENTRY_POINT(_ptrace)
- MI_GET_ADDRESS(ip,_errno)
- str r8, [sp, #-4]!
- mov r8, #0
- str r8, [ip]
- ldr r8, [sp], #4
- SYSCALL_NONAME(ptrace, 4)
- bx lr
-
#else
#error Unsupported architecture
#endif
__SYSCALL_INT(__sigaltstack, sigaltstack, 3)
-#elif defined(__arm__)
-
-__SYSCALL(__sigaltstack, sigaltstack, 3)
-
#else
#error Unsupported architecture
#endif
__SYSCALL_INT(__sigreturn, sigreturn, 2)
-#elif defined(__arm__)
-
-__SYSCALL(__sigreturn, sigreturn, 2)
-
#else
#error Unsupported architecture
#endif
// that value anyway.
__SYSCALL(__syscall, syscall, 0);
-#elif defined(__arm__)
-
-__SYSCALL(__syscall, syscall, 7)
-
#else
#error Unsupported architecture
#endif
addq $1, (%rdx)
jmp *%rdi
-#elif defined(__arm__)
-
-#include <arm/arch.h>
-
- .globl cerror
- MI_ENTRY_POINT(_vfork)
-
- MI_GET_ADDRESS(r3, __current_pid) // get address of __current_pid
-#ifdef _ARM_ARCH_6
-L0:
- ldrex r1, [r3]
- subs r1, r1, #1 // if __current_pid <= 0, decrement it
- movpl r1, #-1 // otherwise put -1 in there
- strex r2, r1, [r3]
- cmp r2, #0
- bne L0
-#else
- mov r2, #0x80000000 // load "looking" value
-L0:
- swp r1, r2, [r3] // look at the value, lock others out
- cmp r1, r2 // anyone else trying to look?
- beq L0 // yes, so wait our turn
- subs r1, r1, #1 // if __current_pid <= 0, decrement it
- movpl r1, #-1 // otherwise put -1 in there
- str r1, [r3]
-#endif
-
- mov r1, #1 // prime results
- mov r12, #SYS_vfork
- swi #SWI_SYSCALL // make the syscall
- bcs Lbotch // error?
- cmp r1, #0 // parent (r1=0) or child(r1=1)
- beq Lparent
-
- //child here...
- mov r0, #0
- bx lr // return
-
-Lbotch:
- MI_CALL_EXTERNAL(cerror) // jump here on error
- mov r0,#-1 // set the error
- // reload values clobbered by cerror (so we can treat them as live in Lparent)
- MI_GET_ADDRESS(r3, __current_pid) // get address of __current_pid
-#ifndef _ARM_ARCH_6
- mov r2, #0x80000000 // load "looking" value
-#endif
- // fall thru
-
-Lparent:
-#ifdef _ARM_ARCH_6
- ldrex r1, [r3]
- add r1, r1, #1 // we're back, decrement vfork count
- strex r2, r1, [r3]
- cmp r2, #0
- bne Lparent
-#else
- swp r1, r2, [r3] // look at the value, lock others out
- cmp r1, r2 // anyone else trying to look?
- beq Lparent // yes, so wait our turn
- add r1, r1, #1 // we're back, decrement vfork count
- str r1, [r3]
-#endif
-
- bx lr // return
-
#else
#error Unsupported architecture
#endif
movq $-1,%rdx /* in case a 128-bit value is returned */
ret
-#elif defined(__arm__)
-
- .globl _errno
-
-MI_ENTRY_POINT(cerror)
- stmfd sp!, {r7, lr}
- mov r7, sp
- MI_GET_ADDRESS(r3,_errno)
- str r0, [r3]
- MI_CALL_EXTERNAL(_cthread_set_errno_self)
- mov r0, #-1
- mov r1, #-1
- ldmfd sp!, {r7, pc}
-
#else
#error Unsupported architecture
#endif
# include <i386/mp.h>
#elif defined(__ppc__) || defined(__ppc64__)
# include <ppc/cpu_internal.h>
-#elif defined(__arm__)
-# include <arm/cpu_internal.h>
#else
// fall back on declaring it extern. The linker will sort us out.
extern unsigned int real_ncpus;
#include "ppc/chud_xnu_glue.h"
#elif defined (__i386__)
#include "i386/chud_xnu_glue.h"
-#elif defined (__arm__)
-#include "arm/chud_xnu_glue.h"
#else
#error architecture not supported
#endif
#include "chud/ppc/chud_xnu_private.h"
#elif defined (__i386__)
#include "chud/i386/chud_xnu_private.h"
-#elif defined (__arm__)
-#include "chud/arm/chud_xnu_private.h"
#else
#error architecture not supported
#endif
for (idx = 0; idx < pmap_memory_region_count; idx++)
{
lastPage = pmap_memory_regions[idx].end - 1;
-#elif __arm__
- if (0) /* XXX */
- {
#else
#error arch
#endif
int (*mach_trap_function)(void);
#if defined(__i386__)
boolean_t mach_trap_stack;
-#elif defined(__arm__)
- /* no space */
#else
mach_munge_t *mach_trap_arg_munge32; /* system call arguments for 32-bit */
mach_munge_t *mach_trap_arg_munge64; /* system call arguments for 64-bit */
#endif
#if !MACH_ASSERT
-#if !defined(__arm__)
int mach_trap_unused;
-#endif
#else
const char* mach_trap_name;
#endif /* !MACH_ASSERT */
#define MACH_TRAP(name, arg_count, munge32, munge64) \
{ (arg_count), (int (*)(void)) (name), FALSE, #name }
#endif /* !MACH_ASSERT */
-#elif defined(__arm__)
-#if !MACH_ASSERT
-#define MACH_TRAP(name, arg_count, munge32, munge64) \
- { (arg_count), (int (*)(void)) (name) }
-#else
-#define MACH_TRAP(name, arg_count, munge32, munge64) \
- { (arg_count), (int (*)(void)) (name), #name }
-#endif /* !MACH_ASSERT */
#else /* !defined(__i386__) */
#if !MACH_ASSERT
#define MACH_TRAP(name, arg_count, munge32, munge64) \
#include "ppc/types.h"
#elif defined (__i386__)
#include "i386/types.h"
-#elif defined (__arm__)
-#include "arm/types.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/asm.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/asm.h"
-#elif defined (__arm__)
-#include "mach/arm/asm.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/boolean.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/boolean.h"
-#elif defined (__arm__)
-#include "mach/arm/boolean.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/exception.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/exception.h"
-#elif defined (__arm__)
-#include "mach/arm/exception.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/kern_return.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/kern_return.h"
-#elif defined (__arm__)
-#include "mach/arm/kern_return.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/ndr_def.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/ndr_def.h"
-#elif defined (__arm__)
-#include "mach/arm/ndr_def.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/processor_info.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/processor_info.h"
-#elif defined (__arm__)
-#include "mach/arm/processor_info.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/rpc.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/rpc.h"
-#elif defined (__arm__)
-#include "mach/arm/rpc.h"
#else
#error architecture not supported
#endif
#include <mach/ppc/sdt_isa.h>
#elif defined (__i386__) || defined(__x86_64__)
#include <mach/i386/sdt_isa.h>
-#elif defined (__arm__)
-#include <mach/arm/sdt_isa.h>
#else
#error architecture not supported
#endif
#include "mach/ppc/syscall_sw.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/syscall_sw.h"
-#elif defined (__arm__)
-#include "mach/arm/syscall_sw.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/thread_state.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/thread_state.h"
-#elif defined (__arm__)
-#include "mach/arm/thread_state.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/thread_status.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/thread_status.h"
-#elif defined (__arm__)
-#include "mach/arm/thread_status.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/vm_param.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/vm_param.h"
-#elif defined (__arm__)
-#include "mach/arm/vm_param.h"
#else
#error architecture not supported
#endif
#include "mach/ppc/vm_types.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "mach/i386/vm_types.h"
-#elif defined (__arm__)
-#include "mach/arm/vm_types.h"
#else
#error architecture not supported
#endif
#include "ppc/asm.h"
#elif defined (__i386__)
#include "i386/asm.h"
-#elif defined (__arm__)
-#include "arm/asm.h"
#else
#error architecture not supported
#endif
#include "ppc/ast.h"
#elif defined (__i386__)
#include "i386/ast.h"
-#elif defined (__arm__)
-#include "arm/ast.h"
#else
#error architecture not supported
#endif
#include "ppc/ast_types.h"
#elif defined (__i386__)
#include "i386/ast_types.h"
-#elif defined (__arm__)
-#include "arm/ast_types.h"
#else
#error architecture not supported
#endif
#include "ppc/commpage/commpage.h"
#elif defined (__i386__)
#include "i386/commpage/commpage.h"
-#elif defined (__arm__)
-#include "arm/commpage/commpage.h"
#else
#error architecture not supported
#endif
#include "ppc/cpu_affinity.h"
#elif defined (__i386__)
#include "i386/cpu_affinity.h"
-#elif defined (__arm__)
-#include "arm/cpu_affinity.h"
#else
#error architecture not supported
#endif
#include "ppc/cpu_capabilities.h"
#elif defined (__i386__)
#include "i386/cpu_capabilities.h"
-#elif defined (__arm__)
-#include "arm/cpu_capabilities.h"
#else
#error architecture not supported
#endif
#include <System/ppc/cpu_capabilities.h>
#elif defined (__i386__) || defined(__x86_64__)
#include <System/i386/cpu_capabilities.h>
-#elif defined (__arm__)
-#include <System/arm/cpu_capabilities.h>
#else
#error architecture not supported
#endif
#include "ppc/cpu_data.h"
#elif defined (__i386__)
#include "i386/cpu_data.h"
-#elif defined (__arm__)
-#include "arm/cpu_data.h"
#else
#error architecture not supported
#endif
#include "ppc/cpu_number.h"
#elif defined (__i386__)
#include "i386/cpu_number.h"
-#elif defined (__arm__)
-#include "arm/cpu_number.h"
#else
#error architecture not supported
#endif
#include "ppc/db_machdep.h"
#elif defined (__i386__)
#include "i386/db_machdep.h"
-#elif defined (__arm__)
-#include "arm/db_machdep.h"
#else
#error architecture not supported
#endif
#include "ppc/endian.h"
#elif defined (__i386__)
#include "i386/endian.h"
-#elif defined (__arm__)
-#include "arm/endian.h"
#else
#error architecture not supported
#endif
#include "ppc/io_map_entries.h"
#elif defined (__i386__)
#include "i386/io_map_entries.h"
-#elif defined (__arm__)
-#include "arm/io_map_entries.h"
#else
#error architecture not supported
#endif
#include "ppc/lock.h"
#elif defined (__i386__)
#include "i386/lock.h"
-#elif defined (__arm__)
-#include "arm/lock.h"
#else
#error architecture not supported
#endif
#include "ppc/locks.h"
#elif defined (__i386__)
#include "i386/locks.h"
-#elif defined (__arm__)
-#include "arm/locks.h"
#else
#error architecture not supported
#endif
#include "ppc/machine_cpu.h"
#elif defined (__i386__)
#include "i386/machine_cpu.h"
-#elif defined (__arm__)
-#include "arm/machine_cpu.h"
#else
#error architecture not supported
#endif
#include "ppc/machine_routines.h"
#elif defined (__i386__)
#include "i386/machine_routines.h"
-#elif defined (__arm__)
-#include "arm/machine_routines.h"
#else
#error architecture not supported
#endif
#include "ppc/machine_rpc.h"
#elif defined (__i386__)
#include "i386/machine_rpc.h"
-#elif defined (__arm__)
-#include "arm/machine_rpc.h"
#else
#error architecture not supported
#endif
#include "ppc/machlimits.h"
#elif defined (__i386__)
#include "i386/machlimits.h"
-#elif defined (__arm__)
-#include "arm/machlimits.h"
#else
#error architecture not supported
#endif
#include "ppc/machparam.h"
#elif defined (__i386__)
#include "i386/machparam.h"
-#elif defined (__arm__)
-#include "arm/machparam.h"
#else
#error architecture not supported
#endif
#include "ppc/pmap.h"
#elif defined (__i386__)
#include "i386/pmap.h"
-#elif defined (__arm__)
-#include "arm/pmap.h"
#else
#error architecture not supported
#endif
#include "ppc/sched_param.h"
#elif defined (__i386__)
#include "i386/sched_param.h"
-#elif defined (__arm__)
-#include "arm/sched_param.h"
#else
#error architecture not supported
#endif
#include "ppc/setjmp.h"
#elif defined (__i386__)
#include "i386/setjmp.h"
-#elif defined (__arm__)
-#include "arm/setjmp.h"
#else
#error architecture not supported
#endif
#include "ppc/simple_lock.h"
#elif defined (__i386__)
#include "i386/simple_lock.h"
-#elif defined (__arm__)
-#include "arm/simple_lock.h"
#else
#error architecture not supported
#endif
#include "ppc/task.h"
#elif defined (__i386__)
#include "i386/task.h"
-#elif defined (__arm__)
-#include "arm/task.h"
#else
#error architecture not supported
#endif
#include "ppc/thread.h"
#elif defined (__i386__)
#include "i386/thread.h"
-#elif defined (__arm__)
-#include "arm/thread.h"
#else
#error architecture not supported
#endif
#include "ppc/timer.h"
#elif defined (__i386__)
#include "i386/timer.h"
-#elif defined (__arm__)
-#include "arm/timer.h"
#else
#error architecture not supported
#endif
#include "ppc/trap.h"
#elif defined (__i386__)
#include "i386/trap.h"
-#elif defined (__arm__)
-#include "arm/trap.h"
#else
#error architecture not supported
#endif
#include "ppc/vm_tuning.h"
#elif defined (__i386__)
#include "i386/vm_tuning.h"
-#elif defined (__arm__)
-#include "arm/vm_tuning.h"
#else
#error architecture not supported
#endif
#include "ppc/xpr.h"
#elif defined (__i386__)
#include "i386/xpr.h"
-#elif defined (__arm__)
-#include "arm/xpr.h"
#else
#error architecture not supported
#endif
#include "profiling/ppc/profile-md.h"
#elif defined (__i386__)
#include "profiling/i386/profile-md.h"
-#elif defined (__arm__)
-#include "profiling/arm/profile-md.h"
#else
#error architecture not supported
#endif
#include "pexpert/ppc/boot.h"
#elif defined (__i386__)
#include "pexpert/i386/boot.h"
-#elif defined (__arm__)
-#include "pexpert/arm/boot.h"
#else
#error architecture not supported
#endif
#include "pexpert/ppc/protos.h"
#elif defined (__i386__)
#include "pexpert/i386/protos.h"
-#elif defined (__arm__)
-#include "pexpert/arm/protos.h"
#else
#error architecture not supported
#endif