Skip to content

Commit

Permalink
xnu-792
Browse files Browse the repository at this point in the history
  • Loading branch information
Darwin authored and das committed Jun 4, 2017
1 parent ac14b9b commit 19ee310
Show file tree
Hide file tree
Showing 1,754 changed files with 236,521 additions and 155,169 deletions.
22 changes: 22 additions & 0 deletions EXTERNAL_HEADERS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.framework.kernel</string>
<key>CFBundleName</key>
<string>Kernel</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>###KERNEL_VERSION_SHORT###</string>
<key>CFBundleVersion</key>
<string>###KERNEL_VERSION_LONG###</string>
<key>CFBundleSignature</key>
<string>????</string>
</dict>
</plist>
39 changes: 39 additions & 0 deletions EXTERNAL_HEADERS/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir


include $(MakeInc_cmd)
include $(MakeInc_def)

INSTINC_SUBDIRS = \
architecture \
machine \
mach-o

INSTINC_SUBDIRS_PPC = \
architecture \
ppc

INSTINC_SUBDIRS_I386 = \
architecture \
i386

EXPORT_FILES = \
ar.h \
stdarg.h \
stdint.h

INSTALL_MI_LIST =

INSTALL_MI_DIR = .

EXPORT_MI_LIST = ${EXPORT_FILES}

EXPORT_MI_DIR = .

include $(MakeInc_rule)
include $(MakeInc_dir)


2 changes: 2 additions & 0 deletions EXTERNAL_HEADERS/ar.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
*
* @(#)ar.h 8.2 (Berkeley) 1/21/94
*/
#ifdef KERNEL_PRIVATE

#ifndef _AR_H_
#define _AR_H_
Expand All @@ -86,3 +87,4 @@ struct ar_hdr {
};

#endif /* !_AR_H_ */
#endif /* KERNEL_PRIVATE */
32 changes: 32 additions & 0 deletions EXTERNAL_HEADERS/architecture/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir


include $(MakeInc_cmd)
include $(MakeInc_def)

INSTINC_SUBDIRS =

INSTINC_SUBDIRS_PPC = \
ppc

INSTINC_SUBDIRS_I386 = \
i386

EXPORT_FILES = \
byte_order.h

INSTALL_MI_LIST =

INSTALL_MI_DIR = architecture

EXPORT_MI_LIST = ${EXPORT_FILES}

EXPORT_MI_DIR = architecture

include $(MakeInc_rule)
include $(MakeInc_dir)


15 changes: 2 additions & 13 deletions EXTERNAL_HEADERS/architecture/byte_order.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
* Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
Expand All @@ -23,17 +23,6 @@
* Copyright (c) 1992 NeXT Computer, Inc.
*
* Byte ordering conversion.
*
* HISTORY
*
* 20 October 1992 ? at NeXT
* Added #ifdef wrapper to prevent multiple inclusions of this file.
*
* 8 October 1992 ? at NeXT
* Converted to NXxxx versions. Condensed history.
*
* 18 May 1992 ? at NeXT
* Created.
*/

#ifndef _ARCHITECTURE_BYTE_ORDER_H_
Expand All @@ -42,7 +31,7 @@
typedef unsigned long NXSwappedFloat;
typedef unsigned long long NXSwappedDouble;

#if defined (__ppc__)
#if defined (__ppc__) || defined(__ppc64__)
#include "architecture/ppc/byte_order.h"
#elif defined (__i386__)
#include "architecture/i386/byte_order.h"
Expand Down
37 changes: 37 additions & 0 deletions EXTERNAL_HEADERS/architecture/i386/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir


include $(MakeInc_cmd)
include $(MakeInc_def)

INSTINC_SUBDIRS_I386 =

EXPORT_FILES = \
asm_help.h \
cpu.h \
fpu.h \
io.h \
sel.h \
tss.h \
byte_order.h \
desc.h \
frame.h \
reg_help.h \
table.h


INSTALL_MD_LIST =

INSTALL_MD_DIR =

EXPORT_MD_LIST = ${EXPORT_FILES}

EXPORT_MD_DIR = architecture/i386

include $(MakeInc_rule)
include $(MakeInc_dir)


34 changes: 34 additions & 0 deletions EXTERNAL_HEADERS/architecture/ppc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir


include $(MakeInc_cmd)
include $(MakeInc_def)

INSTINC_SUBDIRS_PPC =

EXPORT_FILES = \
asm_help.h \
basic_regs.h \
byte_order.h \
cframe.h \
fp_regs.h \
macro_help.h \
pseudo_inst.h \
reg_help.h


INSTALL_MD_LIST =

INSTALL_MD_DIR =

EXPORT_MD_LIST = ${EXPORT_FILES}

EXPORT_MD_DIR = architecture/ppc

include $(MakeInc_rule)
include $(MakeInc_dir)


78 changes: 49 additions & 29 deletions EXTERNAL_HEADERS/architecture/ppc/byte_order.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
* Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
Expand All @@ -23,17 +23,6 @@
* Copyright (c) 1996 NeXT Software, Inc.
*
* Byte ordering conversion (for ppc).
*
* HISTORY
*
* 29-Dec-96 Umesh Vaishampayan (umeshv@NeXT.com)
* Ported from m98k.
*
* 8 October 1992 ? at NeXT
* Converted to NXxxx versions. Condensed history.
*
* 28 August 1992 Bruce Martin @NeXT
* Created.
*/

static __inline__
Expand Down Expand Up @@ -77,34 +66,40 @@ NXSwapInt(
}

static __inline__
unsigned long
NXSwapLong(
unsigned long inv
unsigned long long
NXSwapLongLong(
unsigned long long inv
)
{
union lconv {
unsigned long ul;
unsigned char uc[4];
union llconv {
unsigned long long ull;
unsigned char uc[8];
} *inp, outv;

inp = (union lconv *)&inv;
inp = (union llconv *)&inv;

outv.uc[0] = inp->uc[3];
outv.uc[1] = inp->uc[2];
outv.uc[2] = inp->uc[1];
outv.uc[3] = inp->uc[0];
outv.uc[0] = inp->uc[7];
outv.uc[1] = inp->uc[6];
outv.uc[2] = inp->uc[5];
outv.uc[3] = inp->uc[4];
outv.uc[4] = inp->uc[3];
outv.uc[5] = inp->uc[2];
outv.uc[6] = inp->uc[1];
outv.uc[7] = inp->uc[0];

return (outv.ul);
return (outv.ull);
}

#if defined(__LP64__)

static __inline__
unsigned long long
NXSwapLongLong(
unsigned long long inv
unsigned long
NXSwapLong(
unsigned long inv
)
{
union llconv {
unsigned long long ull;
unsigned long ul;
unsigned char uc[8];
} *inp, outv;

Expand All @@ -119,9 +114,34 @@ NXSwapLongLong(
outv.uc[6] = inp->uc[1];
outv.uc[7] = inp->uc[0];

return (outv.ull);
return (outv.ul);
}

#else

static __inline__
unsigned long
NXSwapLong(
unsigned long inv
)
{
union lconv {
unsigned long ul;
unsigned char uc[4];
} *inp, outv;

inp = (union lconv *)&inv;

outv.uc[0] = inp->uc[3];
outv.uc[1] = inp->uc[2];
outv.uc[2] = inp->uc[1];
outv.uc[3] = inp->uc[0];

return (outv.ul);
}

#endif /* __LP64__ */

#ifndef KERNEL

static __inline__ NXSwappedFloat
Expand Down
18 changes: 8 additions & 10 deletions EXTERNAL_HEADERS/architecture/ppc/cframe.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
* Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
Expand All @@ -26,21 +26,19 @@
*
* This include file defines C calling sequence defines
* for ppc port.
*
* HISTORY
* 20-May-97 Umesh Vaishampayan (umeshv@apple.com)
* Added C_RED_ZONE.
* 29-Dec-96 Umesh Vaishampayan (umeshv@NeXT.com)
* Ported from m98k.
* 11-June-91 Mike DeMoney (mike@next.com)
* Created.
*/

#ifndef _ARCH_PPC_CFRAME_H_
#define _ARCH_PPC_CFRAME_H_

#if defined (__ppc64__)
#define C_ARGSAVE_LEN 64 /* at least 64 bytes of arg save */
#define C_STACK_ALIGN 32 /* stack must be 32 byte aligned */
#define C_RED_ZONE 320 /* 320 bytes to skip over saved registers */
#else
#define C_ARGSAVE_LEN 32 /* at least 32 bytes of arg save */
#define C_STACK_ALIGN 16 /* stack must be 16 byte aligned */
#define C_RED_ZONE 244 /* 224 bytes to skip over saved registers */
#define C_RED_ZONE 224 /* 224 bytes to skip over saved registers */
#endif

#endif /* _ARCH_PPC_CFRAME_H_ */
Loading

0 comments on commit 19ee310

Please sign in to comment.